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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 %type <boolean> decl_list | 343 %type <boolean> decl_list |
344 %type <boolean> declaration | 344 %type <boolean> declaration |
345 %type <boolean> declarations_and_margins | 345 %type <boolean> declarations_and_margins |
346 | 346 |
347 %type <boolean> prio | 347 %type <boolean> prio |
348 | 348 |
349 %type <integer> match | 349 %type <integer> match |
350 %type <integer> unary_operator | 350 %type <integer> unary_operator |
351 %type <integer> maybe_unary_operator | 351 %type <integer> maybe_unary_operator |
352 %type <character> operator | 352 %type <character> operator |
| 353 %type <character> slash_operator |
353 | 354 |
354 %type <valueList> expr | 355 %type <valueList> expr |
355 %type <value> term | 356 %type <value> term |
356 %type <value> unary_term | 357 %type <value> unary_term |
357 %type <value> function | 358 %type <value> function |
358 %type <value> calc_func_term | 359 %type <value> calc_func_term |
359 %type <character> calc_func_operator | 360 %type <character> calc_func_operator |
360 %type <valueList> calc_func_expr | 361 %type <valueList> calc_func_expr |
361 %type <valueList> calc_func_paren_expr | 362 %type <valueList> calc_func_paren_expr |
362 %type <value> calc_function | 363 %type <value> calc_function |
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 } | 1601 } |
1601 | expr operator term { | 1602 | expr operator term { |
1602 $$ = $1; | 1603 $$ = $1; |
1603 $$->addValue(makeOperatorValue($2)); | 1604 $$->addValue(makeOperatorValue($2)); |
1604 $$->addValue(parser->sinkFloatingValue($3)); | 1605 $$->addValue(parser->sinkFloatingValue($3)); |
1605 } | 1606 } |
1606 | expr term { | 1607 | expr term { |
1607 $$ = $1; | 1608 $$ = $1; |
1608 $$->addValue(parser->sinkFloatingValue($2)); | 1609 $$->addValue(parser->sinkFloatingValue($2)); |
1609 } | 1610 } |
| 1611 | expr slash_operator slash_operator term { |
| 1612 $$ = $1; |
| 1613 $$->addValue(makeOperatorValue($2)); |
| 1614 $$->addValue(makeOperatorValue($3)); |
| 1615 $$->addValue(parser->sinkFloatingValue($4)); |
| 1616 } |
1610 ; | 1617 ; |
1611 | 1618 |
1612 expr_recovery: | 1619 expr_recovery: |
1613 error error_location error_recovery { | 1620 error error_location error_recovery { |
1614 parser->reportError($2, PropertyDeclarationCSSError); | 1621 parser->reportError($2, PropertyDeclarationCSSError); |
1615 } | 1622 } |
1616 ; | 1623 ; |
1617 | 1624 |
| 1625 slash_operator: |
| 1626 '/' maybe_space { |
| 1627 $$ = '/'; |
| 1628 } |
| 1629 ; |
| 1630 |
1618 operator: | 1631 operator: |
1619 '/' maybe_space { | 1632 slash_operator |
1620 $$ = '/'; | |
1621 } | |
1622 | ',' maybe_space { | 1633 | ',' maybe_space { |
1623 $$ = ','; | 1634 $$ = ','; |
1624 } | 1635 } |
1625 ; | 1636 ; |
1626 | 1637 |
1627 term: | 1638 term: |
1628 unary_term maybe_space | 1639 unary_term maybe_space |
1629 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; } | 1640 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; } |
1630 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string =
$1; $$.unit = CSSPrimitiveValue::CSS_STRING; } | 1641 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string =
$1; $$.unit = CSSPrimitiveValue::CSS_STRING; } |
1631 | IDENT maybe_space { $$ = makeIdentValue($1); } | 1642 | IDENT maybe_space { $$ = makeIdentValue($1); } |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 ; | 1867 ; |
1857 | 1868 |
1858 rule_error_recovery: | 1869 rule_error_recovery: |
1859 /* empty */ | 1870 /* empty */ |
1860 | rule_error_recovery error | 1871 | rule_error_recovery error |
1861 | rule_error_recovery invalid_square_brackets_block | 1872 | rule_error_recovery invalid_square_brackets_block |
1862 | rule_error_recovery invalid_parentheses_block | 1873 | rule_error_recovery invalid_parentheses_block |
1863 ; | 1874 ; |
1864 | 1875 |
1865 %% | 1876 %% |
OLD | NEW |