diff options
author | Mike Kucera | 2009-02-02 19:49:53 +0000 |
---|---|---|
committer | Mike Kucera | 2009-02-02 19:49:53 +0000 |
commit | c97571595e06e2ec4b32fa04518d6305e8b1b92a (patch) | |
tree | 0b584f8173235bf70e23e4a32669dffd631b97cb /lrparser/org.eclipse.cdt.core.lrparser/grammar | |
parent | 62e51214acdb699ef7543af2ba8d11098ab3d906 (diff) | |
download | org.eclipse.cdt-c97571595e06e2ec4b32fa04518d6305e8b1b92a.tar.gz org.eclipse.cdt-c97571595e06e2ec4b32fa04518d6305e8b1b92a.tar.xz org.eclipse.cdt-c97571595e06e2ec4b32fa04518d6305e8b1b92a.zip |
bug 39698 min and max operators for LR parser
Diffstat (limited to 'lrparser/org.eclipse.cdt.core.lrparser/grammar')
-rw-r--r-- | lrparser/org.eclipse.cdt.core.lrparser/grammar/gnu/GNUExtensions.g | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/gnu/GNUExtensions.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/gnu/GNUExtensions.g index 7d68e207f24..de45b9fb328 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/gnu/GNUExtensions.g +++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/gnu/GNUExtensions.g @@ -19,10 +19,13 @@ $Terminals typeof __alignof__ - MAX - MIN __attribute__ __declspec + MAX + MIN + + MAX ::= '>?' + MIN ::= '<?' $End @@ -147,6 +150,12 @@ unary_expression /. $Build consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); $EndBuild ./ +relational_expression + ::= relational_expression '>?' shift_expression + /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); $EndBuild ./ + | relational_expression '<?' shift_expression + /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); $EndBuild ./ + typeof_type_specifier |