summaryrefslogtreecommitdiff
path: root/css/parser.y
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-04-05 16:24:43 +0000
committerJames Bursa <james@netsurf-browser.org>2003-04-05 16:24:43 +0000
commit75768e67001bcf292f9e8bbbe8139a7432835092 (patch)
treea242d019452df8740e902ad7f32a518a0ad4e81f /css/parser.y
parent004f6c31e32e1297946935370bdc0be2fe5ae259 (diff)
downloadnetsurf-75768e67001bcf292f9e8bbbe8139a7432835092.tar.gz
netsurf-75768e67001bcf292f9e8bbbe8139a7432835092.tar.bz2
[project @ 2003-04-05 16:24:43 by bursa]
Re-implement style attributes. svn path=/import/netsurf/; revision=114
Diffstat (limited to 'css/parser.y')
-rw-r--r--css/parser.y13
1 files changed, 8 insertions, 5 deletions
diff --git a/css/parser.y b/css/parser.y
index 5b9751036..8625c900f 100644
--- a/css/parser.y
+++ b/css/parser.y
@@ -1,5 +1,5 @@
/**
- * $Id: parser.y,v 1.4 2003/04/04 15:19:31 bursa Exp $
+ * $Id: parser.y,v 1.5 2003/04/05 16:24:43 bursa Exp $
*/
/*
@@ -46,12 +46,15 @@ block_body ::= block_body ATKEYWORD.
block_body ::= block_body SEMI.
ruleset ::= selector_list(A) LBRACE declaration_list(B) RBRACE.
- { css_add_ruleset(stylesheet, A, B);
+ { css_add_ruleset(param->stylesheet, A, B);
css_free_node(B); }
ruleset ::= any_list_1(A) LBRACE declaration_list(B) RBRACE.
{ css_free_node(A); css_free_node(B); } /* not CSS2 */
-ruleset ::= LBRACE declaration_list RBRACE.
- /* this form of ruleset not used in CSS2 */
+ruleset ::= LBRACE declaration_list(A) RBRACE.
+ /* this form of ruleset not used in CSS2
+ used to parse style attributes (ruleset_only = 1) */
+ { if (param->ruleset_only) param->declaration = A;
+ else css_free_node(A); }
selector_list(A) ::= selector(B).
{ A = B; }
@@ -156,7 +159,7 @@ any(A) ::= LBRAC any_list(B) RBRAC.
/* lemon directives */
-%extra_argument { struct css_stylesheet *stylesheet }
+%extra_argument { struct parse_params *param }
%include {
#define CSS_INTERNALS
#include "netsurf/css/scanner.h"