Changeset 150804 in webkit
- Timestamp:
- May 28, 2013 7:37:34 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150803 r150804 1 2013-05-28 Sergio Villar Senin <svillar@igalia.com> 2 3 Refactoring CSS grammar 4 https://bugs.webkit.org/show_bug.cgi?id=116679 5 6 Reviewed by Andreas Kling. 7 8 From Blink r149948 by <serya@chromium.org> 9 10 Added "closing_parenthesis:" and "error_recovery:" to avoid code 11 duplication in a couple of error recovery rules. Some other rules 12 were also refactored which allows to reduce the the number of 13 shift/reduce conflicts by 2. 14 15 No new tests required as this is just a refactoring, no new 16 functionality added. 17 18 * css/CSSGrammar.y.in: 19 1 20 2013-05-28 Sergio Villar Senin <svillar@igalia.com> 2 21 -
trunk/Source/WebCore/css/CSSGrammar.y.in
r150803 r150804 89 89 90 90 #if ENABLE_SHADOW_DOM 91 %expect 6 591 %expect 63 92 92 #else 93 %expect 6 493 %expect 62 94 94 #endif 95 95 … … 429 429 ; 430 430 431 closing_parenthesis: 432 ')' 433 | %prec LOWEST_PREC TOKEN_EOF 434 ; 435 431 436 charset: 432 437 CHARSET_SYM maybe_space STRING maybe_space ';' { … … 1562 1567 1563 1568 decl_list_recovery: 1564 error error_location {1569 error error_location error_recovery { 1565 1570 parser->syntaxError($2, CSSParser::PropertyDeclarationError); 1566 1571 } 1567 | decl_list_recovery invalid_block1568 | decl_list_recovery error1569 1572 ; 1570 1573 … … 1619 1622 1620 1623 declaration_recovery: 1621 error error_location {1624 error error_location error_recovery { 1622 1625 parser->syntaxError($2); 1623 1626 } 1624 | declaration_recovery invalid_block1625 | declaration_recovery error1626 1627 ; 1627 1628 … … 1655 1656 } 1656 1657 } 1657 | expr invalid_block_list { 1658 $$ = 0; 1659 } 1660 | expr invalid_block_list error { 1661 $$ = 0; 1662 } 1663 | expr error { 1664 $$ = 0; 1665 } 1658 | expr expr_recovery { 1659 $$ = 0; 1660 } 1661 ; 1662 1663 expr_recovery: 1664 error error_location error_recovery 1666 1665 ; 1667 1666 … … 1755 1754 1756 1755 function: 1757 FUNCTION maybe_space expr ')'maybe_space {1756 FUNCTION maybe_space expr closing_parenthesis maybe_space { 1758 1757 CSSParserFunction* f = parser->createFloatingFunction(); 1759 1758 f->name = $1; … … 1763 1762 $$.function = f; 1764 1763 } | 1765 FUNCTION maybe_space expr TOKEN_EOF { 1766 CSSParserFunction* f = parser->createFloatingFunction(); 1767 f->name = $1; 1768 f->args = parser->sinkFloatingValueList($3); 1769 $$.id = 0; 1770 $$.unit = CSSParserValue::Function; 1771 $$.function = f; 1772 } | 1773 FUNCTION maybe_space ')' maybe_space { 1764 FUNCTION maybe_space closing_parenthesis maybe_space { 1774 1765 CSSParserFunction* f = parser->createFloatingFunction(); 1775 1766 f->name = $1; … … 1789 1780 } 1790 1781 ; 1791 1782 1792 1783 calc_func_term: 1793 1784 unary_term { $$ = $1; } … … 1981 1972 ; 1982 1973 1974 error_recovery: 1975 /* empty */ 1976 | error_recovery invalid_block 1977 | error_recovery error 1978 ; 1979 1983 1980 %% 1984 1981
Note: See TracChangeset
for help on using the changeset viewer.