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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 %type <boolean> decl_list | 342 %type <boolean> decl_list |
343 %type <boolean> declaration | 343 %type <boolean> declaration |
344 %type <boolean> declarations_and_margins | 344 %type <boolean> declarations_and_margins |
345 | 345 |
346 %type <boolean> prio | 346 %type <boolean> prio |
347 | 347 |
348 %type <integer> match | 348 %type <integer> match |
349 %type <integer> unary_operator | 349 %type <integer> unary_operator |
350 %type <integer> maybe_unary_operator | 350 %type <integer> maybe_unary_operator |
351 %type <character> operator | 351 %type <character> operator |
| 352 %type <character> slash_operator |
352 | 353 |
353 %type <valueList> expr | 354 %type <valueList> expr |
354 %type <value> term | 355 %type <value> term |
355 %type <value> unary_term | 356 %type <value> unary_term |
356 %type <value> function | 357 %type <value> function |
357 %type <value> calc_func_term | 358 %type <value> calc_func_term |
358 %type <character> calc_func_operator | 359 %type <character> calc_func_operator |
359 %type <valueList> calc_func_expr | 360 %type <valueList> calc_func_expr |
360 %type <valueList> calc_func_paren_expr | 361 %type <valueList> calc_func_paren_expr |
361 %type <value> calc_function | 362 %type <value> calc_function |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 } | 1590 } |
1590 | expr operator term { | 1591 | expr operator term { |
1591 $$ = $1; | 1592 $$ = $1; |
1592 $$->addValue(makeOperatorValue($2)); | 1593 $$->addValue(makeOperatorValue($2)); |
1593 $$->addValue(parser->sinkFloatingValue($3)); | 1594 $$->addValue(parser->sinkFloatingValue($3)); |
1594 } | 1595 } |
1595 | expr term { | 1596 | expr term { |
1596 $$ = $1; | 1597 $$ = $1; |
1597 $$->addValue(parser->sinkFloatingValue($2)); | 1598 $$->addValue(parser->sinkFloatingValue($2)); |
1598 } | 1599 } |
| 1600 | expr slash_operator slash_operator term { |
| 1601 $$ = $1; |
| 1602 $$->addValue(makeOperatorValue($2)); |
| 1603 $$->addValue(makeOperatorValue($3)); |
| 1604 $$->addValue(parser->sinkFloatingValue($4)); |
| 1605 } |
1599 ; | 1606 ; |
1600 | 1607 |
1601 expr_recovery: | 1608 expr_recovery: |
1602 error error_location error_recovery { | 1609 error error_location error_recovery { |
1603 parser->reportError($2, PropertyDeclarationCSSError); | 1610 parser->reportError($2, PropertyDeclarationCSSError); |
1604 } | 1611 } |
1605 ; | 1612 ; |
1606 | 1613 |
| 1614 slash_operator: |
| 1615 '/' maybe_space { |
| 1616 $$ = '/'; |
| 1617 } |
| 1618 ; |
| 1619 |
1607 operator: | 1620 operator: |
1608 '/' maybe_space { | 1621 slash_operator |
1609 $$ = '/'; | |
1610 } | |
1611 | ',' maybe_space { | 1622 | ',' maybe_space { |
1612 $$ = ','; | 1623 $$ = ','; |
1613 } | 1624 } |
1614 ; | 1625 ; |
1615 | 1626 |
1616 term: | 1627 term: |
1617 unary_term maybe_space | 1628 unary_term maybe_space |
1618 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; } | 1629 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; } |
1619 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string =
$1; $$.unit = CSSPrimitiveValue::CSS_STRING; } | 1630 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string =
$1; $$.unit = CSSPrimitiveValue::CSS_STRING; } |
1620 | IDENT maybe_space { $$ = makeIdentValue($1); } | 1631 | IDENT maybe_space { $$ = makeIdentValue($1); } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 ; | 1857 ; |
1847 | 1858 |
1848 rule_error_recovery: | 1859 rule_error_recovery: |
1849 /* empty */ | 1860 /* empty */ |
1850 | rule_error_recovery error | 1861 | rule_error_recovery error |
1851 | rule_error_recovery invalid_square_brackets_block | 1862 | rule_error_recovery invalid_square_brackets_block |
1852 | rule_error_recovery invalid_parentheses_block | 1863 | rule_error_recovery invalid_parentheses_block |
1853 ; | 1864 ; |
1854 | 1865 |
1855 %% | 1866 %% |
OLD | NEW |