OLD | NEW |
1 %{ | 1 %{ |
2 | 2 |
3 /* | 3 /* |
4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) | 4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App
le Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App
le Inc. All rights reserved. |
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 %type <boolean> declaration_list | 339 %type <boolean> declaration_list |
340 %type <boolean> decl_list | 340 %type <boolean> decl_list |
341 %type <boolean> declaration | 341 %type <boolean> declaration |
342 %type <boolean> declarations_and_margins | 342 %type <boolean> declarations_and_margins |
343 | 343 |
344 %type <boolean> prio | 344 %type <boolean> prio |
345 | 345 |
346 %type <integer> match | 346 %type <integer> match |
347 %type <integer> unary_operator | 347 %type <integer> unary_operator |
348 %type <integer> maybe_unary_operator | 348 %type <integer> maybe_unary_operator |
| 349 %type <integer> attr_flags |
| 350 %type <integer> maybe_attr_flags |
349 %type <character> operator | 351 %type <character> operator |
350 | 352 |
351 %type <valueList> expr | 353 %type <valueList> expr |
352 %type <value> term | 354 %type <value> term |
353 %type <value> unary_term | 355 %type <value> unary_term |
354 %type <value> function | 356 %type <value> function |
355 %type <value> calc_func_term | 357 %type <value> calc_func_term |
356 %type <character> calc_func_operator | 358 %type <character> calc_func_operator |
357 %type <valueList> calc_func_expr | 359 %type <valueList> calc_func_expr |
358 %type <valueList> calc_func_paren_expr | 360 %type <valueList> calc_func_paren_expr |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 ; | 1235 ; |
1234 | 1236 |
1235 attr_name: | 1237 attr_name: |
1236 IDENT maybe_space { | 1238 IDENT maybe_space { |
1237 if (parser->m_context.isHTMLDocument()) | 1239 if (parser->m_context.isHTMLDocument()) |
1238 parser->tokenToLowerCase($1); | 1240 parser->tokenToLowerCase($1); |
1239 $$ = $1; | 1241 $$ = $1; |
1240 } | 1242 } |
1241 ; | 1243 ; |
1242 | 1244 |
| 1245 attr_flags: |
| 1246 IDENT maybe_space { |
| 1247 unsigned flags; |
| 1248 if (!parser->parseAttributeFlags(flags, $1)) |
| 1249 YYERROR; |
| 1250 $$ = flags; |
| 1251 } |
| 1252 ; |
| 1253 |
| 1254 maybe_attr_flags: |
| 1255 attr_flags |
| 1256 | /* empty */ { $$ = CSSSelector::NoAttributeFlags; } |
| 1257 ; |
| 1258 |
1243 attrib: | 1259 attrib: |
1244 '[' maybe_space attr_name closing_square_bracket { | 1260 '[' maybe_space attr_name closing_square_bracket { |
1245 $$ = parser->createFloatingSelector(); | 1261 $$ = parser->createFloatingSelector(); |
1246 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom)); | 1262 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom), CSSSelector::NoA
ttributeFlags); |
1247 $$->setMatch(CSSSelector::Set); | 1263 $$->setMatch(CSSSelector::Set); |
1248 } | 1264 } |
1249 | '[' maybe_space attr_name match maybe_space ident_or_string maybe_space cl
osing_square_bracket { | 1265 | '[' maybe_space attr_name match maybe_space ident_or_string maybe_space ma
ybe_attr_flags closing_square_bracket { |
1250 $$ = parser->createFloatingSelector(); | 1266 $$ = parser->createFloatingSelector(); |
1251 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom)); | 1267 $$->setAttribute(QualifiedName(nullAtom, $3, nullAtom), $8); |
1252 $$->setMatch((CSSSelector::Match)$4); | 1268 $$->setMatch((CSSSelector::Match)$4); |
1253 $$->setValue($6); | 1269 $$->setValue($6); |
1254 } | 1270 } |
1255 | '[' maybe_space namespace_selector attr_name closing_square_bracket { | 1271 | '[' maybe_space namespace_selector attr_name closing_square_bracket { |
1256 $$ = parser->createFloatingSelector(); | 1272 $$ = parser->createFloatingSelector(); |
1257 $$->setAttribute(parser->determineNameInNamespace($3, $4)); | 1273 $$->setAttribute(parser->determineNameInNamespace($3, $4), CSSSelector::
NoAttributeFlags); |
1258 $$->setMatch(CSSSelector::Set); | 1274 $$->setMatch(CSSSelector::Set); |
1259 } | 1275 } |
1260 | '[' maybe_space namespace_selector attr_name match maybe_space ident_or_st
ring maybe_space closing_square_bracket { | 1276 | '[' maybe_space namespace_selector attr_name match maybe_space ident_or_st
ring maybe_space maybe_attr_flags closing_square_bracket { |
1261 $$ = parser->createFloatingSelector(); | 1277 $$ = parser->createFloatingSelector(); |
1262 $$->setAttribute(parser->determineNameInNamespace($3, $4)); | 1278 $$->setAttribute(parser->determineNameInNamespace($3, $4), $9); |
1263 $$->setMatch((CSSSelector::Match)$5); | 1279 $$->setMatch((CSSSelector::Match)$5); |
1264 $$->setValue($7); | 1280 $$->setValue($7); |
1265 } | 1281 } |
1266 | '[' selector_recovery closing_square_bracket { | 1282 | '[' selector_recovery closing_square_bracket { |
1267 YYERROR; | 1283 YYERROR; |
1268 } | 1284 } |
1269 ; | 1285 ; |
1270 | 1286 |
1271 match: | 1287 match: |
1272 '=' { | 1288 '=' { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 ; | 1837 ; |
1822 | 1838 |
1823 rule_error_recovery: | 1839 rule_error_recovery: |
1824 /* empty */ | 1840 /* empty */ |
1825 | rule_error_recovery error | 1841 | rule_error_recovery error |
1826 | rule_error_recovery invalid_square_brackets_block | 1842 | rule_error_recovery invalid_square_brackets_block |
1827 | rule_error_recovery invalid_parentheses_block | 1843 | rule_error_recovery invalid_parentheses_block |
1828 ; | 1844 ; |
1829 | 1845 |
1830 %% | 1846 %% |
OLD | NEW |