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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 case STRING: | 109 case STRING: |
110 case NTH: | 110 case NTH: |
111 case HEX: | 111 case HEX: |
112 case IDSEL: | 112 case IDSEL: |
113 case DIMEN: | 113 case DIMEN: |
114 case INVALIDDIMEN: | 114 case INVALIDDIMEN: |
115 case URI: | 115 case URI: |
116 case FUNCTION: | 116 case FUNCTION: |
117 case ANYFUNCTION: | 117 case ANYFUNCTION: |
118 case HOSTFUNCTION: | 118 case HOSTFUNCTION: |
119 case ANCESTORFUNCTION: | 119 case HOSTCONTEXTFUNCTION: |
120 case NOTFUNCTION: | 120 case NOTFUNCTION: |
121 case CALCFUNCTION: | 121 case CALCFUNCTION: |
122 case MINFUNCTION: | 122 case MINFUNCTION: |
123 case MAXFUNCTION: | 123 case MAXFUNCTION: |
124 case UNICODERANGE: | 124 case UNICODERANGE: |
125 return true; | 125 return true; |
126 default: | 126 default: |
127 return false; | 127 return false; |
128 } | 128 } |
129 } | 129 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 %token <string> URI | 260 %token <string> URI |
261 %token <string> FUNCTION | 261 %token <string> FUNCTION |
262 %token <string> ANYFUNCTION | 262 %token <string> ANYFUNCTION |
263 %token <string> CUEFUNCTION | 263 %token <string> CUEFUNCTION |
264 %token <string> NOTFUNCTION | 264 %token <string> NOTFUNCTION |
265 %token <string> DISTRIBUTEDFUNCTION | 265 %token <string> DISTRIBUTEDFUNCTION |
266 %token <string> CALCFUNCTION | 266 %token <string> CALCFUNCTION |
267 %token <string> MINFUNCTION | 267 %token <string> MINFUNCTION |
268 %token <string> MAXFUNCTION | 268 %token <string> MAXFUNCTION |
269 %token <string> HOSTFUNCTION | 269 %token <string> HOSTFUNCTION |
270 %token <string> ANCESTORFUNCTION | 270 %token <string> HOSTCONTEXTFUNCTION |
271 | 271 |
272 %token <string> UNICODERANGE | 272 %token <string> UNICODERANGE |
273 | 273 |
274 %type <relation> combinator | 274 %type <relation> combinator |
275 | 275 |
276 %type <rule> ruleset | 276 %type <rule> ruleset |
277 %type <rule> media | 277 %type <rule> media |
278 %type <rule> import | 278 %type <rule> import |
279 %type <rule> namespace | 279 %type <rule> namespace |
280 %type <rule> page | 280 %type <rule> page |
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 $$->setMatch(CSSSelector::PseudoClass); | 1474 $$->setMatch(CSSSelector::PseudoClass); |
1475 parser->tokenToLowerCase($2); | 1475 parser->tokenToLowerCase($2); |
1476 $$->setValue($2.atomicSubstring(0, $2.length() - 1)); | 1476 $$->setValue($2.atomicSubstring(0, $2.length() - 1)); |
1477 CSSSelector::PseudoType type = $$->pseudoType(); | 1477 CSSSelector::PseudoType type = $$->pseudoType(); |
1478 if (type != CSSSelector::PseudoHost) | 1478 if (type != CSSSelector::PseudoHost) |
1479 YYERROR; | 1479 YYERROR; |
1480 } | 1480 } |
1481 | ':' HOSTFUNCTION selector_recovery closing_parenthesis { | 1481 | ':' HOSTFUNCTION selector_recovery closing_parenthesis { |
1482 YYERROR; | 1482 YYERROR; |
1483 } | 1483 } |
1484 | ':' ANCESTORFUNCTION maybe_space simple_selector_list maybe_space closing_
parenthesis { | 1484 // used by :host-context() |
| 1485 | ':' HOSTCONTEXTFUNCTION maybe_space simple_selector_list maybe_space closi
ng_parenthesis { |
1485 $$ = parser->createFloatingSelector(); | 1486 $$ = parser->createFloatingSelector(); |
1486 $$->setMatch(CSSSelector::PseudoClass); | 1487 $$->setMatch(CSSSelector::PseudoClass); |
1487 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4)); | 1488 $$->adoptSelectorVector(*parser->sinkFloatingSelectorVector($4)); |
1488 parser->tokenToLowerCase($2); | 1489 parser->tokenToLowerCase($2); |
1489 $$->setValue($2); | 1490 $$->setValue($2); |
1490 CSSSelector::PseudoType type = $$->pseudoType(); | 1491 CSSSelector::PseudoType type = $$->pseudoType(); |
1491 if (type != CSSSelector::PseudoAncestor) | 1492 if (type != CSSSelector::PseudoHostContext) |
1492 YYERROR; | 1493 YYERROR; |
1493 } | 1494 } |
1494 // used by :ancestor() | 1495 | ':' HOSTCONTEXTFUNCTION maybe_space closing_parenthesis { |
1495 | ':' ANCESTORFUNCTION maybe_space closing_parenthesis { | |
1496 $$ = parser->createFloatingSelector(); | 1496 $$ = parser->createFloatingSelector(); |
1497 $$->setMatch(CSSSelector::PseudoClass); | 1497 $$->setMatch(CSSSelector::PseudoClass); |
1498 parser->tokenToLowerCase($2); | 1498 parser->tokenToLowerCase($2); |
1499 $$->setValue($2.atomicSubstring(0, $2.length() - 1)); | 1499 $$->setValue($2.atomicSubstring(0, $2.length() - 1)); |
1500 CSSSelector::PseudoType type = $$->pseudoType(); | 1500 CSSSelector::PseudoType type = $$->pseudoType(); |
1501 if (type != CSSSelector::PseudoAncestor) | 1501 if (type != CSSSelector::PseudoHostContext) |
1502 YYERROR; | 1502 YYERROR; |
1503 } | 1503 } |
1504 | ':' ANCESTORFUNCTION selector_recovery closing_parenthesis { | 1504 | ':' HOSTCONTEXTFUNCTION selector_recovery closing_parenthesis { |
1505 YYERROR; | 1505 YYERROR; |
1506 } | 1506 } |
1507 ; | 1507 ; |
1508 | 1508 |
1509 selector_recovery: | 1509 selector_recovery: |
1510 error error_location error_recovery; | 1510 error error_location error_recovery; |
1511 | 1511 |
1512 declaration_list: | 1512 declaration_list: |
1513 /* empty */ { $$ = false; } | 1513 /* empty */ { $$ = false; } |
1514 | declaration | 1514 | declaration |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 ; | 1896 ; |
1897 | 1897 |
1898 rule_error_recovery: | 1898 rule_error_recovery: |
1899 /* empty */ | 1899 /* empty */ |
1900 | rule_error_recovery error | 1900 | rule_error_recovery error |
1901 | rule_error_recovery invalid_square_brackets_block | 1901 | rule_error_recovery invalid_square_brackets_block |
1902 | rule_error_recovery invalid_parentheses_block | 1902 | rule_error_recovery invalid_parentheses_block |
1903 ; | 1903 ; |
1904 | 1904 |
1905 %% | 1905 %% |
OLD | NEW |