Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2008-02-05 10:44:08 -0500
committerMike Kucera2008-02-05 10:44:08 -0500
commit80485fce8a4c7f4d063a1bb113bcf770c51b8f76 (patch)
treec8f283617395ed66616f991c81b6d5329de500c9
parenta8f928a682fb85e879920f667b9ae3019d19ed29 (diff)
downloadorg.eclipse.cdt-80485fce8a4c7f4d063a1bb113bcf770c51b8f76.tar.gz
org.eclipse.cdt-80485fce8a4c7f4d063a1bb113bcf770c51b8f76.tar.xz
org.eclipse.cdt-80485fce8a4c7f4d063a1bb113bcf770c51b8f76.zip
multi-parser approach applied to C99
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/build.xml19
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99ExpressionStatementParser.g47
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Grammar.g1002
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99NoCastExpressionParser.g57
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Parser.g1250
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99SizeofExpressionParser.g54
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/c99tu/C99Parser.g1265
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/common.g107
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g3
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java40
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/IASTNodeFactory.java7
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99ASTNodeFactory.java8
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java143
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPASTNodeFactory.java18
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/ICPPASTNodeFactory.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParser.java1250
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParserprs.java1092
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParsersym.java210
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java1244
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParserprs.java1079
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParsersym.java210
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java3542
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parserprs.java1756
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parsersym.java150
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java1244
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParserprs.java1085
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParsersym.java210
27 files changed, 12413 insertions, 4683 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/build.xml b/lrparser/org.eclipse.cdt.core.lrparser/grammar/build.xml
index fe2e4397f7..7733b3ce90 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/build.xml
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/build.xml
@@ -41,11 +41,30 @@
<target name="c99">
<description>Generate the C99 parser</description>
+ <!-- Generate main parser -->
<antcall target="generate">
<param name="grammar_dir" value="c99"/>
<param name="grammar_name" value="C99Parser"/>
<param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
</antcall>
+ <!-- Generate parser for disambiguating declarations vs expression statements -->
+ <antcall target="generate">
+ <param name="grammar_dir" value="c99"/>
+ <param name="grammar_name" value="C99ExpressionStatementParser"/>
+ <param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
+ </antcall>
+ <!-- Generate parser for disambiguating cast expressions vs binary expressions-->
+ <antcall target="generate">
+ <param name="grammar_dir" value="c99"/>
+ <param name="grammar_name" value="C99NoCastExpressionParser"/>
+ <param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
+ </antcall>
+ <!-- Generate parser for disambiguating sizeof expressions -->
+ <antcall target="generate">
+ <param name="grammar_dir" value="c99"/>
+ <param name="grammar_name" value="C99SizeofExpressionParser"/>
+ <param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
+ </antcall>
</target>
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99ExpressionStatementParser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99ExpressionStatementParser.g
new file mode 100644
index 0000000000..b77d2f1905
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99ExpressionStatementParser.g
@@ -0,0 +1,47 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2008 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+%options la=2
+%options package=org.eclipse.cdt.internal.core.dom.lrparser.c99
+%options template=btParserTemplateD.g
+
+-- All we need to do is import the main parser and redefine the start symbol.
+
+$Define
+ $sym_class /. C99ExpressionStatementParsersym ./
+$End
+
+$Import
+ C99Grammar.g
+$End
+
+$Start
+ expression_parser_start
+$End
+
+
+
+$Headers
+/.
+ public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+ }
+./
+$End
+
+$Rules
+
+expression_parser_start
+ ::= expression ';'
+ | ERROR_TOKEN
+ /. $Build consumeExpressionProblem(); $EndBuild ./
+
+$End \ No newline at end of file
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Grammar.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Grammar.g
new file mode 100644
index 0000000000..d0ce8c53fd
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Grammar.g
@@ -0,0 +1,1002 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2008 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+-- TODO "complete" rules can be removed
+
+$Include
+../common.g
+$End
+
+
+$Terminals
+
+ -- Keywords
+
+ auto break case char const continue default do
+ double else enum extern float for goto if
+ inline int long register restrict return short signed
+ sizeof static struct switch typedef union unsigned void
+ volatile while _Bool _Complex _Imaginary
+
+ -- Literals
+
+ integer floating charconst stringlit
+
+ -- identifiers
+ -- Special token that represents identifiers that have been declared as typedefs (lexer feedback hack)
+
+ identifier
+ --TypedefName
+
+ -- Special tokens used in content assist
+
+ Completion
+ EndOfCompletion
+
+ -- Unrecognized token
+
+ Invalid
+
+ -- Punctuation (with aliases to make grammar more readable)
+
+ LeftBracket ::= '['
+ LeftParen ::= '('
+ LeftBrace ::= '{'
+ Dot ::= '.'
+ Arrow ::= '->'
+ PlusPlus ::= '++'
+ MinusMinus ::= '--'
+ And ::= '&'
+ Star ::= '*'
+ Plus ::= '+'
+ Minus ::= '-'
+ Tilde ::= '~'
+ Bang ::= '!'
+ Slash ::= '/'
+ Percent ::= '%'
+ RightShift ::= '>>'
+ LeftShift ::= '<<'
+ LT ::= '<'
+ GT ::= '>'
+ LE ::= '<='
+ GE ::= '>='
+ EQ ::= '=='
+ NE ::= '!='
+ Caret ::= '^'
+ Or ::= '|'
+ AndAnd ::= '&&'
+ OrOr ::= '||'
+ Question ::= '?'
+ Colon ::= ':'
+ DotDotDot ::= '...'
+ Assign ::= '='
+ StarAssign ::= '*='
+ SlashAssign ::= '/='
+ PercentAssign ::= '%='
+ PlusAssign ::= '+='
+ MinusAssign ::= '-='
+ RightShiftAssign ::= '>>='
+ LeftShiftAssign ::= '<<='
+ AndAssign ::= '&='
+ CaretAssign ::= '^='
+ OrAssign ::= '|='
+ Comma ::= ','
+
+ RightBracket -- these four have special rules for content assist
+ RightParen
+ RightBrace
+ SemiColon
+
+
+$End
+
+
+$Globals
+/.
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
+./
+$End
+
+-- TODO move this code into a common template
+
+$Define
+ $build_action_class /. C99BuildASTParserAction ./
+ $resolve_action_class /. C99TypedefTrackerParserAction ./
+ $node_factory_create_expression /. C99ASTNodeFactory.DEFAULT_INSTANCE ./
+$End
+
+
+
+
+--$Start
+-- translation_unit
+--$End
+
+
+
+$Rules
+
+-------------------------------------------------------------------------------------------
+-- AST and Symbol Table Scoping
+-------------------------------------------------------------------------------------------
+
+
+<openscope-ast>
+ ::= $empty
+ /. $Build openASTScope(); $EndBuild ./
+
+
+-------------------------------------------------------------------------------------------
+-- Content assist
+-------------------------------------------------------------------------------------------
+
+-- The EndOfCompletion token is a special token that matches some punctuation.
+-- These tokens allow the parse to complete successfully after a Completion token
+-- is encountered.
+
+
+']' ::=? 'RightBracket'
+ | 'EndOfCompletion'
+
+')' ::=? 'RightParen'
+ | 'EndOfCompletion'
+
+'}' ::=? 'RightBrace'
+ | 'EndOfCompletion'
+
+';' ::=? 'SemiColon'
+ | 'EndOfCompletion'
+
+
+
+-------------------------------------------------------------------------------------------
+-- Expressions
+-------------------------------------------------------------------------------------------
+
+
+literal
+ ::= 'integer'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); $EndBuild ./
+ | 'floating'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); $EndBuild ./
+ | 'charconst'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); $EndBuild ./
+ | 'stringlit'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); $EndBuild ./
+
+
+primary_expression
+ ::= literal
+ | primary_expression_id
+ /. $Build consumeExpressionID(); $EndBuild ./
+ | '(' expression ')'
+ /. $Build consumeExpressionBracketed(); $EndBuild ./
+
+
+primary_expression_id -- Typedefname not allowed as a variable name.
+ ::= 'identifier'
+ | 'Completion'
+
+
+postfix_expression
+ ::= primary_expression
+ | postfix_expression '[' expression ']'
+ /. $Build consumeExpressionArraySubscript(); $EndBuild ./
+ | postfix_expression '(' expression_list_opt ')'
+ /. $Build consumeExpressionFunctionCall(); $EndBuild ./
+ | postfix_expression '.' member_name
+ /. $Build consumeExpressionFieldReference(false); $EndBuild ./
+ | postfix_expression '->' member_name
+ /. $Build consumeExpressionFieldReference(true); $EndBuild ./
+ | postfix_expression '++'
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); $EndBuild ./
+ | postfix_expression '--'
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); $EndBuild ./
+ | '(' type_name ')' '{' <openscope-ast> initializer_list comma_opt '}'
+ /. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./
+
+
+comma_opt
+ ::= ',' | $empty
+
+
+member_name
+ ::= 'identifier'
+ -- | 'TypedefName'
+ | 'Completion'
+
+
+unary_expression
+ ::= postfix_expression
+ | '++' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); $EndBuild ./
+ | '--' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); $EndBuild ./
+ | '&' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); $EndBuild ./
+ | '*' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); $EndBuild ./
+ | '+' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); $EndBuild ./
+ | '-' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); $EndBuild ./
+ | '~' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); $EndBuild ./
+ | '!' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); $EndBuild ./
+ | 'sizeof' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); $EndBuild ./
+ | 'sizeof' '(' type_name ')'
+ /. $Build consumeExpressionSizeofTypeId(); $EndBuild ./
+
+
+cast_expression
+ ::= unary_expression
+ | '(' type_name ')' cast_expression
+ /. $Build consumeExpressionCast(IASTCastExpression.op_cast); $EndBuild ./
+
+
+multiplicative_expression
+ ::= cast_expression
+ | multiplicative_expression '*' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); $EndBuild ./
+ | multiplicative_expression '/' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); $EndBuild ./
+ | multiplicative_expression '%' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); $EndBuild ./
+
+
+additive_expression
+ ::= multiplicative_expression
+ | additive_expression '+' multiplicative_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); $EndBuild ./
+ | additive_expression '-' multiplicative_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); $EndBuild ./
+
+
+shift_expression
+ ::= additive_expression
+ | shift_expression '<<' additive_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); $EndBuild ./
+ | shift_expression '>>' additive_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); $EndBuild ./
+
+
+relational_expression
+ ::= shift_expression
+ | relational_expression '<' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); $EndBuild ./
+ | relational_expression '>' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); $EndBuild ./
+ | relational_expression '<=' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); $EndBuild ./
+ | relational_expression '>=' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); $EndBuild ./
+
+
+equality_expression
+ ::= relational_expression
+ | equality_expression '==' relational_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); $EndBuild ./
+ | equality_expression '!=' relational_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); $EndBuild ./
+
+
+AND_expression
+ ::= equality_expression
+ | AND_expression '&' equality_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); $EndBuild ./
+
+
+exclusive_OR_expression
+ ::= AND_expression
+ | exclusive_OR_expression '^' AND_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); $EndBuild ./
+
+
+inclusive_OR_expression
+ ::= exclusive_OR_expression
+ | inclusive_OR_expression '|' exclusive_OR_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); $EndBuild ./
+
+
+logical_AND_expression
+ ::= inclusive_OR_expression
+ | logical_AND_expression '&&' inclusive_OR_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); $EndBuild ./
+
+
+logical_OR_expression
+ ::= logical_AND_expression
+ | logical_OR_expression '||' logical_AND_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); $EndBuild ./
+
+
+conditional_expression
+ ::= logical_OR_expression
+ | logical_OR_expression '?' expression ':' conditional_expression
+ /. $Build consumeExpressionConditional(); $EndBuild ./
+
+
+assignment_expression
+ ::= conditional_expression
+ | unary_expression '=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); $EndBuild ./
+ | unary_expression '*=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); $EndBuild ./
+ | unary_expression '/=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); $EndBuild ./
+ | unary_expression '%=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); $EndBuild ./
+ | unary_expression '+=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); $EndBuild ./
+ | unary_expression '-=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); $EndBuild ./
+ | unary_expression '<<=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); $EndBuild ./
+ | unary_expression '>>=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); $EndBuild ./
+ | unary_expression '&=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); $EndBuild ./
+ | unary_expression '^=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); $EndBuild ./
+ | unary_expression '|=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); $EndBuild ./
+
+
+-- special rule to avoid conflict between problem statements and problem expressions
+expression_in_statement
+ ::= expression_list
+
+
+expression
+ ::= expression_list
+
+
+expression_list
+ ::= <openscope-ast> expression_list_actual
+ /. $Build consumeExpressionList(); $EndBuild ./
+
+
+expression_list_opt
+ ::= expression_list
+ | $empty
+ /. $Build consumeEmpty(); $EndBuild ./
+
+
+expression_list_actual
+ ::= assignment_expression
+ | expression_list_actual ',' assignment_expression
+
+
+constant_expression
+ ::= conditional_expression
+
+
+-------------------------------------------------------------------------------------------
+-- Statements
+-------------------------------------------------------------------------------------------
+
+
+
+statement
+ ::= labeled_statement
+ | compound_statement
+ | expression_statement
+ | selection_statement
+ | iteration_statement
+ | jump_statement
+ | ERROR_TOKEN
+ /. $Build consumeStatementProblem(); $EndBuild ./
+
+
+labeled_statement
+ ::= identifier_or_typedefname ':' statement
+ /. $Build consumeStatementLabeled(); $EndBuild ./
+ | 'case' constant_expression ':'
+ /. $Build consumeStatementCase(); $EndBuild ./
+ | 'default' ':'
+ /. $Build consumeStatementDefault(); $EndBuild ./
+
+
+compound_statement
+ ::= '{' '}'
+ /. $Build consumeStatementCompoundStatement(false); $EndBuild ./
+ | '{' <openscope-ast> block_item_list '}'
+ /. $Build consumeStatementCompoundStatement(true); $EndBuild ./
+
+
+block_item_list
+ ::= block_item
+ | block_item_list block_item
+
+
+block_item
+ ::= statement
+ | declaration
+ /. $Build consumeStatementDeclaration(); $EndBuild ./
+
+
+expression_statement
+ ::= ';'
+ /. $Build consumeStatementNull(); $EndBuild ./
+ | expression_in_statement ';'
+ /. $Build consumeStatementExpression(); $EndBuild ./
+
+
+selection_statement
+ ::= 'if' '(' expression ')' statement
+ /. $Build consumeStatementIf(false); $EndBuild ./
+ | 'if' '(' expression ')' statement 'else' statement
+ /. $Build consumeStatementIf(true); $EndBuild ./
+ | 'switch' '(' expression ')' statement
+ /. $Build consumeStatementSwitch(); $EndBuild ./
+
+
+expression_opt
+ ::= expression
+ | $empty
+ /. $Build consumeEmpty(); $EndBuild ./
+
+
+iteration_statement
+ ::= 'do' statement 'while' '(' expression ')' ';'
+ /. $Build consumeStatementDoLoop(); $EndBuild ./
+ | 'while' '(' expression ')' statement
+ /. $Build consumeStatementWhileLoop(); $EndBuild ./
+ | 'for' '(' expression_opt ';' expression_opt ';' expression_opt ')' statement
+ /. $Build consumeStatementForLoop(); $EndBuild ./
+ | 'for' '(' declaration expression_opt ';' expression_opt ')' statement
+ /. $Build consumeStatementForLoop(); $EndBuild ./
+
+
+jump_statement
+ ::= 'goto' identifier_or_typedefname ';'
+ /. $Build consumeStatementGoto(); $EndBuild ./
+ | 'continue' ';'
+ /. $Build consumeStatementContinue(); $EndBuild ./
+ | 'break' ';'
+ /. $Build consumeStatementBreak(); $EndBuild ./
+ | 'return' ';'
+ /. $Build consumeStatementReturn(false); $EndBuild ./
+ | 'return' expression ';'
+ /. $Build consumeStatementReturn(true); $EndBuild ./
+
+
+
+-------------------------------------------------------------------------------------------
+-- Declarations
+-------------------------------------------------------------------------------------------
+
+
+
+declaration
+ ::= declaration_specifiers ';'
+ /. $Build consumeDeclarationSimple(false); $EndBuild ./
+ | declaration_specifiers <openscope-ast> init_declarator_list ';'
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
+
+
+declaration_specifiers
+ ::= <openscope-ast> simple_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersSimple(); $EndBuild ./
+ | <openscope-ast> struct_or_union_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-ast> elaborated_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-ast> enum_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-ast> typdef_name_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersTypedefName(); $EndBuild ./
+
+
+no_type_declaration_specifier
+ ::= storage_class_specifier
+ | type_qualifier
+ | function_specifier
+
+
+no_type_declaration_specifiers
+ ::= no_type_declaration_specifier
+ | no_type_declaration_specifiers no_type_declaration_specifier
+
+
+simple_declaration_specifiers
+ ::= simple_type_specifier
+ | no_type_declaration_specifiers simple_type_specifier
+ | simple_declaration_specifiers simple_type_specifier
+ | simple_declaration_specifiers no_type_declaration_specifier
+
+
+struct_or_union_declaration_specifiers
+ ::= struct_or_union_specifier
+ | no_type_declaration_specifiers struct_or_union_specifier
+ | struct_or_union_declaration_specifiers no_type_declaration_specifier
+
+
+elaborated_declaration_specifiers
+ ::= elaborated_specifier
+ | no_type_declaration_specifiers elaborated_specifier
+ | elaborated_declaration_specifiers no_type_declaration_specifier
+
+
+enum_declaration_specifiers
+ ::= enum_specifier
+ | no_type_declaration_specifiers enum_specifier
+ | enum_declaration_specifiers no_type_declaration_specifier
+
+
+typdef_name_declaration_specifiers
+ ::= typedef_name_in_declspec
+ | no_type_declaration_specifiers typedef_name_in_declspec
+ | typdef_name_declaration_specifiers no_type_declaration_specifier
+
+
+init_declarator_list
+ ::= init_declarator
+ | init_declarator_list ',' init_declarator
+
+
+init_declarator
+ ::= complete_declarator
+ | complete_declarator '=' initializer
+ /. $Build consumeDeclaratorWithInitializer(true); $EndBuild ./
+
+
+complete_declarator
+ ::= declarator
+
+
+storage_class_specifier
+ ::= storage_class_specifier_token
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+
+
+storage_class_specifier_token
+ ::= 'typedef'
+ | 'extern'
+ | 'static'
+ | 'auto'
+ | 'register'
+
+
+simple_type_specifier
+ ::= simple_type_specifier_token
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+
+simple_type_specifier_token
+ ::= 'void'
+ | 'char'
+ | 'short'
+ | 'int'
+ | 'long'
+ | 'float'
+ | 'double'
+ | 'signed'
+ | 'unsigned'
+ | '_Bool'
+ | '_Complex'
+ | '_Imaginary'
+
+
+typedef_name_in_declspec
+ ::= 'Completion'
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+ | 'identifier'
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+ -- | 'TypedefName' -- remove identifier if this is uncommented
+
+
+
+identifier_or_typedefname
+ ::= 'identifier'
+ | 'Completion'
+ -- | 'TypedefName'
+
+
+struct_or_union_specifier
+ ::= 'struct' '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+ | 'struct' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+
+
+elaborated_specifier
+ ::= 'struct' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+ | 'enum' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); $EndBuild ./
+
+
+struct_declaration_list_opt
+ ::= struct_declaration_list
+ | $empty
+
+struct_declaration_list
+ ::= struct_declaration
+ | struct_declaration_list struct_declaration
+
+
+struct_declaration
+ ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ';' -- regular declarators plus bit fields
+ /. $Build consumeStructDeclaration(true); $EndBuild ./
+ | specifier_qualifier_list ';'
+ /. $Build consumeStructDeclaration(false); $EndBuild ./
+
+
+-- just reuse declaration_specifiers, makes grammar a bit more lenient but thats OK
+specifier_qualifier_list
+ ::= declaration_specifiers
+
+
+struct_declarator_list
+ ::= complete_struct_declarator
+ | struct_declarator_list ',' complete_struct_declarator
+
+
+complete_struct_declarator
+ ::= struct_declarator
+
+
+struct_declarator
+ ::= declarator
+ | ':' constant_expression
+ /. $Build consumeBitField(false); $EndBuild ./
+ | declarator ':' constant_expression
+ /. $Build consumeBitField(true); $EndBuild ./
+
+
+enum_specifier
+ ::= 'enum' '{' <openscope-ast> enumerator_list_opt comma_opt '}'
+ /. $Build consumeTypeSpecifierEnumeration(false); $EndBuild ./
+ | 'enum' identifier_or_typedefname '{' <openscope-ast> enumerator_list_opt comma_opt '}'
+ /. $Build consumeTypeSpecifierEnumeration(true); $EndBuild ./
+
+
+enumerator_list_opt
+ ::= enumerator_list
+ | $empty
+
+
+enumerator_list
+ ::= enumerator
+ | enumerator_list ',' enumerator
+
+
+enumerator
+ ::= identifier_or_typedefname
+ /. $Build consumeEnumerator(false); $EndBuild ./
+ | identifier_or_typedefname '=' constant_expression
+ /. $Build consumeEnumerator(true); $EndBuild ./
+
+
+type_qualifier
+ ::= type_qualifier_token
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+
+
+type_qualifier_token
+ ::= 'const'
+ | 'restrict'
+ | 'volatile'
+
+
+function_specifier
+ ::= 'inline'
+ /. $Build consumeDeclSpecToken(); $EndBuild ./
+
+
+declarator
+ ::= direct_declarator
+ | <openscope-ast> pointer_seq direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+direct_declarator
+ ::= array_direct_declarator
+ | function_prototype_direct_declarator
+ | basic_direct_declarator
+ | knr_direct_declarator
+
+
+basic_direct_declarator
+ ::= declarator_id_name
+ /. $Build consumeDirectDeclaratorIdentifier(); $EndBuild ./
+ | '(' declarator ')'
+ /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
+
+
+declarator_id_name
+ ::= 'identifier'
+ /. $Build consumeIdentifierName(); $EndBuild ./
+
+
+array_direct_declarator
+ ::= basic_direct_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+ | array_direct_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+
+
+function_prototype_direct_declarator
+ ::= function_direct_declarator
+
+
+function_direct_declarator
+ ::= basic_direct_declarator '(' <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
+ | basic_direct_declarator '(' ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
+
+
+function_declarator
+ ::= function_direct_declarator
+ | <openscope-ast> pointer_seq function_direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+-- This is a hack because the parser cannot tell the difference between
+-- plain identifiers and types. Because of this an identifier_list would
+-- always be parsed as a parameter_type_list instead. In a KnR funciton
+-- definition we can use the extra list of declarators to disambiguate.
+-- This rule should be merged back into direct_declarator if type info is
+-- added to the parser.
+
+knr_direct_declarator
+ ::= basic_direct_declarator '(' <openscope-ast> identifier_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclaratorKnR(); $EndBuild ./
+
+
+knr_function_declarator
+ ::= knr_direct_declarator
+ | <openscope-ast> pointer_seq knr_direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+identifier_list
+ ::= 'identifier'
+ /. $Build consumeIdentifierKnR(); $EndBuild ./
+ | identifier_list ',' 'identifier'
+ /. $Build consumeIdentifierKnR(); $EndBuild ./
+
+
+array_modifier
+ ::= '[' ']'
+ /. $Build consumeDirectDeclaratorArrayModifier(false); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); $EndBuild ./
+ | '[' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorArrayModifier(true); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); $EndBuild ./
+ | '[' 'static' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); $EndBuild ./
+ | '[' 'static' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers 'static' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
+ | '[' '*' ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers '*' ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); $EndBuild ./
+
+
+array_modifier_type_qualifiers
+ ::= type_qualifier_list
+
+
+pointer_seq
+ ::= '*'
+ /. $Build consumePointer(); $EndBuild ./
+ | pointer_seq '*'
+ /. $Build consumePointer(); $EndBuild ./
+ | '*' <openscope-ast> type_qualifier_list
+ /. $Build consumePointerTypeQualifierList(); $EndBuild ./
+ | pointer_seq '*' <openscope-ast> type_qualifier_list
+ /. $Build consumePointerTypeQualifierList(); $EndBuild ./
+
+
+type_qualifier_list
+ ::= type_qualifier
+ | type_qualifier_list type_qualifier
+
+
+parameter_type_list
+ ::= parameter_list
+ /. $Build consumeEmpty(); $EndBuild ./
+ | parameter_list ',' '...'
+ /. $Build consumePlaceHolder(); $EndBuild ./
+ | '...' -- not spec
+ /. $Build consumePlaceHolder(); $EndBuild ./
+
+
+parameter_list
+ ::= parameter_declaration
+ | parameter_list ',' parameter_declaration
+
+
+parameter_declaration
+ ::= declaration_specifiers complete_parameter_declarator
+ /. $Build consumeParameterDeclaration(); $EndBuild ./
+ | declaration_specifiers
+ /. $Build consumeParameterDeclarationWithoutDeclarator(); $EndBuild ./
+
+
+complete_parameter_declarator
+ ::= declarator
+ | abstract_declarator
+
+
+
+-- only used in expressions, eg) sizeof, casts etc...
+type_name
+ ::= specifier_qualifier_list
+ /. $Build consumeTypeId(false); $EndBuild ./
+ | specifier_qualifier_list abstract_declarator
+ /. $Build consumeTypeId(true); $EndBuild ./
+
+
+abstract_declarator -- a declarator that does not include an identifier
+ ::= direct_abstract_declarator
+ | <openscope-ast> pointer_seq
+ /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
+ | <openscope-ast> pointer_seq direct_abstract_declarator
+ /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
+
+
+direct_abstract_declarator
+ ::= basic_direct_abstract_declarator
+ | array_direct_abstract_declarator
+ | function_direct_abstract_declarator
+
+
+basic_direct_abstract_declarator
+ ::= '(' abstract_declarator ')'
+ /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
+
+
+array_direct_abstract_declarator
+ ::= array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(false); $EndBuild ./
+ | array_direct_abstract_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+ | basic_direct_abstract_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+
+
+function_direct_abstract_declarator
+ ::= '(' ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(false, false); $EndBuild ./
+ | basic_direct_abstract_declarator '(' ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
+ | '(' <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(false, true); $EndBuild ./
+ | basic_direct_abstract_declarator '(' <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
+
+
+initializer
+ ::= assignment_expression
+ /. $Build consumeInitializer(); $EndBuild ./
+ | '{' <openscope-ast> initializer_list comma_opt '}'
+ /. $Build consumeInitializerList(); $EndBuild ./
+
+
+initializer_list
+ ::= initializer
+ | designated_initializer
+ | initializer_list ',' initializer
+ | initializer_list ',' designated_initializer
+
+
+designated_initializer
+ ::= <openscope-ast> designation '=' initializer
+ /. $Build consumeInitializerDesignated(); $EndBuild ./
+
+
+designation
+ ::= designator_list
+
+
+designator_list
+ ::= designator_base
+ | designator_list designator
+
+
+designator_base
+ ::= '[' constant_expression ']'
+ /. $Build consumeDesignatorArray(); $EndBuild ./
+ | '.' identifier_or_typedefname
+ /. $Build consumeDesignatorField(); $EndBuild ./
+
+designator
+ ::= '[' constant_expression ']'
+ /. $Build consumeDesignatorArray(); $EndBuild ./
+ | '.' identifier_or_typedefname
+ /. $Build consumeDesignatorField(); $EndBuild ./
+
+
+-------------------------------------------------------------------------------------------
+-- External Definitions
+-------------------------------------------------------------------------------------------
+
+translation_unit
+ ::= external_declaration_list
+ /. $Build consumeTranslationUnit(); $EndBuild ./
+ | $empty
+ /. $Build consumeTranslationUnit(); $EndBuild ./
+
+
+external_declaration_list
+ ::= external_declaration
+ | external_declaration_list external_declaration
+
+
+external_declaration
+ ::= function_definition
+ | declaration
+ | ';'
+ /. $Build consumeDeclarationEmpty(); $EndBuild ./
+ | ERROR_TOKEN
+ /. $Build consumeDeclarationProblem(); $EndBuild ./
+
+
+-- Used by KnR
+declaration_list
+ ::= declaration
+ | declaration_list declaration
+
+
+-- The extra <openscope-ast> nonterminal before declarator in this rule is only there
+-- to avoid a shift/reduce error with the rule for declaration.
+-- The symbol table scoped is opened in the rule for function_direct_declarator
+function_definition
+ ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ /. $Build consumeFunctionDefinition(true); $EndBuild ./
+ -- this rule is here as a special case (its not C99 spec) just to support implicit int in function definitions
+ | <openscope-ast> function_declarator function_body
+ /. $Build consumeFunctionDefinition(false); $EndBuild ./
+ | declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ /. $Build consumeFunctionDefinitionKnR(); $EndBuild ./
+
+
+-- same syntax as compound_statement but a symbol table scope isn't opened
+function_body
+ ::= '{' '}'
+ /. $Build consumeStatementCompoundStatement(false); $EndBuild ./
+ | '{' <openscope-ast> block_item_list '}'
+ /. $Build consumeStatementCompoundStatement(true); $EndBuild ./
+
+$End
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99NoCastExpressionParser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99NoCastExpressionParser.g
new file mode 100644
index 0000000000..2d7c6f51ff
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99NoCastExpressionParser.g
@@ -0,0 +1,57 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2008 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+%options la=2
+%options package=org.eclipse.cdt.internal.core.dom.lrparser.c99
+%options template=btParserTemplateD.g
+
+
+$Define
+ $sym_class /. C99NoCastExpressionParsersym ./
+$End
+
+$Import
+ C99Grammar.g
+
+$DropRules
+
+cast_expression
+ ::= '(' type_name ')' cast_expression
+
+-- The following rule remains in the grammar:
+-- cast_expression ::= unary_expression
+
+$End
+
+
+$Start
+ no_cast_start
+$End
+
+
+
+$Headers
+/.
+ public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+ }
+./
+$End
+
+
+$Rules
+
+no_cast_start
+ ::= expression
+ | ERROR_TOKEN
+ /. $Build consumeExpressionProblem(); $EndBuild ./
+
+$End \ No newline at end of file
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Parser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Parser.g
index e313c24b6e..79573ff2a2 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Parser.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99Parser.g
@@ -11,1255 +11,17 @@
%options la=2
%options package=org.eclipse.cdt.internal.core.dom.lrparser.c99
-%options template=TrialUndoParserTemplate.g
-
---$Include
---../common.g
---$End
-
-$Notice
--- Copied into all files generated by LPG
-/./*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *********************************************************************************/
-
- // This file was generated by LPG
-./
-$End
-
-$Terminals
-
- -- Keywords
-
- auto break case char const continue default do
- double else enum extern float for goto if
- inline int long register restrict return short signed
- sizeof static struct switch typedef union unsigned void
- volatile while _Bool _Complex _Imaginary
-
- -- Literals
-
- integer floating charconst stringlit
-
- -- identifiers
- -- Special token that represents identifiers that have been declared as typedefs (lexer feedback hack)
-
- identifier
- TypedefName
-
- -- Special tokens used in content assist
-
- Completion
- EndOfCompletion
-
- -- Unrecognized token
-
- Invalid
-
- -- Punctuation (with aliases to make grammar more readable)
-
- LeftBracket ::= '['
- LeftParen ::= '('
- LeftBrace ::= '{'
- Dot ::= '.'
- Arrow ::= '->'
- PlusPlus ::= '++'
- MinusMinus ::= '--'
- And ::= '&'
- Star ::= '*'
- Plus ::= '+'
- Minus ::= '-'
- Tilde ::= '~'
- Bang ::= '!'
- Slash ::= '/'
- Percent ::= '%'
- RightShift ::= '>>'
- LeftShift ::= '<<'
- LT ::= '<'
- GT ::= '>'
- LE ::= '<='
- GE ::= '>='
- EQ ::= '=='
- NE ::= '!='
- Caret ::= '^'
- Or ::= '|'
- AndAnd ::= '&&'
- OrOr ::= '||'
- Question ::= '?'
- Colon ::= ':'
- DotDotDot ::= '...'
- Assign ::= '='
- StarAssign ::= '*='
- SlashAssign ::= '/='
- PercentAssign ::= '%='
- PlusAssign ::= '+='
- MinusAssign ::= '-='
- RightShiftAssign ::= '>>='
- LeftShiftAssign ::= '<<='
- AndAssign ::= '&='
- CaretAssign ::= '^='
- OrAssign ::= '|='
- Comma ::= ','
-
- RightBracket -- these four have special rules for content assist
- RightParen
- RightBrace
- SemiColon
-
-
-$End
-
-
-$Globals
-/.
- import java.util.*;
-
- import org.eclipse.cdt.core.dom.ast.*;
- import org.eclipse.cdt.core.dom.lrparser.IParser;
- import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
- import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
- import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
- import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
- import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
-./
-$End
-
--- TODO move this code into a common template
+%options template=btParserTemplateD.g
+-- All we need to do is import the main parser and redefine the start symbol.
$Define
- $build_action_class /. C99BuildASTParserAction ./
- $resolve_action_class /. C99TypedefTrackerParserAction ./
- $node_factory_create_expression /. C99ASTNodeFactory.DEFAULT_INSTANCE ./
$sym_class /. C99Parsersym ./
- $lexer_class /. C99Lexer ./
- $action_class /. C99ParserAction ./
$End
-
-
-
-
-$Define
- -- These macros allow the template and header code to be customized by an extending parser.
- $ast_class /.Object./
- $data_class /. Object ./ -- allow anything to be passed between actions
-
- --$additional_interfaces /. , IParserActionTokenProvider, IParser ./
- $additional_interfaces /. ./
- --$build_action_class /. ./
- --$resolve_action_class /. ./
- --$node_factory_create_expression /. ./
-
-
- --$lexer_class /. ./
- --$action_class /. ./
-
-
- $UndoResolver /.$Undo action.resolver.undo(); $EndUndo./
-
- $Resolve /. $BeginTrial $resolve.
- ./
- $EndResolve /. $EndTrial
- $UndoResolver
- ./ -- undo actions are automatically generated for binding resolution actions
-
- $Builder /. $BeginFinal $builder.
- ./
- $EndBuilder /. /*$builder.getASTStack().print();*/ $EndFinal ./
-
- $Build /. $Action $Builder ./
- $EndBuild /. $EndBuilder $EndAction ./
-
- $resolve /. action.resolver./
- $builder /. action.builder./
-
-
--- comment out when using trial/undo
- --$Action /. $BeginAction ./
- --$BeginFinal /. ./
- --$EndFinal /. ./
- --$BeginTrial /. ./
- --$EndTrial /. ./
- --$Undo /. ./
- --$EndUndo /. ./
-$End
-
-
-$Headers
-/.
- private $action_class action;
-
- //public $action_type() { // constructor
- //}
-
- private void initActions(IASTTranslationUnit tu) {
- // binding resolution actions need access to IASTName nodes, temporary
- action = new $action_class();
- action.resolver = new $resolve_action_class(this);
- action.builder = new $build_action_class($node_factory_create_expression, this, tu);
- action.builder.setTokenMap($sym_class.orderedTerminalSymbols);
- setParserAction(action);
- }
-
-
- public void addToken(IToken token) {
- token.setKind(mapKind(token.getKind()));
- super.addToken(token);
- }
-
- public void setTokens(List<IToken> tokens) {
- resetTokenStream();
- for(IToken token : tokens) {
- addToken(token);
- }
- }
-
- public IASTCompletionNode parse(IASTTranslationUnit tu) {
- // this has to be done, or... kaboom!
- setStreamLength(getSize());
- initActions(tu);
-
- final int errorRepairCount = -1; // -1 means full error handling
- parser(null, errorRepairCount); // do the actual parse
- super.resetTokenStream(); // allow tokens to be garbage collected
-
- // the completion node may be null
- IASTCompletionNode compNode = action.builder.getASTCompletionNode();
-
- action = null;
- parserAction = null;
- return compNode;
- }
-
-
- public int getKind(int i) {
- int kind = super.getKind(i);
- // lexer feedback hack!
- if(kind == $sym_class.TK_identifier && action.resolver.isTypedef(getTokenText(i))) {
- kind = $sym_class.TK_TypedefName;
- }
- return kind;
- }
-
-./
+$Import
+ C99Grammar.g
$End
$Start
- translation_unit
-$End
-
-
-
-$Rules
-
--------------------------------------------------------------------------------------------
--- AST and Symbol Table Scoping
--------------------------------------------------------------------------------------------
-
-
-<openscope-ast>
- ::= $empty
- /.$Action $Builder openASTScope(); $EndBuilder $EndAction./
-
-<openscope-symbol>
- ::= $empty
- /.$Action $Resolve openSymbolScope(); $EndResolve $EndAction./
-
-<openscope-declaration>
- ::= $empty
- /.$Action $Resolve openDeclarationScope(); $EndResolve $EndAction./
-
--------------------------------------------------------------------------------------------
--- Content assist
--------------------------------------------------------------------------------------------
-
--- The EndOfCompletion token is a special token that matches some punctuation.
--- These tokens allow the parse to complete successfully after a Completion token
--- is encountered.
-
-
-']' ::=? 'RightBracket'
- | 'EndOfCompletion'
-
-')' ::=? 'RightParen'
- | 'EndOfCompletion'
-
-'}' ::=? 'RightBrace'
- | 'EndOfCompletion'
-
-';' ::=? 'SemiColon'
- | 'EndOfCompletion'
-
-
-
--------------------------------------------------------------------------------------------
--- Expressions
--------------------------------------------------------------------------------------------
-
-
-literal
- ::= 'integer'
- /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); $EndBuild ./
- | 'floating'
- /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); $EndBuild ./
- | 'charconst'
- /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); $EndBuild ./
- | 'stringlit'
- /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); $EndBuild ./
-
-
-primary_expression
- ::= literal
- | primary_expression_id
- /. $Build consumeExpressionID(); $EndBuild ./
- | '(' expression ')'
- /. $Build consumeExpressionBracketed(); $EndBuild ./
-
-
-primary_expression_id -- Typedefname not allowed as a variable name.
- ::= 'identifier'
- | 'Completion'
-
-
-postfix_expression
- ::= primary_expression
- | postfix_expression '[' expression ']'
- /. $Build consumeExpressionArraySubscript(); $EndBuild ./
- | postfix_expression '(' expression_list_opt ')'
- /. $Build consumeExpressionFunctionCall(); $EndBuild ./
- | postfix_expression '.' member_name
- /. $Build consumeExpressionFieldReference(false); $EndBuild ./
- | postfix_expression '->' member_name
- /. $Build consumeExpressionFieldReference(true); $EndBuild ./
- | postfix_expression '++'
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); $EndBuild ./
- | postfix_expression '--'
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); $EndBuild ./
- | '(' type_name ')' '{' <openscope-ast> initializer_list comma_opt '}'
- /. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./
-
-
-comma_opt
- ::= ',' | $empty
-
-
-member_name
- ::= 'identifier'
- | 'TypedefName'
- | 'Completion'
-
-
-unary_expression
- ::= postfix_expression
- | '++' unary_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); $EndBuild ./
- | '--' unary_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); $EndBuild ./
- | '&' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); $EndBuild ./
- | '*' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); $EndBuild ./
- | '+' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); $EndBuild ./
- | '-' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); $EndBuild ./
- | '~' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); $EndBuild ./
- | '!' cast_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); $EndBuild ./
- | 'sizeof' unary_expression
- /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); $EndBuild ./
- | 'sizeof' '(' type_name ')'
- /. $Build consumeExpressionTypeId(IASTTypeIdExpression.op_sizeof); $EndBuild ./
-
-
-cast_expression
- ::= unary_expression
- | '(' type_name ')' cast_expression
- /. $Build consumeExpressionCast(IASTCastExpression.op_cast); $EndBuild ./
-
-
-multiplicative_expression
- ::= cast_expression
- | multiplicative_expression '*' cast_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); $EndBuild ./
- | multiplicative_expression '/' cast_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); $EndBuild ./
- | multiplicative_expression '%' cast_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); $EndBuild ./
-
-
-additive_expression
- ::= multiplicative_expression
- | additive_expression '+' multiplicative_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); $EndBuild ./
- | additive_expression '-' multiplicative_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); $EndBuild ./
-
-
-shift_expression
- ::= additive_expression
- | shift_expression '<<' additive_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); $EndBuild ./
- | shift_expression '>>' additive_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); $EndBuild ./
-
-
-relational_expression
- ::= shift_expression
- | relational_expression '<' shift_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); $EndBuild ./
- | relational_expression '>' shift_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); $EndBuild ./
- | relational_expression '<=' shift_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); $EndBuild ./
- | relational_expression '>=' shift_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); $EndBuild ./
-
-
-equality_expression
- ::= relational_expression
- | equality_expression '==' relational_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); $EndBuild ./
- | equality_expression '!=' relational_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); $EndBuild ./
-
-
-AND_expression
- ::= equality_expression
- | AND_expression '&' equality_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); $EndBuild ./
-
-
-exclusive_OR_expression
- ::= AND_expression
- | exclusive_OR_expression '^' AND_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); $EndBuild ./
-
-
-inclusive_OR_expression
- ::= exclusive_OR_expression
- | inclusive_OR_expression '|' exclusive_OR_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); $EndBuild ./
-
-
-logical_AND_expression
- ::= inclusive_OR_expression
- | logical_AND_expression '&&' inclusive_OR_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); $EndBuild ./
-
-
-logical_OR_expression
- ::= logical_AND_expression
- | logical_OR_expression '||' logical_AND_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); $EndBuild ./
-
-
-conditional_expression
- ::= logical_OR_expression
- | logical_OR_expression '?' expression ':' conditional_expression
- /. $Build consumeExpressionConditional(); $EndBuild ./
-
-
-assignment_expression
- ::= conditional_expression
- | unary_expression '=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); $EndBuild ./
- | unary_expression '*=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); $EndBuild ./
- | unary_expression '/=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); $EndBuild ./
- | unary_expression '%=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); $EndBuild ./
- | unary_expression '+=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); $EndBuild ./
- | unary_expression '-=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); $EndBuild ./
- | unary_expression '<<=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); $EndBuild ./
- | unary_expression '>>=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); $EndBuild ./
- | unary_expression '&=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); $EndBuild ./
- | unary_expression '^=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); $EndBuild ./
- | unary_expression '|=' assignment_expression
- /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); $EndBuild ./
-
-
--- special rule to avoid conflict between problem statements and problem expressions
-expression_in_statement
- ::= expression_list
-
-
-expression
- ::= expression_list
-
-
-expression_list
- ::= <openscope-ast> expression_list_actual
- /. $Build consumeExpressionList(); $EndBuild ./
-
-
-expression_list_opt
- ::= expression_list
- | $empty
- /. $Build consumeEmpty(); $EndBuild ./
-
-
-expression_list_actual
- ::= assignment_expression
- | expression_list_actual ',' assignment_expression
-
-
-constant_expression
- ::= conditional_expression
-
-
--------------------------------------------------------------------------------------------
--- Statements
--------------------------------------------------------------------------------------------
-
-
-
-statement
- ::= labeled_statement
- | compound_statement
- | expression_statement
- | selection_statement
- | iteration_statement
- | jump_statement
- | ERROR_TOKEN
- /. $Build consumeStatementProblem(); $EndBuild ./
-
-
-labeled_statement
- ::= identifier_or_typedefname ':' statement
- /. $Build consumeStatementLabeled(); $EndBuild ./
- | 'case' constant_expression ':'
- /. $Build consumeStatementCase(); $EndBuild ./
- | 'default' ':'
- /. $Build consumeStatementDefault(); $EndBuild ./
-
-
-compound_statement
- ::= <openscope-symbol> '{' '}'
- /.
- $Action
- $Resolve closeSymbolScope(); $EndResolve
- $Builder consumeStatementCompoundStatement(false); $EndBuilder
- $EndAction
- ./
- | <openscope-symbol> '{' <openscope-ast> block_item_list '}'
- /.
- $Action
- $Resolve closeSymbolScope(); $EndResolve
- $Builder consumeStatementCompoundStatement(true); $EndBuilder
- $EndAction
- ./
-
-
-block_item_list
- ::= block_item
- | block_item_list block_item
-
-
-block_item
- ::= statement
- | declaration
- /. $Build consumeStatementDeclaration(); $EndBuild ./
-
-
-expression_statement
- ::= ';'
- /. $Build consumeStatementNull(); $EndBuild ./
- | expression_in_statement ';'
- /. $Build consumeStatementExpression(); $EndBuild ./
-
-
-selection_statement
- ::= 'if' '(' expression ')' statement
- /. $Build consumeStatementIf(false); $EndBuild ./
- | 'if' '(' expression ')' statement 'else' statement
- /. $Build consumeStatementIf(true); $EndBuild ./
- | 'switch' '(' expression ')' statement
- /. $Build consumeStatementSwitch(); $EndBuild ./
-
-
-expression_opt
- ::= expression
- | $empty
- /. $Build consumeEmpty(); $EndBuild ./
-
-
-iteration_statement
- ::= 'do' statement 'while' '(' expression ')' ';'
- /. $Build consumeStatementDoLoop(); $EndBuild ./
- | 'while' '(' expression ')' statement
- /. $Build consumeStatementWhileLoop(); $EndBuild ./
- | <openscope-symbol> 'for' '(' expression_opt ';' expression_opt ';' expression_opt ')' statement
- /.
- $Action
- $Resolve closeSymbolScope(); $EndResolve
- $Builder consumeStatementForLoop(); $EndBuilder
- $EndAction
- ./
- | <openscope-symbol> 'for' '(' declaration expression_opt ';' expression_opt ')' statement
- /.
- $Action
- $Resolve closeSymbolScope(); $EndResolve
- $Builder consumeStatementForLoop(); $EndBuilder
- $EndAction
- ./
-
-
-jump_statement
- ::= 'goto' identifier_or_typedefname ';'
- /. $Build consumeStatementGoto(); $EndBuild ./
- | 'continue' ';'
- /. $Build consumeStatementContinue(); $EndBuild ./
- | 'break' ';'
- /. $Build consumeStatementBreak(); $EndBuild ./
- | 'return' ';'
- /. $Build consumeStatementReturn(false); $EndBuild ./
- | 'return' expression ';'
- /. $Build consumeStatementReturn(true); $EndBuild ./
-
-
-
--------------------------------------------------------------------------------------------
--- Declarations
--------------------------------------------------------------------------------------------
-
-
-
-declaration
- ::= declaration_specifiers ';'
- /.
- $Action
- $Resolve closeDeclarationScope(); $EndResolve
- $Builder consumeDeclarationSimple(false); $EndBuilder
- $EndAction
- ./
- | declaration_specifiers <openscope-ast> init_declarator_list ';'
- /.
- $Action
- $Resolve closeDeclarationScope(); $EndResolve
- $Builder consumeDeclarationSimple(true); $EndBuilder
- $EndAction
- ./
-
-
-declaration_specifiers
- ::= <openscope-declaration> <openscope-ast> simple_declaration_specifiers
- /. $Build consumeDeclarationSpecifiersSimple(); $EndBuild ./
- | <openscope-declaration> <openscope-ast> struct_or_union_declaration_specifiers
- /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
- | <openscope-declaration> <openscope-ast> elaborated_declaration_specifiers
- /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
- | <openscope-declaration> <openscope-ast> enum_declaration_specifiers
- /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
- | <openscope-declaration> <openscope-ast> typdef_name_declaration_specifiers
- /. $Build consumeDeclarationSpecifiersTypedefName(); $EndBuild ./
-
-
-no_type_declaration_specifier
- ::= storage_class_specifier
- | type_qualifier
- | function_specifier
-
-
-no_type_declaration_specifiers
- ::= no_type_declaration_specifier
- | no_type_declaration_specifiers no_type_declaration_specifier
-
-
-simple_declaration_specifiers
- ::= simple_type_specifier
- | no_type_declaration_specifiers simple_type_specifier
- | simple_declaration_specifiers simple_type_specifier
- | simple_declaration_specifiers no_type_declaration_specifier
-
-
-struct_or_union_declaration_specifiers
- ::= struct_or_union_specifier
- | no_type_declaration_specifiers struct_or_union_specifier
- | struct_or_union_declaration_specifiers no_type_declaration_specifier
-
-
-elaborated_declaration_specifiers
- ::= elaborated_specifier
- | no_type_declaration_specifiers elaborated_specifier
- | elaborated_declaration_specifiers no_type_declaration_specifier
-
-
-enum_declaration_specifiers
- ::= enum_specifier
- | no_type_declaration_specifiers enum_specifier
- | enum_declaration_specifiers no_type_declaration_specifier
-
-
-typdef_name_declaration_specifiers
- ::= typedef_name_in_declspec
- | no_type_declaration_specifiers typedef_name_in_declspec
- | typdef_name_declaration_specifiers no_type_declaration_specifier
-
-
-init_declarator_list
- ::= init_declarator
- | init_declarator_list ',' init_declarator
-
-
-init_declarator
- ::= complete_declarator
- | complete_declarator '=' initializer
- /. $Build consumeDeclaratorWithInitializer(true); $EndBuild ./
-
-
-complete_declarator
- ::= declarator
- /.
- $Action
- $Resolve consumeDeclaratorComplete(); $EndResolve
- $EndAction
- ./
-
-
-storage_class_specifier
- ::= storage_class_specifier_token
- /.
- $Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
-
-
-storage_class_specifier_token
- ::= 'typedef'
- | 'extern'
- | 'static'
- | 'auto'
- | 'register'
-
-
-simple_type_specifier
- ::= simple_type_specifier_token
- /.
- $Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
-
-simple_type_specifier_token
- ::= 'void'
- | 'char'
- | 'short'
- | 'int'
- | 'long'
- | 'float'
- | 'double'
- | 'signed'
- | 'unsigned'
- | '_Bool'
- | '_Complex'
- | '_Imaginary'
-
-
-typedef_name_in_declspec
- ::= 'TypedefName'
- /.
- $Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
- | 'Completion'
- /.
- $Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
-
-
-identifier_or_typedefname
- ::= 'identifier'
- | 'TypedefName'
- | 'Completion'
-
-
-struct_or_union_specifier
- ::= 'struct' '{' <openscope-ast> struct_declaration_list_opt '}'
- /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
- | 'union' '{' <openscope-ast> struct_declaration_list_opt '}'
- /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
- | 'struct' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
- /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
- | 'union' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
- /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
-
-
-elaborated_specifier
- ::= 'struct' identifier_or_typedefname
- /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
- | 'union' identifier_or_typedefname
- /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); $EndBuild ./
- | 'enum' identifier_or_typedefname
- /. $Build consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); $EndBuild ./
-
-
-struct_declaration_list_opt
- ::= struct_declaration_list
- | $empty
-
-struct_declaration_list
- ::= struct_declaration
- | struct_declaration_list struct_declaration
-
-
-struct_declaration
- ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ';' -- regular declarators plus bit fields
- /.
- $Action
- $Resolve closeDeclarationScope(); $EndResolve
- $Builder consumeStructDeclaration(true); $EndBuilder
- $EndAction
- ./
- | specifier_qualifier_list ';'
- /.
- $Action
- $Resolve closeDeclarationScope(); $EndResolve
- $Builder consumeStructDeclaration(false); $EndBuilder
- $EndAction
- ./
-
-
--- just reuse declaration_specifiers, makes grammar a bit more lenient but thats OK
-specifier_qualifier_list
- ::= declaration_specifiers
-
-
-struct_declarator_list
- ::= complete_struct_declarator
- | struct_declarator_list ',' complete_struct_declarator
-
-
-complete_struct_declarator
- ::= struct_declarator
- /.
- $Action
- $Resolve consumeDeclaratorCompleteField(); $EndResolve
- $EndAction
- ./
-
-
-struct_declarator
- ::= declarator
- | ':' constant_expression
- /. $Build consumeBitField(false); $EndBuild ./
- | declarator ':' constant_expression
- /. $Build consumeBitField(true); $EndBuild ./
-
-
-enum_specifier
- ::= 'enum' '{' <openscope-ast> enumerator_list_opt comma_opt '}'
- /. $Build consumeTypeSpecifierEnumeration(false); $EndBuild ./
- | 'enum' identifier_or_typedefname '{' <openscope-ast> enumerator_list_opt comma_opt '}'
- /. $Build consumeTypeSpecifierEnumeration(true); $EndBuild ./
-
-
-enumerator_list_opt
- ::= enumerator_list
- | $empty
-
-
-enumerator_list
- ::= enumerator
- | enumerator_list ',' enumerator
-
-
-enumerator
- ::= identifier_or_typedefname
- /. $Build consumeEnumerator(false); $EndBuild ./
- | identifier_or_typedefname '=' constant_expression
- /. $Build consumeEnumerator(true); $EndBuild ./
-
-
-type_qualifier
- ::= type_qualifier_token
- /.
- $Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
-
-
-type_qualifier_token
- ::= 'const'
- | 'restrict'
- | 'volatile'
-
-
-function_specifier
- ::= 'inline'
- /.$Action
- $Resolve consumeDeclSpecToken(); $EndResolve
- $Builder consumeDeclSpecToken(); $EndBuilder
- $EndAction
- ./
-
-
-declarator
- ::= direct_declarator
- | <openscope-ast> pointer_seq direct_declarator
- /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
-
-
-direct_declarator
- ::= array_direct_declarator
- | function_prototype_direct_declarator
- | basic_direct_declarator
- | knr_direct_declarator
-
-
-basic_direct_declarator
- ::= declarator_id_name
- /.
- $Action
- $Resolve consumeDirectDeclaratorIdentifier(); $EndResolve
- $Builder consumeDirectDeclaratorIdentifier(); $EndBuilder
- $EndAction
- ./
- | '(' declarator ')'
- /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
-
-
-declarator_id_name
- ::= 'identifier'
- /. $Build consumeIdentifierName(); $EndBuild ./
-
-
-array_direct_declarator
- ::= basic_direct_declarator array_modifier
- /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
- | array_direct_declarator array_modifier
- /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
-
-
-function_prototype_direct_declarator
- ::= function_direct_declarator
- /.$Action $Resolve closeSymbolScope(); $EndResolve $EndAction./
-
-
-function_direct_declarator
- ::= basic_direct_declarator '(' <openscope-symbol> <openscope-ast> parameter_type_list ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
- | basic_direct_declarator '(' <openscope-symbol> ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
-
-
-function_declarator
- ::= function_direct_declarator
- | <openscope-ast> pointer_seq function_direct_declarator
- /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
-
-
--- This is a hack because the parser cannot tell the difference between
--- plain identifiers and types. Because of this an identifier_list would
--- always be parsed as a parameter_type_list instead. In a KnR funciton
--- definition we can use the extra list of declarators to disambiguate.
--- This rule should be merged back into direct_declarator if type info is
--- added to the parser.
-
-knr_direct_declarator
- ::= basic_direct_declarator '(' <openscope-symbol> <openscope-ast> identifier_list ')'
- /. $Build consumeDirectDeclaratorFunctionDeclaratorKnR(); $EndBuild ./
-
-
-knr_function_declarator
- ::= knr_direct_declarator
- | <openscope-ast> pointer_seq knr_direct_declarator
- /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
-
-
-identifier_list
- ::= 'identifier'
- /. $Build consumeIdentifierKnR(); $EndBuild ./
- | identifier_list ',' 'identifier'
- /. $Build consumeIdentifierKnR(); $EndBuild ./
-
-
-array_modifier
- ::= '[' ']'
- /. $Build consumeDirectDeclaratorArrayModifier(false); $EndBuild ./
- | '[' <openscope-ast> array_modifier_type_qualifiers ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); $EndBuild ./
- | '[' assignment_expression ']'
- /. $Build consumeDirectDeclaratorArrayModifier(true); $EndBuild ./
- | '[' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); $EndBuild ./
- | '[' 'static' assignment_expression ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); $EndBuild ./
- | '[' 'static' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
- | '[' <openscope-ast> array_modifier_type_qualifiers 'static' assignment_expression ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
- | '[' '*' ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); $EndBuild ./
- | '[' <openscope-ast> array_modifier_type_qualifiers '*' ']'
- /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); $EndBuild ./
-
-
-array_modifier_type_qualifiers
- ::= type_qualifier_list
-
-
-pointer_seq
- ::= '*'
- /. $Build consumePointer(); $EndBuild ./
- | pointer_seq '*'
- /. $Build consumePointer(); $EndBuild ./
- | '*' <openscope-ast> type_qualifier_list
- /. $Build consumePointerTypeQualifierList(); $EndBuild ./
- | pointer_seq '*' <openscope-ast> type_qualifier_list
- /. $Build consumePointerTypeQualifierList(); $EndBuild ./
-
-
-type_qualifier_list
- ::= type_qualifier
- | type_qualifier_list type_qualifier
-
-
-parameter_type_list
- ::= parameter_list
- /. $Build consumeEmpty(); $EndBuild ./
- | parameter_list ',' '...'
- /. $Build consumePlaceHolder(); $EndBuild ./
- | '...' -- not spec
- /. $Build consumePlaceHolder(); $EndBuild ./
-
-
-parameter_list
- ::= parameter_declaration
- | parameter_list ',' parameter_declaration
-
-
-parameter_declaration
- ::= declaration_specifiers complete_parameter_declarator
- /. $Build consumeParameterDeclaration(); $EndBuild ./
- | declaration_specifiers
- /.
- $Action
- $Resolve consumeParameterDeclarationWithoutDeclarator(); $EndResolve
- $Builder consumeParameterDeclarationWithoutDeclarator(); $EndBuilder
- $EndAction
- ./
-
-
-complete_parameter_declarator
- ::= declarator
- /.
- $Action
- $Resolve consumeDeclaratorCompleteParameter(); $EndResolve
- $EndAction
- ./
- | abstract_declarator
- /.
- $Action
- $Resolve consumeDeclaratorCompleteParameter(); $EndResolve
- $EndAction
- ./
-
-
--- only used in expressions, eg) sizeof, casts etc...
-type_name
- ::= specifier_qualifier_list
- /.
- $Action
- $Resolve consumeTypeId(); $EndResolve
- $Builder consumeTypeId(false); $EndBuilder
- $EndAction
- ./
- | specifier_qualifier_list abstract_declarator
- /.
- $Action
- $Resolve consumeTypeId(); $EndResolve
- $Builder consumeTypeId(true); $EndBuilder
- $EndAction
- ./
-
-
-abstract_declarator -- a declarator that does not include an identifier
- ::= direct_abstract_declarator
- | <openscope-ast> pointer_seq
- /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
- | <openscope-ast> pointer_seq direct_abstract_declarator
- /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
-
-
-direct_abstract_declarator
- ::= basic_direct_abstract_declarator
- | array_direct_abstract_declarator
- | function_direct_abstract_declarator
-
-
-basic_direct_abstract_declarator
- ::= '(' abstract_declarator ')'
- /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
-
-
-array_direct_abstract_declarator
- ::= array_modifier
- /. $Build consumeDirectDeclaratorArrayDeclarator(false); $EndBuild ./
- | array_direct_abstract_declarator array_modifier
- /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
- | basic_direct_abstract_declarator array_modifier
- /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
-
-
-function_direct_abstract_declarator
- ::= '(' ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(false, false); $EndBuild ./
- | basic_direct_abstract_declarator '(' ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
- | '(' <openscope-ast> parameter_type_list ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(false, true); $EndBuild ./
- | basic_direct_abstract_declarator '(' <openscope-ast> parameter_type_list ')'
- /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
-
-
-initializer
- ::= assignment_expression
- /. $Build consumeInitializer(); $EndBuild ./
- | '{' <openscope-ast> initializer_list comma_opt '}'
- /. $Build consumeInitializerList(); $EndBuild ./
-
-initializer_list
- ::= initializer
- | designated_initializer
- | initializer_list ',' initializer
- | initializer_list ',' designated_initializer
-
-
-designated_initializer
- ::= <openscope-ast> designation '=' initializer
- /. $Build consumeInitializerDesignated(); $EndBuild ./
-
-
-designation
- ::= designator_list
-
-
-designator_list
- ::= designator_base
- | designator_list designator
-
-
-designator_base
- ::= '[' constant_expression ']'
- /. $Build consumeDesignatorArray(); $EndBuild ./
- | '.' identifier_or_typedefname
- /. $Build consumeDesignatorField(); $EndBuild ./
-
-designator
- ::= '[' constant_expression ']'
- /. $Build consumeDesignatorArray(); $EndBuild ./
- | '.' identifier_or_typedefname
- /. $Build consumeDesignatorField(); $EndBuild ./
-
-
--------------------------------------------------------------------------------------------
--- External Definitions
--------------------------------------------------------------------------------------------
-
-translation_unit
- ::= external_declaration_list
- /. $Build consumeTranslationUnit(); $EndBuild ./
- | $empty
- /. $Build consumeTranslationUnit(); $EndBuild ./
-
-
-external_declaration_list
- ::= external_declaration
- | external_declaration_list external_declaration
-
-
-external_declaration
- ::= function_definition
- | declaration
- | ';'
- /. $Build consumeDeclarationEmpty(); $EndBuild ./
- | ERROR_TOKEN
- /. $Build consumeDeclarationProblem(); $EndBuild ./
-
-
--- Used by KnR
-declaration_list
- ::= declaration
- | declaration_list declaration
-
-
--- The extra <openscope-ast> nonterminal before declarator in this rule is only there
--- to avoid a shift/reduce error with the rule for declaration.
--- The symbol table scoped is opened in the rule for function_direct_declarator
-function_definition
- ::= declaration_specifiers <openscope-ast> function_declarator function_body
- /.
- $Action
- $Resolve consumeFunctionDefinition(); $EndResolve
- $Builder consumeFunctionDefinition(true); $EndBuilder
- $EndAction
- ./
-
- -- this rule is here as a special case (its not C99 spec) just to support implicit int in function definitions
- | <openscope-declaration> <openscope-ast> function_declarator function_body
- /.
- $Action
- $Resolve consumeFunctionDefinition(); $EndResolve
- $Builder consumeFunctionDefinition(false); $EndBuilder
- $EndAction
- ./
-
- | declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
- /.
- $Action
- $Resolve consumeFunctionDefinition(); $EndResolve
- $Builder consumeFunctionDefinitionKnR(); $EndBuilder
- $EndAction
- ./
-
-
--- same syntax as compound_statement but a symbol table scope isn't opened
-function_body
- ::= '{' '}'
- /. $Build consumeStatementCompoundStatement(false); $EndBuild ./
- | '{' <openscope-ast> block_item_list '}'
- /. $Build consumeStatementCompoundStatement(true); $EndBuild ./
-
-$End
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ translation_unit
+$End \ No newline at end of file
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99SizeofExpressionParser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99SizeofExpressionParser.g
new file mode 100644
index 0000000000..f5708ce8e0
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99/C99SizeofExpressionParser.g
@@ -0,0 +1,54 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2008 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+%options la=2
+%options package=org.eclipse.cdt.internal.core.dom.lrparser.c99
+%options template=btParserTemplateD.g
+
+
+$Define
+ $sym_class /. C99SizeofExpressionParsersym ./
+$End
+
+$Import
+ C99Grammar.g
+
+$DropRules
+
+unary_expression
+ ::= 'sizeof' '(' type_name ')'
+
+$End
+
+
+$Start
+ no_sizeof_type_name_start
+$End
+
+
+
+$Headers
+/.
+ public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+ }
+./
+$End
+
+
+$Rules
+
+no_sizeof_type_name_start
+ ::= expression
+ | ERROR_TOKEN
+ /. $Build consumeExpressionProblem(); $EndBuild ./
+
+$End \ No newline at end of file
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99tu/C99Parser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99tu/C99Parser.g
new file mode 100644
index 0000000000..e313c24b6e
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/c99tu/C99Parser.g
@@ -0,0 +1,1265 @@
+-----------------------------------------------------------------------------------
+-- Copyright (c) 2006, 2008 IBM Corporation and others.
+-- All rights reserved. This program and the accompanying materials
+-- are made available under the terms of the Eclipse Public License v1.0
+-- which accompanies this distribution, and is available at
+-- http://www.eclipse.org/legal/epl-v10.html
+--
+-- Contributors:
+-- IBM Corporation - initial API and implementation
+-----------------------------------------------------------------------------------
+
+%options la=2
+%options package=org.eclipse.cdt.internal.core.dom.lrparser.c99
+%options template=TrialUndoParserTemplate.g
+
+--$Include
+--../common.g
+--$End
+
+$Notice
+-- Copied into all files generated by LPG
+/./*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *********************************************************************************/
+
+ // This file was generated by LPG
+./
+$End
+
+$Terminals
+
+ -- Keywords
+
+ auto break case char const continue default do
+ double else enum extern float for goto if
+ inline int long register restrict return short signed
+ sizeof static struct switch typedef union unsigned void
+ volatile while _Bool _Complex _Imaginary
+
+ -- Literals
+
+ integer floating charconst stringlit
+
+ -- identifiers
+ -- Special token that represents identifiers that have been declared as typedefs (lexer feedback hack)
+
+ identifier
+ TypedefName
+
+ -- Special tokens used in content assist
+
+ Completion
+ EndOfCompletion
+
+ -- Unrecognized token
+
+ Invalid
+
+ -- Punctuation (with aliases to make grammar more readable)
+
+ LeftBracket ::= '['
+ LeftParen ::= '('
+ LeftBrace ::= '{'
+ Dot ::= '.'
+ Arrow ::= '->'
+ PlusPlus ::= '++'
+ MinusMinus ::= '--'
+ And ::= '&'
+ Star ::= '*'
+ Plus ::= '+'
+ Minus ::= '-'
+ Tilde ::= '~'
+ Bang ::= '!'
+ Slash ::= '/'
+ Percent ::= '%'
+ RightShift ::= '>>'
+ LeftShift ::= '<<'
+ LT ::= '<'
+ GT ::= '>'
+ LE ::= '<='
+ GE ::= '>='
+ EQ ::= '=='
+ NE ::= '!='
+ Caret ::= '^'
+ Or ::= '|'
+ AndAnd ::= '&&'
+ OrOr ::= '||'
+ Question ::= '?'
+ Colon ::= ':'
+ DotDotDot ::= '...'
+ Assign ::= '='
+ StarAssign ::= '*='
+ SlashAssign ::= '/='
+ PercentAssign ::= '%='
+ PlusAssign ::= '+='
+ MinusAssign ::= '-='
+ RightShiftAssign ::= '>>='
+ LeftShiftAssign ::= '<<='
+ AndAssign ::= '&='
+ CaretAssign ::= '^='
+ OrAssign ::= '|='
+ Comma ::= ','
+
+ RightBracket -- these four have special rules for content assist
+ RightParen
+ RightBrace
+ SemiColon
+
+
+$End
+
+
+$Globals
+/.
+ import java.util.*;
+
+ import org.eclipse.cdt.core.dom.ast.*;
+ import org.eclipse.cdt.core.dom.lrparser.IParser;
+ import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
+ import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
+ import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+./
+$End
+
+-- TODO move this code into a common template
+
+$Define
+ $build_action_class /. C99BuildASTParserAction ./
+ $resolve_action_class /. C99TypedefTrackerParserAction ./
+ $node_factory_create_expression /. C99ASTNodeFactory.DEFAULT_INSTANCE ./
+ $sym_class /. C99Parsersym ./
+ $lexer_class /. C99Lexer ./
+ $action_class /. C99ParserAction ./
+$End
+
+
+
+
+$Define
+ -- These macros allow the template and header code to be customized by an extending parser.
+ $ast_class /.Object./
+ $data_class /. Object ./ -- allow anything to be passed between actions
+
+ --$additional_interfaces /. , IParserActionTokenProvider, IParser ./
+ $additional_interfaces /. ./
+
+ --$build_action_class /. ./
+ --$resolve_action_class /. ./
+ --$node_factory_create_expression /. ./
+
+
+ --$lexer_class /. ./
+ --$action_class /. ./
+
+
+ $UndoResolver /.$Undo action.resolver.undo(); $EndUndo./
+
+ $Resolve /. $BeginTrial $resolve.
+ ./
+ $EndResolve /. $EndTrial
+ $UndoResolver
+ ./ -- undo actions are automatically generated for binding resolution actions
+
+ $Builder /. $BeginFinal $builder.
+ ./
+ $EndBuilder /. /*$builder.getASTStack().print();*/ $EndFinal ./
+
+ $Build /. $Action $Builder ./
+ $EndBuild /. $EndBuilder $EndAction ./
+
+ $resolve /. action.resolver./
+ $builder /. action.builder./
+
+
+-- comment out when using trial/undo
+ --$Action /. $BeginAction ./
+ --$BeginFinal /. ./
+ --$EndFinal /. ./
+ --$BeginTrial /. ./
+ --$EndTrial /. ./
+ --$Undo /. ./
+ --$EndUndo /. ./
+$End
+
+
+$Headers
+/.
+ private $action_class action;
+
+ //public $action_type() { // constructor
+ //}
+
+ private void initActions(IASTTranslationUnit tu) {
+ // binding resolution actions need access to IASTName nodes, temporary
+ action = new $action_class();
+ action.resolver = new $resolve_action_class(this);
+ action.builder = new $build_action_class($node_factory_create_expression, this, tu);
+ action.builder.setTokenMap($sym_class.orderedTerminalSymbols);
+ setParserAction(action);
+ }
+
+
+ public void addToken(IToken token) {
+ token.setKind(mapKind(token.getKind()));
+ super.addToken(token);
+ }
+
+ public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ for(IToken token : tokens) {
+ addToken(token);
+ }
+ }
+
+ public IASTCompletionNode parse(IASTTranslationUnit tu) {
+ // this has to be done, or... kaboom!
+ setStreamLength(getSize());
+ initActions(tu);
+
+ final int errorRepairCount = -1; // -1 means full error handling
+ parser(null, errorRepairCount); // do the actual parse
+ super.resetTokenStream(); // allow tokens to be garbage collected
+
+ // the completion node may be null
+ IASTCompletionNode compNode = action.builder.getASTCompletionNode();
+
+ action = null;
+ parserAction = null;
+ return compNode;
+ }
+
+
+ public int getKind(int i) {
+ int kind = super.getKind(i);
+ // lexer feedback hack!
+ if(kind == $sym_class.TK_identifier && action.resolver.isTypedef(getTokenText(i))) {
+ kind = $sym_class.TK_TypedefName;
+ }
+ return kind;
+ }
+
+./
+$End
+
+$Start
+ translation_unit
+$End
+
+
+
+$Rules
+
+-------------------------------------------------------------------------------------------
+-- AST and Symbol Table Scoping
+-------------------------------------------------------------------------------------------
+
+
+<openscope-ast>
+ ::= $empty
+ /.$Action $Builder openASTScope(); $EndBuilder $EndAction./
+
+<openscope-symbol>
+ ::= $empty
+ /.$Action $Resolve openSymbolScope(); $EndResolve $EndAction./
+
+<openscope-declaration>
+ ::= $empty
+ /.$Action $Resolve openDeclarationScope(); $EndResolve $EndAction./
+
+-------------------------------------------------------------------------------------------
+-- Content assist
+-------------------------------------------------------------------------------------------
+
+-- The EndOfCompletion token is a special token that matches some punctuation.
+-- These tokens allow the parse to complete successfully after a Completion token
+-- is encountered.
+
+
+']' ::=? 'RightBracket'
+ | 'EndOfCompletion'
+
+')' ::=? 'RightParen'
+ | 'EndOfCompletion'
+
+'}' ::=? 'RightBrace'
+ | 'EndOfCompletion'
+
+';' ::=? 'SemiColon'
+ | 'EndOfCompletion'
+
+
+
+-------------------------------------------------------------------------------------------
+-- Expressions
+-------------------------------------------------------------------------------------------
+
+
+literal
+ ::= 'integer'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); $EndBuild ./
+ | 'floating'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); $EndBuild ./
+ | 'charconst'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); $EndBuild ./
+ | 'stringlit'
+ /. $Build consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); $EndBuild ./
+
+
+primary_expression
+ ::= literal
+ | primary_expression_id
+ /. $Build consumeExpressionID(); $EndBuild ./
+ | '(' expression ')'
+ /. $Build consumeExpressionBracketed(); $EndBuild ./
+
+
+primary_expression_id -- Typedefname not allowed as a variable name.
+ ::= 'identifier'
+ | 'Completion'
+
+
+postfix_expression
+ ::= primary_expression
+ | postfix_expression '[' expression ']'
+ /. $Build consumeExpressionArraySubscript(); $EndBuild ./
+ | postfix_expression '(' expression_list_opt ')'
+ /. $Build consumeExpressionFunctionCall(); $EndBuild ./
+ | postfix_expression '.' member_name
+ /. $Build consumeExpressionFieldReference(false); $EndBuild ./
+ | postfix_expression '->' member_name
+ /. $Build consumeExpressionFieldReference(true); $EndBuild ./
+ | postfix_expression '++'
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); $EndBuild ./
+ | postfix_expression '--'
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); $EndBuild ./
+ | '(' type_name ')' '{' <openscope-ast> initializer_list comma_opt '}'
+ /. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./
+
+
+comma_opt
+ ::= ',' | $empty
+
+
+member_name
+ ::= 'identifier'
+ | 'TypedefName'
+ | 'Completion'
+
+
+unary_expression
+ ::= postfix_expression
+ | '++' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); $EndBuild ./
+ | '--' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); $EndBuild ./
+ | '&' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); $EndBuild ./
+ | '*' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); $EndBuild ./
+ | '+' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); $EndBuild ./
+ | '-' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); $EndBuild ./
+ | '~' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); $EndBuild ./
+ | '!' cast_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); $EndBuild ./
+ | 'sizeof' unary_expression
+ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); $EndBuild ./
+ | 'sizeof' '(' type_name ')'
+ /. $Build consumeExpressionTypeId(IASTTypeIdExpression.op_sizeof); $EndBuild ./
+
+
+cast_expression
+ ::= unary_expression
+ | '(' type_name ')' cast_expression
+ /. $Build consumeExpressionCast(IASTCastExpression.op_cast); $EndBuild ./
+
+
+multiplicative_expression
+ ::= cast_expression
+ | multiplicative_expression '*' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); $EndBuild ./
+ | multiplicative_expression '/' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); $EndBuild ./
+ | multiplicative_expression '%' cast_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); $EndBuild ./
+
+
+additive_expression
+ ::= multiplicative_expression
+ | additive_expression '+' multiplicative_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); $EndBuild ./
+ | additive_expression '-' multiplicative_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); $EndBuild ./
+
+
+shift_expression
+ ::= additive_expression
+ | shift_expression '<<' additive_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); $EndBuild ./
+ | shift_expression '>>' additive_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); $EndBuild ./
+
+
+relational_expression
+ ::= shift_expression
+ | relational_expression '<' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); $EndBuild ./
+ | relational_expression '>' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); $EndBuild ./
+ | relational_expression '<=' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); $EndBuild ./
+ | relational_expression '>=' shift_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); $EndBuild ./
+
+
+equality_expression
+ ::= relational_expression
+ | equality_expression '==' relational_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); $EndBuild ./
+ | equality_expression '!=' relational_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); $EndBuild ./
+
+
+AND_expression
+ ::= equality_expression
+ | AND_expression '&' equality_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); $EndBuild ./
+
+
+exclusive_OR_expression
+ ::= AND_expression
+ | exclusive_OR_expression '^' AND_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); $EndBuild ./
+
+
+inclusive_OR_expression
+ ::= exclusive_OR_expression
+ | inclusive_OR_expression '|' exclusive_OR_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); $EndBuild ./
+
+
+logical_AND_expression
+ ::= inclusive_OR_expression
+ | logical_AND_expression '&&' inclusive_OR_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); $EndBuild ./
+
+
+logical_OR_expression
+ ::= logical_AND_expression
+ | logical_OR_expression '||' logical_AND_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); $EndBuild ./
+
+
+conditional_expression
+ ::= logical_OR_expression
+ | logical_OR_expression '?' expression ':' conditional_expression
+ /. $Build consumeExpressionConditional(); $EndBuild ./
+
+
+assignment_expression
+ ::= conditional_expression
+ | unary_expression '=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); $EndBuild ./
+ | unary_expression '*=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); $EndBuild ./
+ | unary_expression '/=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); $EndBuild ./
+ | unary_expression '%=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); $EndBuild ./
+ | unary_expression '+=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); $EndBuild ./
+ | unary_expression '-=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); $EndBuild ./
+ | unary_expression '<<=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); $EndBuild ./
+ | unary_expression '>>=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); $EndBuild ./
+ | unary_expression '&=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); $EndBuild ./
+ | unary_expression '^=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); $EndBuild ./
+ | unary_expression '|=' assignment_expression
+ /. $Build consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); $EndBuild ./
+
+
+-- special rule to avoid conflict between problem statements and problem expressions
+expression_in_statement
+ ::= expression_list
+
+
+expression
+ ::= expression_list
+
+
+expression_list
+ ::= <openscope-ast> expression_list_actual
+ /. $Build consumeExpressionList(); $EndBuild ./
+
+
+expression_list_opt
+ ::= expression_list
+ | $empty
+ /. $Build consumeEmpty(); $EndBuild ./
+
+
+expression_list_actual
+ ::= assignment_expression
+ | expression_list_actual ',' assignment_expression
+
+
+constant_expression
+ ::= conditional_expression
+
+
+-------------------------------------------------------------------------------------------
+-- Statements
+-------------------------------------------------------------------------------------------
+
+
+
+statement
+ ::= labeled_statement
+ | compound_statement
+ | expression_statement
+ | selection_statement
+ | iteration_statement
+ | jump_statement
+ | ERROR_TOKEN
+ /. $Build consumeStatementProblem(); $EndBuild ./
+
+
+labeled_statement
+ ::= identifier_or_typedefname ':' statement
+ /. $Build consumeStatementLabeled(); $EndBuild ./
+ | 'case' constant_expression ':'
+ /. $Build consumeStatementCase(); $EndBuild ./
+ | 'default' ':'
+ /. $Build consumeStatementDefault(); $EndBuild ./
+
+
+compound_statement
+ ::= <openscope-symbol> '{' '}'
+ /.
+ $Action
+ $Resolve closeSymbolScope(); $EndResolve
+ $Builder consumeStatementCompoundStatement(false); $EndBuilder
+ $EndAction
+ ./
+ | <openscope-symbol> '{' <openscope-ast> block_item_list '}'
+ /.
+ $Action
+ $Resolve closeSymbolScope(); $EndResolve
+ $Builder consumeStatementCompoundStatement(true); $EndBuilder
+ $EndAction
+ ./
+
+
+block_item_list
+ ::= block_item
+ | block_item_list block_item
+
+
+block_item
+ ::= statement
+ | declaration
+ /. $Build consumeStatementDeclaration(); $EndBuild ./
+
+
+expression_statement
+ ::= ';'
+ /. $Build consumeStatementNull(); $EndBuild ./
+ | expression_in_statement ';'
+ /. $Build consumeStatementExpression(); $EndBuild ./
+
+
+selection_statement
+ ::= 'if' '(' expression ')' statement
+ /. $Build consumeStatementIf(false); $EndBuild ./
+ | 'if' '(' expression ')' statement 'else' statement
+ /. $Build consumeStatementIf(true); $EndBuild ./
+ | 'switch' '(' expression ')' statement
+ /. $Build consumeStatementSwitch(); $EndBuild ./
+
+
+expression_opt
+ ::= expression
+ | $empty
+ /. $Build consumeEmpty(); $EndBuild ./
+
+
+iteration_statement
+ ::= 'do' statement 'while' '(' expression ')' ';'
+ /. $Build consumeStatementDoLoop(); $EndBuild ./
+ | 'while' '(' expression ')' statement
+ /. $Build consumeStatementWhileLoop(); $EndBuild ./
+ | <openscope-symbol> 'for' '(' expression_opt ';' expression_opt ';' expression_opt ')' statement
+ /.
+ $Action
+ $Resolve closeSymbolScope(); $EndResolve
+ $Builder consumeStatementForLoop(); $EndBuilder
+ $EndAction
+ ./
+ | <openscope-symbol> 'for' '(' declaration expression_opt ';' expression_opt ')' statement
+ /.
+ $Action
+ $Resolve closeSymbolScope(); $EndResolve
+ $Builder consumeStatementForLoop(); $EndBuilder
+ $EndAction
+ ./
+
+
+jump_statement
+ ::= 'goto' identifier_or_typedefname ';'
+ /. $Build consumeStatementGoto(); $EndBuild ./
+ | 'continue' ';'
+ /. $Build consumeStatementContinue(); $EndBuild ./
+ | 'break' ';'
+ /. $Build consumeStatementBreak(); $EndBuild ./
+ | 'return' ';'
+ /. $Build consumeStatementReturn(false); $EndBuild ./
+ | 'return' expression ';'
+ /. $Build consumeStatementReturn(true); $EndBuild ./
+
+
+
+-------------------------------------------------------------------------------------------
+-- Declarations
+-------------------------------------------------------------------------------------------
+
+
+
+declaration
+ ::= declaration_specifiers ';'
+ /.
+ $Action
+ $Resolve closeDeclarationScope(); $EndResolve
+ $Builder consumeDeclarationSimple(false); $EndBuilder
+ $EndAction
+ ./
+ | declaration_specifiers <openscope-ast> init_declarator_list ';'
+ /.
+ $Action
+ $Resolve closeDeclarationScope(); $EndResolve
+ $Builder consumeDeclarationSimple(true); $EndBuilder
+ $EndAction
+ ./
+
+
+declaration_specifiers
+ ::= <openscope-declaration> <openscope-ast> simple_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersSimple(); $EndBuild ./
+ | <openscope-declaration> <openscope-ast> struct_or_union_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-declaration> <openscope-ast> elaborated_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-declaration> <openscope-ast> enum_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersStructUnionEnum(); $EndBuild ./
+ | <openscope-declaration> <openscope-ast> typdef_name_declaration_specifiers
+ /. $Build consumeDeclarationSpecifiersTypedefName(); $EndBuild ./
+
+
+no_type_declaration_specifier
+ ::= storage_class_specifier
+ | type_qualifier
+ | function_specifier
+
+
+no_type_declaration_specifiers
+ ::= no_type_declaration_specifier
+ | no_type_declaration_specifiers no_type_declaration_specifier
+
+
+simple_declaration_specifiers
+ ::= simple_type_specifier
+ | no_type_declaration_specifiers simple_type_specifier
+ | simple_declaration_specifiers simple_type_specifier
+ | simple_declaration_specifiers no_type_declaration_specifier
+
+
+struct_or_union_declaration_specifiers
+ ::= struct_or_union_specifier
+ | no_type_declaration_specifiers struct_or_union_specifier
+ | struct_or_union_declaration_specifiers no_type_declaration_specifier
+
+
+elaborated_declaration_specifiers
+ ::= elaborated_specifier
+ | no_type_declaration_specifiers elaborated_specifier
+ | elaborated_declaration_specifiers no_type_declaration_specifier
+
+
+enum_declaration_specifiers
+ ::= enum_specifier
+ | no_type_declaration_specifiers enum_specifier
+ | enum_declaration_specifiers no_type_declaration_specifier
+
+
+typdef_name_declaration_specifiers
+ ::= typedef_name_in_declspec
+ | no_type_declaration_specifiers typedef_name_in_declspec
+ | typdef_name_declaration_specifiers no_type_declaration_specifier
+
+
+init_declarator_list
+ ::= init_declarator
+ | init_declarator_list ',' init_declarator
+
+
+init_declarator
+ ::= complete_declarator
+ | complete_declarator '=' initializer
+ /. $Build consumeDeclaratorWithInitializer(true); $EndBuild ./
+
+
+complete_declarator
+ ::= declarator
+ /.
+ $Action
+ $Resolve consumeDeclaratorComplete(); $EndResolve
+ $EndAction
+ ./
+
+
+storage_class_specifier
+ ::= storage_class_specifier_token
+ /.
+ $Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+
+
+storage_class_specifier_token
+ ::= 'typedef'
+ | 'extern'
+ | 'static'
+ | 'auto'
+ | 'register'
+
+
+simple_type_specifier
+ ::= simple_type_specifier_token
+ /.
+ $Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+
+simple_type_specifier_token
+ ::= 'void'
+ | 'char'
+ | 'short'
+ | 'int'
+ | 'long'
+ | 'float'
+ | 'double'
+ | 'signed'
+ | 'unsigned'
+ | '_Bool'
+ | '_Complex'
+ | '_Imaginary'
+
+
+typedef_name_in_declspec
+ ::= 'TypedefName'
+ /.
+ $Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+ | 'Completion'
+ /.
+ $Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+
+
+identifier_or_typedefname
+ ::= 'identifier'
+ | 'TypedefName'
+ | 'Completion'
+
+
+struct_or_union_specifier
+ ::= 'struct' '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+ | 'struct' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' identifier_or_typedefname '{' <openscope-ast> struct_declaration_list_opt '}'
+ /. $Build consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+
+
+elaborated_specifier
+ ::= 'struct' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); $EndBuild ./
+ | 'union' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); $EndBuild ./
+ | 'enum' identifier_or_typedefname
+ /. $Build consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); $EndBuild ./
+
+
+struct_declaration_list_opt
+ ::= struct_declaration_list
+ | $empty
+
+struct_declaration_list
+ ::= struct_declaration
+ | struct_declaration_list struct_declaration
+
+
+struct_declaration
+ ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ';' -- regular declarators plus bit fields
+ /.
+ $Action
+ $Resolve closeDeclarationScope(); $EndResolve
+ $Builder consumeStructDeclaration(true); $EndBuilder
+ $EndAction
+ ./
+ | specifier_qualifier_list ';'
+ /.
+ $Action
+ $Resolve closeDeclarationScope(); $EndResolve
+ $Builder consumeStructDeclaration(false); $EndBuilder
+ $EndAction
+ ./
+
+
+-- just reuse declaration_specifiers, makes grammar a bit more lenient but thats OK
+specifier_qualifier_list
+ ::= declaration_specifiers
+
+
+struct_declarator_list
+ ::= complete_struct_declarator
+ | struct_declarator_list ',' complete_struct_declarator
+
+
+complete_struct_declarator
+ ::= struct_declarator
+ /.
+ $Action
+ $Resolve consumeDeclaratorCompleteField(); $EndResolve
+ $EndAction
+ ./
+
+
+struct_declarator
+ ::= declarator
+ | ':' constant_expression
+ /. $Build consumeBitField(false); $EndBuild ./
+ | declarator ':' constant_expression
+ /. $Build consumeBitField(true); $EndBuild ./
+
+
+enum_specifier
+ ::= 'enum' '{' <openscope-ast> enumerator_list_opt comma_opt '}'
+ /. $Build consumeTypeSpecifierEnumeration(false); $EndBuild ./
+ | 'enum' identifier_or_typedefname '{' <openscope-ast> enumerator_list_opt comma_opt '}'
+ /. $Build consumeTypeSpecifierEnumeration(true); $EndBuild ./
+
+
+enumerator_list_opt
+ ::= enumerator_list
+ | $empty
+
+
+enumerator_list
+ ::= enumerator
+ | enumerator_list ',' enumerator
+
+
+enumerator
+ ::= identifier_or_typedefname
+ /. $Build consumeEnumerator(false); $EndBuild ./
+ | identifier_or_typedefname '=' constant_expression
+ /. $Build consumeEnumerator(true); $EndBuild ./
+
+
+type_qualifier
+ ::= type_qualifier_token
+ /.
+ $Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+
+
+type_qualifier_token
+ ::= 'const'
+ | 'restrict'
+ | 'volatile'
+
+
+function_specifier
+ ::= 'inline'
+ /.$Action
+ $Resolve consumeDeclSpecToken(); $EndResolve
+ $Builder consumeDeclSpecToken(); $EndBuilder
+ $EndAction
+ ./
+
+
+declarator
+ ::= direct_declarator
+ | <openscope-ast> pointer_seq direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+direct_declarator
+ ::= array_direct_declarator
+ | function_prototype_direct_declarator
+ | basic_direct_declarator
+ | knr_direct_declarator
+
+
+basic_direct_declarator
+ ::= declarator_id_name
+ /.
+ $Action
+ $Resolve consumeDirectDeclaratorIdentifier(); $EndResolve
+ $Builder consumeDirectDeclaratorIdentifier(); $EndBuilder
+ $EndAction
+ ./
+ | '(' declarator ')'
+ /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
+
+
+declarator_id_name
+ ::= 'identifier'
+ /. $Build consumeIdentifierName(); $EndBuild ./
+
+
+array_direct_declarator
+ ::= basic_direct_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+ | array_direct_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+
+
+function_prototype_direct_declarator
+ ::= function_direct_declarator
+ /.$Action $Resolve closeSymbolScope(); $EndResolve $EndAction./
+
+
+function_direct_declarator
+ ::= basic_direct_declarator '(' <openscope-symbol> <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
+ | basic_direct_declarator '(' <openscope-symbol> ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
+
+
+function_declarator
+ ::= function_direct_declarator
+ | <openscope-ast> pointer_seq function_direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+-- This is a hack because the parser cannot tell the difference between
+-- plain identifiers and types. Because of this an identifier_list would
+-- always be parsed as a parameter_type_list instead. In a KnR funciton
+-- definition we can use the extra list of declarators to disambiguate.
+-- This rule should be merged back into direct_declarator if type info is
+-- added to the parser.
+
+knr_direct_declarator
+ ::= basic_direct_declarator '(' <openscope-symbol> <openscope-ast> identifier_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclaratorKnR(); $EndBuild ./
+
+
+knr_function_declarator
+ ::= knr_direct_declarator
+ | <openscope-ast> pointer_seq knr_direct_declarator
+ /. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
+
+
+identifier_list
+ ::= 'identifier'
+ /. $Build consumeIdentifierKnR(); $EndBuild ./
+ | identifier_list ',' 'identifier'
+ /. $Build consumeIdentifierKnR(); $EndBuild ./
+
+
+array_modifier
+ ::= '[' ']'
+ /. $Build consumeDirectDeclaratorArrayModifier(false); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); $EndBuild ./
+ | '[' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorArrayModifier(true); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); $EndBuild ./
+ | '[' 'static' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); $EndBuild ./
+ | '[' 'static' <openscope-ast> array_modifier_type_qualifiers assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers 'static' assignment_expression ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); $EndBuild ./
+ | '[' '*' ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); $EndBuild ./
+ | '[' <openscope-ast> array_modifier_type_qualifiers '*' ']'
+ /. $Build consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); $EndBuild ./
+
+
+array_modifier_type_qualifiers
+ ::= type_qualifier_list
+
+
+pointer_seq
+ ::= '*'
+ /. $Build consumePointer(); $EndBuild ./
+ | pointer_seq '*'
+ /. $Build consumePointer(); $EndBuild ./
+ | '*' <openscope-ast> type_qualifier_list
+ /. $Build consumePointerTypeQualifierList(); $EndBuild ./
+ | pointer_seq '*' <openscope-ast> type_qualifier_list
+ /. $Build consumePointerTypeQualifierList(); $EndBuild ./
+
+
+type_qualifier_list
+ ::= type_qualifier
+ | type_qualifier_list type_qualifier
+
+
+parameter_type_list
+ ::= parameter_list
+ /. $Build consumeEmpty(); $EndBuild ./
+ | parameter_list ',' '...'
+ /. $Build consumePlaceHolder(); $EndBuild ./
+ | '...' -- not spec
+ /. $Build consumePlaceHolder(); $EndBuild ./
+
+
+parameter_list
+ ::= parameter_declaration
+ | parameter_list ',' parameter_declaration
+
+
+parameter_declaration
+ ::= declaration_specifiers complete_parameter_declarator
+ /. $Build consumeParameterDeclaration(); $EndBuild ./
+ | declaration_specifiers
+ /.
+ $Action
+ $Resolve consumeParameterDeclarationWithoutDeclarator(); $EndResolve
+ $Builder consumeParameterDeclarationWithoutDeclarator(); $EndBuilder
+ $EndAction
+ ./
+
+
+complete_parameter_declarator
+ ::= declarator
+ /.
+ $Action
+ $Resolve consumeDeclaratorCompleteParameter(); $EndResolve
+ $EndAction
+ ./
+ | abstract_declarator
+ /.
+ $Action
+ $Resolve consumeDeclaratorCompleteParameter(); $EndResolve
+ $EndAction
+ ./
+
+
+-- only used in expressions, eg) sizeof, casts etc...
+type_name
+ ::= specifier_qualifier_list
+ /.
+ $Action
+ $Resolve consumeTypeId(); $EndResolve
+ $Builder consumeTypeId(false); $EndBuilder
+ $EndAction
+ ./
+ | specifier_qualifier_list abstract_declarator
+ /.
+ $Action
+ $Resolve consumeTypeId(); $EndResolve
+ $Builder consumeTypeId(true); $EndBuilder
+ $EndAction
+ ./
+
+
+abstract_declarator -- a declarator that does not include an identifier
+ ::= direct_abstract_declarator
+ | <openscope-ast> pointer_seq
+ /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
+ | <openscope-ast> pointer_seq direct_abstract_declarator
+ /. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
+
+
+direct_abstract_declarator
+ ::= basic_direct_abstract_declarator
+ | array_direct_abstract_declarator
+ | function_direct_abstract_declarator
+
+
+basic_direct_abstract_declarator
+ ::= '(' abstract_declarator ')'
+ /. $Build consumeDirectDeclaratorBracketed(); $EndBuild ./
+
+
+array_direct_abstract_declarator
+ ::= array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(false); $EndBuild ./
+ | array_direct_abstract_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+ | basic_direct_abstract_declarator array_modifier
+ /. $Build consumeDirectDeclaratorArrayDeclarator(true); $EndBuild ./
+
+
+function_direct_abstract_declarator
+ ::= '(' ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(false, false); $EndBuild ./
+ | basic_direct_abstract_declarator '(' ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, false); $EndBuild ./
+ | '(' <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(false, true); $EndBuild ./
+ | basic_direct_abstract_declarator '(' <openscope-ast> parameter_type_list ')'
+ /. $Build consumeDirectDeclaratorFunctionDeclarator(true, true); $EndBuild ./
+
+
+initializer
+ ::= assignment_expression
+ /. $Build consumeInitializer(); $EndBuild ./
+ | '{' <openscope-ast> initializer_list comma_opt '}'
+ /. $Build consumeInitializerList(); $EndBuild ./
+
+initializer_list
+ ::= initializer
+ | designated_initializer
+ | initializer_list ',' initializer
+ | initializer_list ',' designated_initializer
+
+
+designated_initializer
+ ::= <openscope-ast> designation '=' initializer
+ /. $Build consumeInitializerDesignated(); $EndBuild ./
+
+
+designation
+ ::= designator_list
+
+
+designator_list
+ ::= designator_base
+ | designator_list designator
+
+
+designator_base
+ ::= '[' constant_expression ']'
+ /. $Build consumeDesignatorArray(); $EndBuild ./
+ | '.' identifier_or_typedefname
+ /. $Build consumeDesignatorField(); $EndBuild ./
+
+designator
+ ::= '[' constant_expression ']'
+ /. $Build consumeDesignatorArray(); $EndBuild ./
+ | '.' identifier_or_typedefname
+ /. $Build consumeDesignatorField(); $EndBuild ./
+
+
+-------------------------------------------------------------------------------------------
+-- External Definitions
+-------------------------------------------------------------------------------------------
+
+translation_unit
+ ::= external_declaration_list
+ /. $Build consumeTranslationUnit(); $EndBuild ./
+ | $empty
+ /. $Build consumeTranslationUnit(); $EndBuild ./
+
+
+external_declaration_list
+ ::= external_declaration
+ | external_declaration_list external_declaration
+
+
+external_declaration
+ ::= function_definition
+ | declaration
+ | ';'
+ /. $Build consumeDeclarationEmpty(); $EndBuild ./
+ | ERROR_TOKEN
+ /. $Build consumeDeclarationProblem(); $EndBuild ./
+
+
+-- Used by KnR
+declaration_list
+ ::= declaration
+ | declaration_list declaration
+
+
+-- The extra <openscope-ast> nonterminal before declarator in this rule is only there
+-- to avoid a shift/reduce error with the rule for declaration.
+-- The symbol table scoped is opened in the rule for function_direct_declarator
+function_definition
+ ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ /.
+ $Action
+ $Resolve consumeFunctionDefinition(); $EndResolve
+ $Builder consumeFunctionDefinition(true); $EndBuilder
+ $EndAction
+ ./
+
+ -- this rule is here as a special case (its not C99 spec) just to support implicit int in function definitions
+ | <openscope-declaration> <openscope-ast> function_declarator function_body
+ /.
+ $Action
+ $Resolve consumeFunctionDefinition(); $EndResolve
+ $Builder consumeFunctionDefinition(false); $EndBuilder
+ $EndAction
+ ./
+
+ | declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ /.
+ $Action
+ $Resolve consumeFunctionDefinition(); $EndResolve
+ $Builder consumeFunctionDefinitionKnR(); $EndBuilder
+ $EndAction
+ ./
+
+
+-- same syntax as compound_statement but a symbol table scope isn't opened
+function_body
+ ::= '{' '}'
+ /. $Build consumeStatementCompoundStatement(false); $EndBuild ./
+ | '{' <openscope-ast> block_item_list '}'
+ /. $Build consumeStatementCompoundStatement(true); $EndBuild ./
+
+$End
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/common.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/common.g
index 481c93ff24..530e744f92 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/common.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/common.g
@@ -33,76 +33,49 @@ $Define
$ast_class /.Object./
$data_class /. Object ./ -- allow anything to be passed between actions
- --$additional_interfaces /. , IParserActionTokenProvider, IParser ./
- $additional_interfaces /. ./
+ $additional_interfaces /. , IParserActionTokenProvider, IParser ./
$build_action_class /. ./
$resolve_action_class /. ./
$node_factory_create_expression /. ./
-
$lexer_class /. ./
$action_class /. ./
-
- $UndoResolver /.$Undo action.resolver.undo(); $EndUndo./
-
- $Resolve /. $BeginTrial $resolve.
- ./
- $EndResolve /. $EndTrial
- $UndoResolver
- ./ -- undo actions are automatically generated for binding resolution actions
-
- $Builder /. $BeginFinal $builder.
- ./
- $EndBuilder /. /*$builder.getASTStack().print();*/ $EndFinal ./
+ $Build /. $BeginAction action. ./
+ $EndBuild /. $EndAction ./
+$End
- $Build /. $Action $Builder ./
- $EndBuild /. $EndBuilder $EndAction ./
-
- $resolve /. action.resolver./
- $builder /. action.builder./
--- comment out when using trial/undo
- --$Action /. $BeginAction ./
- --$BeginFinal /. ./
- --$EndFinal /. ./
- --$BeginTrial /. ./
- --$EndTrial /. ./
- --$Undo /. ./
- --$EndUndo /. ./
+$Globals
+/.
+ import java.util.*;
+ import org.eclipse.cdt.core.dom.ast.*;
+ import org.eclipse.cdt.core.dom.lrparser.IParser;
+ import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+ import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+./
$End
-
$Headers
/.
- private $action_class action;
+ private $build_action_class action;
- //public $action_type() { // constructor
- //}
+ public $action_type() { // constructor
+ }
private void initActions(IASTTranslationUnit tu) {
- // binding resolution actions need access to IASTName nodes, temporary
- action = new $action_class();
- action.resolver = new $resolve_action_class(this);
- action.builder = new $build_action_class($node_factory_create_expression, this, tu);
- action.builder.setTokenMap($sym_class.orderedTerminalSymbols);
- //setParserAction(action);
+ action = new $build_action_class($node_factory_create_expression, this, tu);
+ action.setTokenMap($sym_class.orderedTerminalSymbols);
}
public void addToken(IToken token) {
- token.setKind(mapKind(token.getKind()));
+ token.setKind(mapKind(token.getKind())); // TODO does mapKind need to be called?
super.addToken(token);
}
- public void setTokens(List<IToken> tokens) {
- resetTokenStream();
- for(IToken token : tokens) {
- addToken(token);
- }
- }
public IASTCompletionNode parse(IASTTranslationUnit tu) {
// this has to be done, or... kaboom!
@@ -114,22 +87,46 @@ $Headers
super.resetTokenStream(); // allow tokens to be garbage collected
// the completion node may be null
- IASTCompletionNode compNode = action.builder.getASTCompletionNode();
+ IASTCompletionNode compNode = action.getASTCompletionNode();
- action = null;
- parserAction = null;
+ //action = null;
+ //parserAction = null;
return compNode;
}
+ // uncomment this method to use with backtracking parser
+ public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
+ }
+
+./
+$End
+
+$Globals
+/.
+ import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
+ import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
+./
+$End
+
+$Headers
+/.
- public int getKind(int i) {
- int kind = super.getKind(i);
- // lexer feedback hack!
- //if(kind == $sym_class.TK_identifier && action.resolver.isTypedef(getTokenText(i))) {
- // kind = $sym_class.TK_TypedefName;
- //}
- return kind;
+ private ITokenMap tokenMap = null;
+
+ public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ addToken(new Token(null, 0, 0, 0)); // dummy token
+ for(IToken token : tokens) {
+ token.setKind(tokenMap.mapKind(token.getKind()));
+ addToken(token);
+ }
+ addToken(new Token(null, 0, 0, $sym_class.TK_EOF_TOKEN));
}
+ public $action_type(String[] mapFrom) { // constructor
+ tokenMap = new TokenMap($sym_class.orderedTerminalSymbols, mapFrom);
+ }
+
./
$End \ No newline at end of file
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g
index ae71784799..c306206738 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g
@@ -1587,7 +1587,8 @@ conversion_declarator
::= <openscope-ast> ptr_operator_seq
/. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
-
+
+
--conversion_declarator_opt
-- ::= conversion_declarator
-- | $empty
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
index 47e7dbe55c..ad3cd0a841 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
@@ -15,6 +15,7 @@ import java.util.List;
import lpg.lpgjavaruntime.IToken;
+import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
import org.eclipse.cdt.core.dom.ast.IASTArraySubscriptExpression;
@@ -52,9 +53,9 @@ import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
import org.eclipse.cdt.core.dom.ast.IASTProblem;
+import org.eclipse.cdt.core.dom.ast.IASTProblemExpression;
import org.eclipse.cdt.core.dom.ast.IASTProblemHolder;
import org.eclipse.cdt.core.dom.ast.IASTReturnStatement;
-import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
@@ -65,13 +66,13 @@ import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
import org.eclipse.cdt.core.dom.ast.c.ICASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCastExpression;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99NoCastExpressionParser;
+import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
-import org.eclipse.cdt.internal.core.dom.parser.c.CASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
/**
@@ -117,6 +118,11 @@ public abstract class BuildASTParserAction {
private final IASTNodeFactory nodeFactory;
+ protected static final ASTVisitor EMPTY_VISITOR = new ASTVisitor() {
+ { shouldVisitStatements = true; }
+ };
+
+
/**
* Completion tokens are represented by different kinds by different parsers.
@@ -165,6 +171,13 @@ public abstract class BuildASTParserAction {
}
+ /**
+ * Used to get the result of secondary parsers.
+ */
+ public Object getSecondaryParseResult() {
+ return astStack.pop();
+ }
+
protected static int offset(IToken token) {
@@ -297,6 +310,9 @@ public abstract class BuildASTParserAction {
IASTNode d = declarations[declarations.length-1];
setOffsetAndLength(tu, 0, offset(d) + length(d));
}
+
+ // resolve ambiguities
+ tu.accept(EMPTY_VISITOR);
if(TRACE_AST_STACK) System.out.println(astStack);
}
@@ -439,6 +455,8 @@ public abstract class BuildASTParserAction {
/**
* @param operator constant for {@link ICPPASTCastExpression}
+ *
+ * TODO Remove C99 specific code
*/
public void consumeExpressionCast(int operator) {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
@@ -447,7 +465,18 @@ public abstract class BuildASTParserAction {
IASTTypeId typeId = (IASTTypeId) astStack.pop();
IASTCastExpression expr = nodeFactory.newCastExpression(operator, typeId, operand);
setOffsetAndLength(expr);
- astStack.push(expr);
+
+ // try parsing as non-cast to resolve ambiguities
+ C99NoCastExpressionParser alternateParser = new C99NoCastExpressionParser(C99Parsersym.orderedTerminalSymbols);
+ alternateParser.setTokens(parser.getRuleTokens());
+ alternateParser.parse(tu);
+ IASTExpression alternateExpr = alternateParser.getParseResult();
+
+ if(alternateExpr == null || alternateExpr instanceof IASTProblemExpression)
+ astStack.push(expr);
+ else
+ astStack.push(nodeFactory.newAmbiguousExpression(expr, alternateExpr));
+
if(TRACE_AST_STACK) System.out.println(astStack);
}
@@ -598,6 +627,7 @@ public abstract class BuildASTParserAction {
}
+
/**
* compound_statement ::= <openscope> '{' block_item_list '}'
*
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/IASTNodeFactory.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/IASTNodeFactory.java
index 276749f52f..55325fa08a 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/IASTNodeFactory.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/IASTNodeFactory.java
@@ -62,6 +62,8 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousStatement;
/**
@@ -69,6 +71,7 @@ import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
*
* @author Mike Kucera
*/
+@SuppressWarnings("restriction")
public interface IASTNodeFactory {
public IASTName newName(char[] name);
@@ -172,4 +175,8 @@ public interface IASTNodeFactory {
public IASTFieldDeclarator newFieldDeclarator(IASTName name, IASTExpression bitFieldSize);
+ public IASTAmbiguousStatement newAmbiguousStatement(IASTStatement... statements);
+
+ public IASTAmbiguousExpression newAmbiguousExpression(IASTExpression... expressions);
+
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99ASTNodeFactory.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99ASTNodeFactory.java
index 1dadbed042..d6eca72242 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99ASTNodeFactory.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99ASTNodeFactory.java
@@ -384,12 +384,12 @@ public class C99ASTNodeFactory implements IC99ASTNodeFactory {
return new CASTProblem(id, arg, warn, error);
}
- public IASTAmbiguousExpression newAmbiguousExpression() {
- return new CASTAmbiguousExpression();
+ public IASTAmbiguousExpression newAmbiguousExpression(IASTExpression... expressions) {
+ return new CASTAmbiguousExpression(expressions);
}
- public IASTAmbiguousStatement newAmbiguousStatement() {
- return new CASTAmbiguousStatement();
+ public IASTAmbiguousStatement newAmbiguousStatement(IASTStatement... statements) {
+ return new CASTAmbiguousStatement(statements);
}
public IASTTranslationUnit newTranslationUnit() {
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
index d7786b9037..f2bed3655b 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/c99/C99BuildASTParserAction.java
@@ -42,20 +42,19 @@ import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
-import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
-import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
import org.eclipse.cdt.core.dom.ast.IASTInitializer;
import org.eclipse.cdt.core.dom.ast.IASTInitializerList;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTPointer;
+import org.eclipse.cdt.core.dom.ast.IASTProblemExpression;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator;
@@ -63,6 +62,8 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IASTSwitchStatement;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
+import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
+import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
import org.eclipse.cdt.core.dom.ast.IASTWhileStatement;
import org.eclipse.cdt.core.dom.ast.c.ICASTArrayDesignator;
import org.eclipse.cdt.core.dom.ast.c.ICASTArrayModifier;
@@ -82,8 +83,14 @@ import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
import org.eclipse.cdt.core.dom.lrparser.util.CollectionUtils;
import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99ExpressionStatementParser;
+import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99NoCastExpressionParser;
import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym;
+import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99SizeofExpressionParser;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousStatement;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTAmbiguousExpression;
/**
* Semantic actions called by the C99 parser to build an AST.
@@ -171,6 +178,31 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
if(TRACE_AST_STACK) System.out.println(astStack);
}
+ /**
+ * Lots of rules, no need to list them.
+ * @param operator From IASTUnaryExpression
+ */
+ public void consumeExpressionSizeofTypeId() {
+ if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
+
+ IASTTypeId typeId = (IASTTypeId) astStack.pop();
+ IASTTypeIdExpression expr = nodeFactory.newTypeIdExpression(IASTTypeIdExpression.op_sizeof, typeId);
+ setOffsetAndLength(expr);
+
+ // try parsing as an expression to resolve ambiguities
+ C99SizeofExpressionParser alternateParser = new C99SizeofExpressionParser(C99Parsersym.orderedTerminalSymbols);
+ alternateParser.setTokens(parser.getRuleTokens());
+ alternateParser.parse(tu);
+ IASTExpression alternateExpr = alternateParser.getParseResult();
+
+ if(alternateExpr == null || alternateExpr instanceof IASTProblemExpression)
+ astStack.push(expr);
+ else
+ astStack.push(nodeFactory.newAmbiguousExpression(expr, alternateExpr));
+
+ if(TRACE_AST_STACK) System.out.println(astStack);
+ }
+
/**
* Sets a token specifier.
@@ -648,13 +680,30 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
IASTDeclaration decl = (IASTDeclaration) astStack.pop();
+ IASTDeclarationStatement declarationStatement = nodeFactory.newDeclarationStatement(decl);
+ setOffsetAndLength(declarationStatement);
- if(disambiguateHackIdentifierExpression(decl))
- return;
+ // attempt to also parse the tokens as an expression
+ IASTExpressionStatement expressionStatement = null;
+ if(decl instanceof IASTSimpleDeclaration) {
+ // TODO this probably has bad performance
+ C99ExpressionStatementParser expressionParser = new C99ExpressionStatementParser(C99Parsersym.orderedTerminalSymbols);
+ expressionParser.setTokens(parser.getRuleTokens());
+ // need to pass tu because any completion nodes need to be linked directly to the root
+ expressionParser.parse(tu);
+ IASTExpression expr = expressionParser.getParseResult();
+
+ if(expr != null && !(expr instanceof IASTProblemExpression)) { // the parse may fail
+ expressionStatement = nodeFactory.newExpressionStatement(expr);
+ setOffsetAndLength(expressionStatement);
+ }
+ }
- IASTDeclarationStatement stat = nodeFactory.newDeclarationStatement(decl);
- setOffsetAndLength(stat);
- astStack.push(stat);
+ if(expressionStatement == null)
+ astStack.push(declarationStatement);
+ else
+ astStack.push(nodeFactory.newAmbiguousStatement(declarationStatement, expressionStatement));
+
if(TRACE_AST_STACK) System.out.println(astStack);
}
@@ -662,46 +711,46 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
-
- /**
- * Kludgy way to disambiguate a certain case.
- * An identifier alone on a line will be parsed as a declaration
- * but it probably should be an expression.
- * eg) i;
- *
- * This only happens in the presence of a completion token.
- *
- * @return true if the hack was applied
- */
- private boolean disambiguateHackIdentifierExpression(IASTDeclaration decl) {
- if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
-
- // this is only meant to work with content assist
- List<IToken> tokens = parser.getRuleTokens();
- if(tokens.size() != 2 || tokens.get(0).getKind() == TK_typedef)
- return false;
-
- if(decl instanceof IASTSimpleDeclaration) {
- IASTSimpleDeclaration declaration = (IASTSimpleDeclaration) decl;
- if(declaration.getDeclarators() == IASTDeclarator.EMPTY_DECLARATOR_ARRAY) {
- IASTDeclSpecifier declSpec = declaration.getDeclSpecifier();
- if(declSpec instanceof ICASTTypedefNameSpecifier) {
- ICASTTypedefNameSpecifier typedefNameSpec = (ICASTTypedefNameSpecifier) declSpec;
- IASTName name = typedefNameSpec.getName();
-
- if(offset(name) == offset(typedefNameSpec) && length(name) == length(typedefNameSpec)) {
- IASTIdExpression idExpr = nodeFactory.newIdExpression(name);
- IASTExpressionStatement stat = nodeFactory.newExpressionStatement(idExpr);
-
- setOffsetAndLength(stat);
- astStack.push(stat);
- return true;
- }
- }
- }
- }
- return false;
- }
+//
+// /**
+// * Kludgy way to disambiguate a certain case.
+// * An identifier alone on a line will be parsed as a declaration
+// * but it probably should be an expression.
+// * eg) i;
+// *
+// * This only happens in the presence of a completion token.
+// *
+// * @return true if the hack was applied
+// */
+// private boolean disambiguateHackIdentifierExpression(IASTDeclaration decl) {
+// if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
+//
+// // this is only meant to work with content assist
+// List<IToken> tokens = parser.getRuleTokens();
+// if(tokens.size() != 2 || tokens.get(0).getKind() == TK_typedef)
+// return false;
+//
+// if(decl instanceof IASTSimpleDeclaration) {
+// IASTSimpleDeclaration declaration = (IASTSimpleDeclaration) decl;
+// if(declaration.getDeclarators() == IASTDeclarator.EMPTY_DECLARATOR_ARRAY) {
+// IASTDeclSpecifier declSpec = declaration.getDeclSpecifier();
+// if(declSpec instanceof ICASTTypedefNameSpecifier) {
+// ICASTTypedefNameSpecifier typedefNameSpec = (ICASTTypedefNameSpecifier) declSpec;
+// IASTName name = typedefNameSpec.getName();
+//
+// if(offset(name) == offset(typedefNameSpec) && length(name) == length(typedefNameSpec)) {
+// IASTIdExpression idExpr = nodeFactory.newIdExpression(name);
+// IASTExpressionStatement stat = nodeFactory.newExpressionStatement(idExpr);
+//
+// setOffsetAndLength(stat);
+// astStack.push(stat);
+// return true;
+// }
+// }
+// }
+// }
+// return false;
+// }
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPASTNodeFactory.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPASTNodeFactory.java
index 2117e077e9..51f15475d5 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPASTNodeFactory.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPASTNodeFactory.java
@@ -96,7 +96,13 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
import org.eclipse.cdt.core.dom.lrparser.action.ASTCompletionNode;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTASMDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguousDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguousExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguousStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayDeclarator;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArraySubscriptExpression;
@@ -533,4 +539,16 @@ public class CPPASTNodeFactory implements ICPPASTNodeFactory {
return new CPPASTTemplatedTypeTemplateParameter(name, idExpression);
}
+ public IASTAmbiguousDeclaration newAmbiguousDeclaration(IASTDeclaration... declarations) {
+ return new CPPASTAmbiguousDeclaration(declarations);
+ }
+
+ public IASTAmbiguousExpression newAmbiguousExpression(IASTExpression... expressions) {
+ return new CPPASTAmbiguousExpression(expressions);
+ }
+
+ public IASTAmbiguousStatement newAmbiguousStatement(IASTStatement... statements) {
+ return new CPPASTAmbiguousStatement(statements);
+ }
+
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/ICPPASTNodeFactory.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/ICPPASTNodeFactory.java
index 3c8d8293d2..f1a1ebf034 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/ICPPASTNodeFactory.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/ICPPASTNodeFactory.java
@@ -52,12 +52,14 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
import org.eclipse.cdt.core.dom.lrparser.action.IASTNodeFactory;
+import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration;
/**
* TODO remove CPP from method names.
*
* @author Mike Kucera
*/
+@SuppressWarnings("restriction")
public interface ICPPASTNodeFactory extends IASTNodeFactory {
public ICPPASTOperatorName newCPPOperatorName(char[] name);
@@ -131,4 +133,6 @@ public interface ICPPASTNodeFactory extends IASTNodeFactory {
public ICPPASTSimpleTypeTemplateParameter newSimpleTypeTemplateParameter(int type, IASTName name, IASTTypeId typeId);
public ICPPASTTemplatedTypeTemplateParameter newTemplatedTypeTemplateParameter(IASTName name, IASTExpression idExpression);
+
+ public IASTAmbiguousDeclaration newAmbiguousDeclaration(IASTDeclaration... declarations);
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParser.java
new file mode 100644
index 0000000000..62caf96166
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParser.java
@@ -0,0 +1,1250 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+import lpg.lpgjavaruntime.*;
+
+import java.util.*;
+import org.eclipse.cdt.core.dom.ast.*;
+import org.eclipse.cdt.core.dom.lrparser.IParser;
+import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+
+import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
+import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
+
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
+
+public class C99ExpressionStatementParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
+{
+ private static ParseTable prs = new C99ExpressionStatementParserprs();
+ private BacktrackingParser btParser;
+
+ public BacktrackingParser getParser() { return btParser; }
+ private void setResult(Object object) { btParser.setSym1(object); }
+ public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+ public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+ public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+
+ public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+ public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+ public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+ public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+ public int getLeftSpan() { return btParser.getFirstToken(); }
+ public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); }
+
+ public int getRightSpan() { return btParser.getLastToken(); }
+ public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+ public int getRhsErrorTokenIndex(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (err instanceof ErrorToken ? index : 0);
+ }
+ public ErrorToken getRhsErrorIToken(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (ErrorToken) (err instanceof ErrorToken ? err : null);
+ }
+
+ public C99ExpressionStatementParser(LexStream lexStream)
+ {
+ super(lexStream);
+
+ try
+ {
+ super.remapTerminalSymbols(orderedTerminalSymbols(), C99ExpressionStatementParserprs.EOFT_SYMBOL);
+ }
+ catch(NullExportedSymbolsException e) {
+ }
+ catch(NullTerminalSymbolsException e) {
+ }
+ catch(UnimplementedTerminalsException e)
+ {
+ java.util.ArrayList unimplemented_symbols = e.getSymbols();
+ System.out.println("The Lexer will not scan the following token(s):");
+ for (int i = 0; i < unimplemented_symbols.size(); i++)
+ {
+ Integer id = (Integer) unimplemented_symbols.get(i);
+ System.out.println(" " + C99ExpressionStatementParsersym.orderedTerminalSymbols[id.intValue()]);
+ }
+ System.out.println();
+ }
+ catch(UndefinedEofSymbolException e)
+ {
+ throw new Error(new UndefinedEofSymbolException
+ ("The Lexer does not implement the Eof symbol " +
+ C99ExpressionStatementParsersym.orderedTerminalSymbols[C99ExpressionStatementParserprs.EOFT_SYMBOL]));
+ }
+ }
+
+ public String[] orderedTerminalSymbols() { return C99ExpressionStatementParsersym.orderedTerminalSymbols; }
+ public String getTokenKindName(int kind) { return C99ExpressionStatementParsersym.orderedTerminalSymbols[kind]; }
+ public int getEOFTokenKind() { return C99ExpressionStatementParserprs.EOFT_SYMBOL; }
+ public PrsStream getParseStream() { return (PrsStream) this; }
+
+ //
+ // Report error message for given error_token.
+ //
+ public final void reportErrorTokenMessage(int error_token, String msg)
+ {
+ int firsttok = super.getFirstErrorToken(error_token),
+ lasttok = super.getLastErrorToken(error_token);
+ String location = super.getFileName() + ':' +
+ (firsttok > lasttok
+ ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
+ : (super.getLine(error_token) + ":" +
+ super.getColumn(error_token) + ":" +
+ super.getEndLine(error_token) + ":" +
+ super.getEndColumn(error_token)))
+ + ": ";
+ super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
+ }
+
+ public Object parser()
+ {
+ return parser(null, 0);
+ }
+
+ public Object parser(Monitor monitor)
+ {
+ return parser(monitor, 0);
+ }
+
+ public Object parser(int error_repair_count)
+ {
+ return parser(null, error_repair_count);
+ }
+
+ public Object parser(Monitor monitor, int error_repair_count)
+ {
+ try
+ {
+ btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ }
+ catch (NotBacktrackParseTableException e)
+ {
+ throw new Error(new NotBacktrackParseTableException
+ ("Regenerate C99ExpressionStatementParserprs.java with -BACKTRACK option"));
+ }
+ catch (BadParseSymFileException e)
+ {
+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- C99ExpressionStatementParsersym.java"));
+ }
+
+ try
+ {
+ return (Object) btParser.parse(error_repair_count);
+ }
+ catch (BadParseException e)
+ {
+ reset(e.error_token); // point to error token
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+ diagnoseParser.diagnose(e.error_token);
+ }
+
+ return null;
+ }
+
+
+private C99BuildASTParserAction action;
+
+public C99ExpressionStatementParser() { // constructor
+}
+
+private void initActions(IASTTranslationUnit tu) {
+ action = new C99BuildASTParserAction ( C99ASTNodeFactory.DEFAULT_INSTANCE , this, tu);
+ action.setTokenMap( C99ExpressionStatementParsersym .orderedTerminalSymbols);
+}
+
+
+public void addToken(IToken token) {
+ token.setKind(mapKind(token.getKind())); // TODO does mapKind need to be called?
+ super.addToken(token);
+}
+
+
+public IASTCompletionNode parse(IASTTranslationUnit tu) {
+ // this has to be done, or... kaboom!
+ setStreamLength(getSize());
+ initActions(tu);
+
+ final int errorRepairCount = -1; // -1 means full error handling
+ parser(null, errorRepairCount); // do the actual parse
+ super.resetTokenStream(); // allow tokens to be garbage collected
+
+ // the completion node may be null
+ IASTCompletionNode compNode = action.getASTCompletionNode();
+
+ //action = null;
+ //parserAction = null;
+ return compNode;
+}
+
+// uncomment this method to use with backtracking parser
+public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
+}
+
+
+
+private ITokenMap tokenMap = null;
+
+public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ addToken(new Token(null, 0, 0, 0)); // dummy token
+ for(IToken token : tokens) {
+ token.setKind(tokenMap.mapKind(token.getKind()));
+ addToken(token);
+ }
+ addToken(new Token(null, 0, 0, C99ExpressionStatementParsersym .TK_EOF_TOKEN));
+}
+
+public C99ExpressionStatementParser(String[] mapFrom) { // constructor
+ tokenMap = new TokenMap( C99ExpressionStatementParsersym .orderedTerminalSymbols, mapFrom);
+}
+
+
+public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+}
+
+ public void ruleAction(int ruleNumber)
+ {
+ switch (ruleNumber)
+ {
+
+ //
+ // Rule 1: <openscope-ast> ::= $Empty
+ //
+ case 1: { action. openASTScope(); break;
+ }
+
+ //
+ // Rule 10: literal ::= integer
+ //
+ case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
+ }
+
+ //
+ // Rule 11: literal ::= floating
+ //
+ case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
+ }
+
+ //
+ // Rule 12: literal ::= charconst
+ //
+ case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
+ }
+
+ //
+ // Rule 13: literal ::= stringlit
+ //
+ case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
+ }
+
+ //
+ // Rule 15: primary_expression ::= primary_expression_id
+ //
+ case 15: { action. consumeExpressionID(); break;
+ }
+
+ //
+ // Rule 16: primary_expression ::= ( expression )
+ //
+ case 16: { action. consumeExpressionBracketed(); break;
+ }
+
+ //
+ // Rule 20: postfix_expression ::= postfix_expression [ expression ]
+ //
+ case 20: { action. consumeExpressionArraySubscript(); break;
+ }
+
+ //
+ // Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
+ //
+ case 21: { action. consumeExpressionFunctionCall(); break;
+ }
+
+ //
+ // Rule 22: postfix_expression ::= postfix_expression . member_name
+ //
+ case 22: { action. consumeExpressionFieldReference(false); break;
+ }
+
+ //
+ // Rule 23: postfix_expression ::= postfix_expression -> member_name
+ //
+ case 23: { action. consumeExpressionFieldReference(true); break;
+ }
+
+ //
+ // Rule 24: postfix_expression ::= postfix_expression ++
+ //
+ case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
+ }
+
+ //
+ // Rule 25: postfix_expression ::= postfix_expression --
+ //
+ case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
+ }
+
+ //
+ // Rule 26: postfix_expression ::= ( type_name ) { <openscope-ast> initializer_list comma_opt }
+ //
+ case 26: { action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 32: unary_expression ::= ++ unary_expression
+ //
+ case 32: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break;
+ }
+
+ //
+ // Rule 33: unary_expression ::= -- unary_expression
+ //
+ case 33: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break;
+ }
+
+ //
+ // Rule 34: unary_expression ::= & cast_expression
+ //
+ case 34: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break;
+ }
+
+ //
+ // Rule 35: unary_expression ::= * cast_expression
+ //
+ case 35: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break;
+ }
+
+ //
+ // Rule 36: unary_expression ::= + cast_expression
+ //
+ case 36: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 37: unary_expression ::= - cast_expression
+ //
+ case 37: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 38: unary_expression ::= ~ cast_expression
+ //
+ case 38: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break;
+ }
+
+ //
+ // Rule 39: unary_expression ::= ! cast_expression
+ //
+ case 39: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break;
+ }
+
+ //
+ // Rule 40: unary_expression ::= sizeof unary_expression
+ //
+ case 40: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break;
+ }
+
+ //
+ // Rule 41: unary_expression ::= sizeof ( type_name )
+ //
+ case 41: { action. consumeExpressionSizeofTypeId(); break;
+ }
+
+ //
+ // Rule 43: cast_expression ::= ( type_name ) cast_expression
+ //
+ case 43: { action. consumeExpressionCast(IASTCastExpression.op_cast); break;
+ }
+
+ //
+ // Rule 45: multiplicative_expression ::= multiplicative_expression * cast_expression
+ //
+ case 45: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); break;
+ }
+
+ //
+ // Rule 46: multiplicative_expression ::= multiplicative_expression / cast_expression
+ //
+ case 46: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); break;
+ }
+
+ //
+ // Rule 47: multiplicative_expression ::= multiplicative_expression % cast_expression
+ //
+ case 47: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); break;
+ }
+
+ //
+ // Rule 49: additive_expression ::= additive_expression + multiplicative_expression
+ //
+ case 49: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 50: additive_expression ::= additive_expression - multiplicative_expression
+ //
+ case 50: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 52: shift_expression ::= shift_expression << additive_expression
+ //
+ case 52: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); break;
+ }
+
+ //
+ // Rule 53: shift_expression ::= shift_expression >> additive_expression
+ //
+ case 53: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); break;
+ }
+
+ //
+ // Rule 55: relational_expression ::= relational_expression < shift_expression
+ //
+ case 55: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); break;
+ }
+
+ //
+ // Rule 56: relational_expression ::= relational_expression > shift_expression
+ //
+ case 56: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); break;
+ }
+
+ //
+ // Rule 57: relational_expression ::= relational_expression <= shift_expression
+ //
+ case 57: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); break;
+ }
+
+ //
+ // Rule 58: relational_expression ::= relational_expression >= shift_expression
+ //
+ case 58: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); break;
+ }
+
+ //
+ // Rule 60: equality_expression ::= equality_expression == relational_expression
+ //
+ case 60: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); break;
+ }
+
+ //
+ // Rule 61: equality_expression ::= equality_expression != relational_expression
+ //
+ case 61: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); break;
+ }
+
+ //
+ // Rule 63: AND_expression ::= AND_expression & equality_expression
+ //
+ case 63: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); break;
+ }
+
+ //
+ // Rule 65: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
+ //
+ case 65: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); break;
+ }
+
+ //
+ // Rule 67: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
+ //
+ case 67: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); break;
+ }
+
+ //
+ // Rule 69: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
+ //
+ case 69: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); break;
+ }
+
+ //
+ // Rule 71: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
+ //
+ case 71: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); break;
+ }
+
+ //
+ // Rule 73: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
+ //
+ case 73: { action. consumeExpressionConditional(); break;
+ }
+
+ //
+ // Rule 75: assignment_expression ::= unary_expression = assignment_expression
+ //
+ case 75: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
+ }
+
+ //
+ // Rule 76: assignment_expression ::= unary_expression *= assignment_expression
+ //
+ case 76: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); break;
+ }
+
+ //
+ // Rule 77: assignment_expression ::= unary_expression /= assignment_expression
+ //
+ case 77: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); break;
+ }
+
+ //
+ // Rule 78: assignment_expression ::= unary_expression %= assignment_expression
+ //
+ case 78: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); break;
+ }
+
+ //
+ // Rule 79: assignment_expression ::= unary_expression += assignment_expression
+ //
+ case 79: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); break;
+ }
+
+ //
+ // Rule 80: assignment_expression ::= unary_expression -= assignment_expression
+ //
+ case 80: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); break;
+ }
+
+ //
+ // Rule 81: assignment_expression ::= unary_expression <<= assignment_expression
+ //
+ case 81: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); break;
+ }
+
+ //
+ // Rule 82: assignment_expression ::= unary_expression >>= assignment_expression
+ //
+ case 82: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); break;
+ }
+
+ //
+ // Rule 83: assignment_expression ::= unary_expression &= assignment_expression
+ //
+ case 83: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); break;
+ }
+
+ //
+ // Rule 84: assignment_expression ::= unary_expression ^= assignment_expression
+ //
+ case 84: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); break;
+ }
+
+ //
+ // Rule 85: assignment_expression ::= unary_expression |= assignment_expression
+ //
+ case 85: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); break;
+ }
+
+ //
+ // Rule 88: expression_list ::= <openscope-ast> expression_list_actual
+ //
+ case 88: { action. consumeExpressionList(); break;
+ }
+
+ //
+ // Rule 90: expression_list_opt ::= $Empty
+ //
+ case 90: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 100: statement ::= ERROR_TOKEN
+ //
+ case 100: { action. consumeStatementProblem(); break;
+ }
+
+ //
+ // Rule 101: labeled_statement ::= identifier_or_typedefname : statement
+ //
+ case 101: { action. consumeStatementLabeled(); break;
+ }
+
+ //
+ // Rule 102: labeled_statement ::= case constant_expression :
+ //
+ case 102: { action. consumeStatementCase(); break;
+ }
+
+ //
+ // Rule 103: labeled_statement ::= default :
+ //
+ case 103: { action. consumeStatementDefault(); break;
+ }
+
+ //
+ // Rule 104: compound_statement ::= { }
+ //
+ case 104: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 105: compound_statement ::= { <openscope-ast> block_item_list }
+ //
+ case 105: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 109: block_item ::= declaration
+ //
+ case 109: { action. consumeStatementDeclaration(); break;
+ }
+
+ //
+ // Rule 110: expression_statement ::= ;
+ //
+ case 110: { action. consumeStatementNull(); break;
+ }
+
+ //
+ // Rule 111: expression_statement ::= expression_in_statement ;
+ //
+ case 111: { action. consumeStatementExpression(); break;
+ }
+
+ //
+ // Rule 112: selection_statement ::= if ( expression ) statement
+ //
+ case 112: { action. consumeStatementIf(false); break;
+ }
+
+ //
+ // Rule 113: selection_statement ::= if ( expression ) statement else statement
+ //
+ case 113: { action. consumeStatementIf(true); break;
+ }
+
+ //
+ // Rule 114: selection_statement ::= switch ( expression ) statement
+ //
+ case 114: { action. consumeStatementSwitch(); break;
+ }
+
+ //
+ // Rule 116: expression_opt ::= $Empty
+ //
+ case 116: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 117: iteration_statement ::= do statement while ( expression ) ;
+ //
+ case 117: { action. consumeStatementDoLoop(); break;
+ }
+
+ //
+ // Rule 118: iteration_statement ::= while ( expression ) statement
+ //
+ case 118: { action. consumeStatementWhileLoop(); break;
+ }
+
+ //
+ // Rule 119: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement
+ //
+ case 119: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 120: iteration_statement ::= for ( declaration expression_opt ; expression_opt ) statement
+ //
+ case 120: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 121: jump_statement ::= goto identifier_or_typedefname ;
+ //
+ case 121: { action. consumeStatementGoto(); break;
+ }
+
+ //
+ // Rule 122: jump_statement ::= continue ;
+ //
+ case 122: { action. consumeStatementContinue(); break;
+ }
+
+ //
+ // Rule 123: jump_statement ::= break ;
+ //
+ case 123: { action. consumeStatementBreak(); break;
+ }
+
+ //
+ // Rule 124: jump_statement ::= return ;
+ //
+ case 124: { action. consumeStatementReturn(false); break;
+ }
+
+ //
+ // Rule 125: jump_statement ::= return expression ;
+ //
+ case 125: { action. consumeStatementReturn(true); break;
+ }
+
+ //
+ // Rule 126: declaration ::= declaration_specifiers ;
+ //
+ case 126: { action. consumeDeclarationSimple(false); break;
+ }
+
+ //
+ // Rule 127: declaration ::= declaration_specifiers <openscope-ast> init_declarator_list ;
+ //
+ case 127: { action. consumeDeclarationSimple(true); break;
+ }
+
+ //
+ // Rule 128: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers
+ //
+ case 128: { action. consumeDeclarationSpecifiersSimple(); break;
+ }
+
+ //
+ // Rule 129: declaration_specifiers ::= <openscope-ast> struct_or_union_declaration_specifiers
+ //
+ case 129: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 130: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers
+ //
+ case 130: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 131: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers
+ //
+ case 131: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 132: declaration_specifiers ::= <openscope-ast> typdef_name_declaration_specifiers
+ //
+ case 132: { action. consumeDeclarationSpecifiersTypedefName(); break;
+ }
+
+ //
+ // Rule 157: init_declarator ::= complete_declarator = initializer
+ //
+ case 157: { action. consumeDeclaratorWithInitializer(true); break;
+ }
+
+ //
+ // Rule 159: storage_class_specifier ::= storage_class_specifier_token
+ //
+ case 159: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 165: simple_type_specifier ::= simple_type_specifier_token
+ //
+ case 165: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 178: typedef_name_in_declspec ::= Completion
+ //
+ case 178: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 179: typedef_name_in_declspec ::= identifier
+ //
+ case 179: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 182: struct_or_union_specifier ::= struct { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 182: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 183: struct_or_union_specifier ::= union { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 183: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 184: struct_or_union_specifier ::= struct identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 184: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 185: struct_or_union_specifier ::= union identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 185: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 186: elaborated_specifier ::= struct identifier_or_typedefname
+ //
+ case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 187: elaborated_specifier ::= union identifier_or_typedefname
+ //
+ case 187: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 188: elaborated_specifier ::= enum identifier_or_typedefname
+ //
+ case 188: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
+ }
+
+ //
+ // Rule 193: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
+ //
+ case 193: { action. consumeStructDeclaration(true); break;
+ }
+
+ //
+ // Rule 194: struct_declaration ::= specifier_qualifier_list ;
+ //
+ case 194: { action. consumeStructDeclaration(false); break;
+ }
+
+ //
+ // Rule 200: struct_declarator ::= : constant_expression
+ //
+ case 200: { action. consumeBitField(false); break;
+ }
+
+ //
+ // Rule 201: struct_declarator ::= declarator : constant_expression
+ //
+ case 201: { action. consumeBitField(true); break;
+ }
+
+ //
+ // Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 202: { action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 203: { action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 208: enumerator ::= identifier_or_typedefname
+ //
+ case 208: { action. consumeEnumerator(false); break;
+ }
+
+ //
+ // Rule 209: enumerator ::= identifier_or_typedefname = constant_expression
+ //
+ case 209: { action. consumeEnumerator(true); break;
+ }
+
+ //
+ // Rule 210: type_qualifier ::= type_qualifier_token
+ //
+ case 210: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 214: function_specifier ::= inline
+ //
+ case 214: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator
+ //
+ case 216: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 221: basic_direct_declarator ::= declarator_id_name
+ //
+ case 221: { action. consumeDirectDeclaratorIdentifier(); break;
+ }
+
+ //
+ // Rule 222: basic_direct_declarator ::= ( declarator )
+ //
+ case 222: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 223: declarator_id_name ::= identifier
+ //
+ case 223: { action. consumeIdentifierName(); break;
+ }
+
+ //
+ // Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier
+ //
+ case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier
+ //
+ case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 228: function_direct_declarator ::= basic_direct_declarator ( )
+ //
+ case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
+ //
+ case 230: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
+ //
+ case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
+ }
+
+ //
+ // Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
+ //
+ case 233: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 234: identifier_list ::= identifier
+ //
+ case 234: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 235: identifier_list ::= identifier_list , identifier
+ //
+ case 235: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 236: array_modifier ::= [ ]
+ //
+ case 236: { action. consumeDirectDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
+ //
+ case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
+ }
+
+ //
+ // Rule 238: array_modifier ::= [ assignment_expression ]
+ //
+ case 238: { action. consumeDirectDeclaratorArrayModifier(true); break;
+ }
+
+ //
+ // Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
+ }
+
+ //
+ // Rule 240: array_modifier ::= [ static assignment_expression ]
+ //
+ case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
+ }
+
+ //
+ // Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
+ //
+ case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 243: array_modifier ::= [ * ]
+ //
+ case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
+ }
+
+ //
+ // Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
+ //
+ case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
+ }
+
+ //
+ // Rule 246: pointer_seq ::= *
+ //
+ case 246: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 247: pointer_seq ::= pointer_seq *
+ //
+ case 247: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list
+ //
+ case 248: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
+ //
+ case 249: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 252: parameter_type_list ::= parameter_list
+ //
+ case 252: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 253: parameter_type_list ::= parameter_list , ...
+ //
+ case 253: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 254: parameter_type_list ::= ...
+ //
+ case 254: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
+ //
+ case 257: { action. consumeParameterDeclaration(); break;
+ }
+
+ //
+ // Rule 258: parameter_declaration ::= declaration_specifiers
+ //
+ case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break;
+ }
+
+ //
+ // Rule 261: type_name ::= specifier_qualifier_list
+ //
+ case 261: { action. consumeTypeId(false); break;
+ }
+
+ //
+ // Rule 262: type_name ::= specifier_qualifier_list abstract_declarator
+ //
+ case 262: { action. consumeTypeId(true); break;
+ }
+
+ //
+ // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq
+ //
+ case 264: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
+ //
+ case 265: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator )
+ //
+ case 269: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 270: array_direct_abstract_declarator ::= array_modifier
+ //
+ case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
+ }
+
+ //
+ // Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
+ //
+ case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
+ //
+ case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 273: function_direct_abstract_declarator ::= ( )
+ //
+ case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
+ }
+
+ //
+ // Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
+ //
+ case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
+ //
+ case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
+ }
+
+ //
+ // Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 277: initializer ::= assignment_expression
+ //
+ case 277: { action. consumeInitializer(); break;
+ }
+
+ //
+ // Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt }
+ //
+ case 278: { action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 283: designated_initializer ::= <openscope-ast> designation = initializer
+ //
+ case 283: { action. consumeInitializerDesignated(); break;
+ }
+
+ //
+ // Rule 287: designator_base ::= [ constant_expression ]
+ //
+ case 287: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 288: designator_base ::= . identifier_or_typedefname
+ //
+ case 288: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 289: designator ::= [ constant_expression ]
+ //
+ case 289: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 290: designator ::= . identifier_or_typedefname
+ //
+ case 290: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 291: translation_unit ::= external_declaration_list
+ //
+ case 291: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 292: translation_unit ::= $Empty
+ //
+ case 292: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 297: external_declaration ::= ;
+ //
+ case 297: { action. consumeDeclarationEmpty(); break;
+ }
+
+ //
+ // Rule 298: external_declaration ::= ERROR_TOKEN
+ //
+ case 298: { action. consumeDeclarationProblem(); break;
+ }
+
+ //
+ // Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ //
+ case 301: { action. consumeFunctionDefinition(true); break;
+ }
+
+ //
+ // Rule 302: function_definition ::= <openscope-ast> function_declarator function_body
+ //
+ case 302: { action. consumeFunctionDefinition(false); break;
+ }
+
+ //
+ // Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ //
+ case 303: { action. consumeFunctionDefinitionKnR(); break;
+ }
+
+ //
+ // Rule 304: function_body ::= { }
+ //
+ case 304: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 305: function_body ::= { <openscope-ast> block_item_list }
+ //
+ case 305: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 307: expression_parser_start ::= ERROR_TOKEN
+ //
+ case 307: { action. consumeExpressionProblem(); break;
+ }
+
+
+ default:
+ break;
+ }
+ return;
+ }
+}
+
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParserprs.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParserprs.java
new file mode 100644
index 0000000000..9daa5d2a4a
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParserprs.java
@@ -0,0 +1,1092 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+public class C99ExpressionStatementParserprs implements lpg.lpgjavaruntime.ParseTable, C99ExpressionStatementParsersym {
+
+ public interface IsKeyword {
+ public final static byte isKeyword[] = {0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0
+ };
+ };
+ public final static byte isKeyword[] = IsKeyword.isKeyword;
+ public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+ public interface BaseCheck {
+ public final static short baseCheck[] = {0,
+ 0,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,3,1,1,1,4,
+ 4,3,3,2,2,8,1,0,1,1,
+ 1,2,2,2,2,2,2,2,2,2,
+ 4,1,4,1,3,3,3,1,3,3,
+ 1,3,3,1,3,3,3,3,1,3,
+ 3,1,3,1,3,1,3,1,3,1,
+ 3,1,5,1,3,3,3,3,3,3,
+ 3,3,3,3,3,1,1,2,1,0,
+ 1,3,1,1,1,1,1,1,1,1,
+ 3,3,2,2,4,1,2,1,1,1,
+ 2,5,7,5,1,0,7,5,9,8,
+ 3,2,2,2,3,2,4,2,2,2,
+ 2,2,1,1,1,1,2,1,2,2,
+ 2,1,2,2,1,2,2,1,2,2,
+ 1,2,2,1,3,1,3,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,5,5,6,6,2,2,2,1,0,
+ 1,2,4,2,1,1,3,1,1,2,
+ 3,6,7,1,0,1,3,1,3,1,
+ 1,1,1,1,1,3,1,1,1,1,
+ 1,3,1,2,2,1,5,3,1,3,
+ 5,1,3,1,3,2,4,3,5,4,
+ 6,6,3,5,1,1,2,3,4,1,
+ 2,1,3,1,1,3,2,1,1,1,
+ 1,2,1,2,3,1,1,1,3,1,
+ 2,2,2,3,4,5,1,5,1,1,
+ 3,3,4,1,1,2,3,2,3,2,
+ 1,0,1,2,1,1,1,1,1,2,
+ 4,3,6,2,4,2,1,-38,0,0,
+ 0,0,0,0,0,-3,0,0,0,0,
+ 0,0,0,0,0,0,0,-2,0,0,
+ -5,-15,-31,-82,-17,0,0,0,0,-125,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-39,0,0,0,0,0,0,0,
+ 0,0,0,0,-18,-19,0,-20,0,0,
+ 0,0,0,0,0,-7,0,0,0,0,
+ 0,0,0,-54,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-32,0,
+ -174,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -169,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -181,-21,-22,-23,-187,-4,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-35,0,0,-144,
+ 0,0,-24,0,0,0,0,0,0,0,
+ 0,-25,0,0,0,0,0,-77,0,-75,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-143,
+ -26,0,0,0,-173,-27,0,-111,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-130,0,0,
+ 0,0,0,0,0,-195,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-189,0,0,0,0,0,0,0,
+ -36,0,0,0,0,0,0,0,0,0,
+ 0,0,-28,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-88,-89,-90,0,0,-58,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-59,0,0,
+ 0,0,0,0,0,-69,0,0,0,0,
+ 0,0,0,0,0,0,0,-60,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-61,0,0,
+ 0,0,0,0,0,-70,0,0,0,0,
+ 0,0,0,0,0,0,0,-62,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-63,0,0,
+ 0,0,0,0,0,-71,0,0,0,0,
+ 0,0,0,0,0,0,0,-64,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-65,0,0,
+ 0,0,0,0,0,-115,0,0,0,0,
+ 0,0,0,0,0,0,0,-66,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-67,0,0,
+ 0,0,0,0,0,-91,0,0,0,0,
+ 0,0,0,0,0,0,0,-68,0,0,
+ 0,0,0,0,0,-134,0,0,0,0,
+ 0,0,0,0,0,0,0,-40,0,0,
+ 0,0,0,0,0,-74,0,0,-92,-93,
+ -94,-83,-95,0,0,0,0,-148,0,0,
+ 0,0,0,0,0,-85,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -8,0,0,0,0,0,0,-72,0,0,
+ 0,0,0,-96,0,-97,-98,0,0,0,
+ 0,0,0,-149,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-172,0,0,0,0,0,0,
+ 0,-99,0,0,0,0,0,0,0,0,
+ 0,0,-186,0,0,0,0,0,0,0,
+ -100,0,0,0,0,0,0,0,0,0,
+ 0,-192,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -196,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-206,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-124,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-101,-133,-6,
+ 0,0,0,0,0,0,0,-57,0,0,
+ 0,0,0,0,0,-102,0,0,0,0,
+ 0,0,0,0,-114,0,0,0,0,0,
+ 0,-152,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-117,0,-108,-78,0,-110,
+ -171,0,0,-33,0,-112,0,0,0,-80,
+ -103,0,-131,-104,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,-105,0,0,0,0,0,0,0,
+ 0,0,-56,0,0,0,0,0,0,0,
+ -129,0,0,0,0,0,0,0,0,-53,
+ 0,0,0,0,0,0,0,-87,0,0,
+ 0,0,0,0,0,-183,-9,0,0,0,
+ 0,0,0,0,-119,-121,-122,0,0,0,
+ -191,-153,0,0,0,0,0,0,0,-48,
+ 0,0,0,0,0,0,0,-164,0,0,
+ 0,0,0,0,0,0,0,0,-106,0,
+ -107,0,0,-151,0,0,0,0,0,0,
+ 0,0,0,0,-50,0,0,0,0,0,
+ 0,0,-205,0,0,0,0,0,-126,-180,
+ 0,-137,-127,0,0,-132,0,0,0,0,
+ 0,-51,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-13,0,0,0,0,0,0,
+ -52,0,0,0,0,0,0,0,-118,0,
+ 0,0,-44,0,0,0,0,0,0,0,
+ 0,0,0,-10,0,0,0,0,0,0,
+ 0,0,-45,0,0,0,0,0,0,0,
+ -154,0,0,-46,0,0,0,0,0,0,
+ 0,-120,0,0,-47,0,0,0,0,0,
+ 0,0,-198,0,0,0,-123,-155,-150,-135,
+ 0,-49,0,0,0,0,0,0,0,-37,
+ 0,-159,-139,-76,-79,-142,-145,0,-165,-81,
+ 0,0,0,0,0,-207,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-188,0,0,
+ -166,-157,-146,0,-11,0,0,0,0,0,
+ 0,-12,0,0,0,0,0,0,-16,-178,
+ -29,0,-30,0,0,-147,0,-170,0,-197,
+ 0,-41,0,0,0,0,0,0,-176,0,
+ -208,0,0,0,0,0,0,0,0,-160,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-42,0,0,0,0,0,
+ 0,-43,0,0,0,0,0,0,-84,-193,
+ 0,0,0,-86,0,-73,0,0,0,0,
+ 0,0,-199,-116,-163,-1,-168,-113,-182,0,
+ 0,0,-177,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-138,0,-140,0,0,
+ 0,-158,0,0,0,0,0,0,0,0,
+ 0,-179,-184,0,0,-128,0,-194,0,0,
+ 0,0,0,0,0,0,-175,0,-141,0,
+ 0,-162,0,0,0,0,0,0,0,0,
+ 0,-190,-201,0,-203,0,-109,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-136,
+ 0,0,-167,0,0,0,0,0,0,0,
+ -14,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-161,-34,0,-55,0,-156,0,
+ -204,0,0,0,0,-185,0,-200,0,0,
+ -202,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0
+ };
+ };
+ public final static short baseCheck[] = BaseCheck.baseCheck;
+ public final int baseCheck(int index) { return baseCheck[index]; }
+ public final static short rhs[] = baseCheck;
+ public final int rhs(int index) { return rhs[index]; };
+
+ public interface BaseAction {
+ public final static char baseAction[] = {
+ 83,8,24,24,20,20,26,26,61,61,
+ 1,1,1,1,2,2,2,3,3,4,
+ 4,4,4,4,4,4,4,51,51,69,
+ 69,5,5,5,5,5,5,5,5,5,
+ 5,5,6,6,7,7,7,7,9,9,
+ 9,10,10,10,11,11,11,11,11,12,
+ 12,12,13,13,14,14,15,15,16,16,
+ 17,17,18,18,19,19,19,19,19,19,
+ 19,19,19,19,19,19,93,41,33,84,
+ 84,71,71,46,94,94,94,94,94,94,
+ 94,95,95,95,96,96,101,101,102,102,
+ 97,97,98,98,98,104,104,99,99,99,
+ 99,100,100,100,100,100,103,103,23,23,
+ 23,23,23,28,28,28,77,77,72,72,
+ 72,72,73,73,73,74,74,74,75,75,
+ 75,76,76,76,105,105,106,106,107,29,
+ 31,31,31,31,31,52,54,54,54,54,
+ 54,54,54,54,54,54,54,54,66,66,
+ 27,27,63,63,63,63,64,64,64,55,
+ 55,56,56,48,48,32,85,85,78,79,
+ 79,79,65,65,80,80,81,81,67,67,
+ 21,22,22,22,30,47,47,34,34,34,
+ 34,37,37,39,35,35,36,40,40,108,
+ 108,38,109,109,86,86,25,25,25,25,
+ 25,25,25,25,25,82,49,49,49,49,
+ 58,58,57,57,57,59,59,50,50,87,
+ 87,62,62,60,60,60,42,42,42,43,
+ 44,44,44,45,45,45,45,53,53,70,
+ 70,70,70,68,88,89,89,90,90,91,
+ 91,110,110,111,111,112,112,112,112,114,
+ 114,113,113,113,115,115,83,83,1,14,
+ 19,15,332,526,44,375,539,335,378,376,
+ 453,452,483,454,521,492,74,91,480,134,
+ 210,6,433,570,30,465,136,133,135,159,
+ 295,14,19,15,332,526,44,375,480,335,
+ 378,376,453,452,483,454,521,492,74,277,
+ 138,1289,165,341,14,19,15,332,42,44,
+ 615,142,145,148,151,53,32,306,249,331,
+ 1365,1100,1370,1499,1504,1158,341,14,19,15,
+ 332,42,39,279,341,14,19,15,332,42,
+ 44,375,23,335,378,376,453,1056,280,570,
+ 520,295,14,19,15,332,526,44,375,480,
+ 335,378,376,453,452,483,454,521,492,74,
+ 277,203,14,19,15,332,526,44,375,480,
+ 335,378,376,453,452,483,454,521,492,74,
+ 277,552,23,104,137,649,341,14,19,15,
+ 332,526,44,375,279,335,378,376,453,452,
+ 483,454,521,492,74,91,270,323,22,280,
+ 619,1500,1369,163,281,216,1182,218,1321,220,
+ 221,226,259,265,1088,498,268,1506,177,282,
+ 155,14,19,15,332,526,44,375,1518,335,
+ 378,376,453,452,483,454,521,492,74,1096,
+ 645,235,207,271,236,647,49,331,407,14,
+ 19,15,332,526,44,375,1556,335,378,376,
+ 453,452,483,454,521,492,74,1141,179,14,
+ 19,15,332,526,44,375,443,335,378,376,
+ 453,452,483,454,521,492,74,1349,1448,525,
+ 285,1517,237,318,14,19,15,332,526,44,
+ 375,323,335,378,376,453,452,483,454,521,
+ 492,74,277,341,14,19,15,332,526,44,
+ 375,16,335,378,376,453,452,483,454,521,
+ 492,74,92,429,459,187,286,193,341,14,
+ 19,15,332,526,44,375,283,335,378,376,
+ 453,452,483,454,521,492,74,85,341,14,
+ 19,15,332,526,44,375,323,335,378,376,
+ 453,452,483,454,521,492,74,84,341,14,
+ 19,15,332,526,44,375,1209,335,378,376,
+ 453,452,483,454,521,492,74,83,341,14,
+ 19,15,332,526,44,375,323,335,378,376,
+ 453,452,483,454,521,492,74,82,341,14,
+ 19,15,332,526,44,375,1211,335,378,376,
+ 453,452,483,454,521,492,74,81,341,14,
+ 19,15,332,526,44,375,323,335,378,376,
+ 453,452,483,454,521,492,74,80,341,14,
+ 19,15,332,526,44,375,21,335,378,376,
+ 453,452,483,454,521,492,74,79,341,14,
+ 19,15,332,526,44,375,323,335,378,376,
+ 453,452,483,454,521,492,74,78,341,14,
+ 19,15,332,526,44,375,269,335,378,376,
+ 453,452,483,454,521,492,74,77,341,14,
+ 19,15,332,526,44,375,255,335,378,376,
+ 453,452,483,454,521,492,74,76,341,14,
+ 19,15,332,526,44,375,54,335,378,376,
+ 453,452,483,454,521,492,74,75,341,14,
+ 19,15,332,42,44,806,211,134,210,591,
+ 601,606,441,608,136,133,135,159,341,14,
+ 19,15,332,526,44,375,558,335,378,376,
+ 453,452,483,454,521,492,74,1459,138,1332,
+ 165,341,14,19,15,332,42,38,597,142,
+ 145,148,151,1347,506,1587,607,416,1365,1100,
+ 1370,1499,1504,1158,341,14,19,15,332,526,
+ 44,375,20,335,378,376,453,452,483,454,
+ 521,492,74,1523,341,14,19,15,332,42,
+ 44,375,57,335,378,376,453,452,483,454,
+ 521,492,93,341,14,19,15,332,42,44,
+ 375,87,335,378,376,453,452,483,454,521,
+ 492,93,341,14,19,15,332,42,44,375,
+ 1582,335,378,376,453,452,483,454,521,492,
+ 93,341,14,19,15,332,42,44,375,209,
+ 335,378,376,453,452,483,454,521,492,93,
+ 341,14,19,15,332,42,44,375,1583,335,
+ 378,376,453,452,483,454,521,492,93,341,
+ 14,19,15,332,42,44,375,200,335,378,
+ 376,453,452,483,454,521,492,73,283,65,
+ 363,14,19,15,332,40,201,1348,341,14,
+ 19,15,332,42,44,375,496,335,378,376,
+ 453,452,483,1123,270,227,14,19,15,332,
+ 42,35,536,215,1182,218,1321,220,221,226,
+ 1552,263,1088,498,268,615,259,12,449,243,
+ 568,649,273,1610,277,340,597,270,1243,260,
+ 466,33,456,584,303,274,215,1182,218,1321,
+ 220,221,226,272,263,1088,498,268,288,1440,
+ 238,134,210,372,251,210,257,89,144,133,
+ 135,159,766,341,14,19,15,332,42,44,
+ 375,597,335,378,376,453,452,483,454,1104,
+ 341,14,19,15,332,42,44,375,54,335,
+ 378,376,453,452,1038,240,73,341,14,19,
+ 15,332,42,37,1513,12,12,12,726,134,
+ 210,649,654,1536,1538,1569,137,133,135,159,
+ 341,14,19,15,332,42,44,375,656,894,
+ 215,1182,218,1321,220,221,226,225,290,142,
+ 139,371,165,1450,227,14,19,15,332,42,
+ 35,143,146,149,152,341,14,19,15,332,
+ 42,44,375,73,335,378,376,897,244,579,
+ 615,1513,12,573,196,198,323,1423,1558,1646,
+ 1542,556,341,14,19,15,332,42,44,375,
+ 228,335,378,932,250,210,275,215,1182,218,
+ 1321,220,221,226,385,14,19,15,332,33,
+ 1450,341,14,19,15,332,42,44,375,373,
+ 335,378,951,341,14,19,15,332,42,44,
+ 375,1446,335,849,341,14,19,15,332,42,
+ 36,197,198,341,14,19,15,332,42,44,
+ 375,624,335,850,341,14,19,15,332,42,
+ 44,375,374,335,851,341,14,19,15,332,
+ 42,44,375,349,335,853,224,390,211,597,
+ 106,1513,341,14,19,15,332,42,44,375,
+ 546,896,629,12,540,107,12,12,846,610,
+ 495,1572,1514,239,1613,411,69,215,1182,218,
+ 1321,220,221,226,273,270,134,210,183,270,
+ 1440,134,210,141,133,135,159,451,147,133,
+ 135,159,263,1088,498,268,263,1088,498,268,
+ 216,1182,218,1321,220,221,226,140,656,165,
+ 262,657,323,573,766,341,14,19,15,332,
+ 42,35,341,14,19,15,332,42,34,12,
+ 323,12,276,12,250,210,590,308,625,308,
+ 659,308,341,14,19,15,332,42,47,597,
+ 222,50,195,1709,195,1709,195,251,210,1648,
+ 636,1360,87,1360,87,1360,87,1709,1166,1709,
+ 581,1567,581,241,581,341,14,19,15,332,
+ 42,46,341,14,19,15,332,42,45,501,
+ 645,477,1709,646,507,686,272,14,19,15,
+ 332,42,43,211,609,629,250,629,573,629,
+ 134,210,826,597,456,134,210,150,133,135,
+ 159,194,153,133,135,159,611,1039,611,250,
+ 210,182,611,26,826,185,826,242,1709,87,
+ 826,1651,609,629,1709,1709,573,316,417,195,
+ 826,195,1376,1587,255,195,826,595,1470,617,
+ 1470,1246,611,1350,1470,1039,1103,250,210,184,
+ 826,1039,597,597,191,323,191,564,251,210,
+ 191,1362,1634,1515,1634,195,1369,1519,1634,328,
+ 548,451,255,1709,1470,227,287,289,255,1246,
+ 627,1350,270,617,1103,1585,1709,1350,826,1709,
+ 191,385,14,19,15,332,32,1553,1634,265,
+ 1088,498,268,1039,643,12,206,12,858,628,
+ 1369,556,826,456,1641,456,629,826,629,1198,
+ 1421,629,1709,1709,1709,1709,1709,195,1709,1709,
+ 255,231,1039,1709,1709,1709,1470,1422,87,1350,
+ 87,1709,202,1709,203,1709,888,278,1101,1709,
+ 206,1709,192,1709,1709,1709,1709,1709,1709,256,
+ 1709,1709,1709,1418,1421,1709,0,17,179,0,
+ 18,178,0,1,1932,0,1,1943,0
+ };
+ };
+ public final static char baseAction[] = BaseAction.baseAction;
+ public final int baseAction(int index) { return baseAction[index]; }
+ public final static char lhs[] = baseAction;
+ public final int lhs(int index) { return lhs[index]; };
+
+ public interface TermCheck {
+ public final static byte termCheck[] = {0,
+ 0,1,2,3,4,0,6,7,8,9,
+ 10,0,12,13,14,15,16,17,18,19,
+ 20,21,0,23,24,25,26,27,28,0,
+ 1,0,0,4,12,30,36,37,38,39,
+ 40,41,42,43,44,45,46,47,0,0,
+ 1,22,0,0,1,3,0,4,58,59,
+ 60,8,9,10,0,1,2,3,0,1,
+ 2,3,0,1,2,11,23,24,25,26,
+ 27,28,51,52,53,54,0,55,0,36,
+ 37,38,39,40,41,42,43,44,45,46,
+ 47,49,50,0,56,0,0,51,52,53,
+ 54,58,59,60,8,9,10,69,70,71,
+ 72,73,74,75,76,77,78,55,0,23,
+ 24,25,26,27,28,30,0,51,52,53,
+ 54,0,36,37,38,39,40,41,42,43,
+ 44,45,46,47,0,1,2,3,4,5,
+ 6,7,0,22,61,62,12,13,14,15,
+ 16,17,18,19,20,21,0,23,0,1,
+ 2,3,4,5,6,7,0,11,34,3,
+ 12,13,14,15,16,17,18,19,20,21,
+ 64,23,0,1,2,3,4,5,6,7,
+ 0,0,34,3,12,13,14,15,16,17,
+ 18,19,20,21,22,63,0,1,2,3,
+ 4,5,6,7,0,49,50,35,12,13,
+ 14,15,16,17,18,19,20,21,0,0,
+ 1,2,3,4,0,6,7,3,0,0,
+ 34,12,13,14,15,16,17,18,19,20,
+ 21,0,1,2,3,4,0,6,7,31,
+ 32,5,0,12,13,14,15,16,17,18,
+ 19,20,21,22,0,1,2,3,4,65,
+ 6,7,0,49,50,29,12,13,14,15,
+ 16,17,18,19,20,21,22,0,1,2,
+ 3,4,0,6,7,67,68,5,79,12,
+ 13,14,15,16,17,18,19,20,21,22,
+ 0,1,2,3,4,63,6,7,0,1,
+ 2,29,12,13,14,15,16,17,18,19,
+ 20,21,0,1,2,3,4,65,6,7,
+ 0,0,0,0,12,13,14,15,16,17,
+ 18,19,20,21,0,1,2,3,4,0,
+ 6,7,22,0,22,22,12,13,14,15,
+ 16,17,18,19,20,21,0,1,2,3,
+ 4,22,6,7,0,0,0,1,12,13,
+ 14,15,16,17,18,19,20,21,0,0,
+ 2,3,0,5,2,64,8,9,10,11,
+ 0,1,0,11,4,13,14,5,0,33,
+ 2,23,24,25,26,27,28,29,0,11,
+ 2,3,22,5,0,0,8,9,10,11,
+ 6,7,30,8,9,10,61,62,0,0,
+ 48,23,24,25,26,27,28,29,23,24,
+ 25,26,27,28,0,0,0,0,66,57,
+ 0,0,8,9,10,0,0,12,8,9,
+ 10,6,7,0,8,9,10,23,24,25,
+ 26,27,28,23,24,25,26,27,28,23,
+ 24,25,26,27,28,0,1,2,0,0,
+ 5,2,0,5,5,0,11,2,3,0,
+ 11,0,1,2,3,0,11,0,1,80,
+ 5,4,11,0,29,2,3,0,29,0,
+ 1,0,0,4,11,8,9,10,0,22,
+ 8,9,10,0,29,30,8,9,10,0,
+ 0,8,9,10,0,57,0,8,9,10,
+ 0,5,8,9,10,0,0,0,0,0,
+ 0,3,6,7,0,5,0,1,0,5,
+ 4,31,32,0,0,2,0,0,0,11,
+ 34,31,32,5,11,0,31,32,31,32,
+ 5,33,0,29,0,35,0,5,0,1,
+ 0,1,4,0,4,0,0,11,0,33,
+ 33,0,0,35,11,56,48,0,0,0,
+ 0,0,0,0,30,0,0,35,0,0,
+ 56,0,0,0,0,30,30,0,0,0,
+ 0,0,57,0,48,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,55,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0
+ };
+ };
+ public final static byte termCheck[] = TermCheck.termCheck;
+ public final int termCheck(int index) { return termCheck[index]; }
+
+ public interface TermAction {
+ public final static char termAction[] = {0,
+ 1709,613,1439,1425,614,88,1304,1167,1920,1921,
+ 1922,1,1432,1621,1274,1040,1719,1720,1721,1722,
+ 881,386,64,1871,1872,1870,1923,1873,1869,1709,
+ 1889,59,1709,1890,1225,593,1876,1881,1880,1878,
+ 1879,1877,1882,1883,1875,1884,1885,1886,42,1709,
+ 1944,1175,48,1709,1888,1492,61,1887,866,852,
+ 334,1920,1921,1922,258,1932,1072,1,1709,1932,
+ 1343,1239,1,1932,1343,500,1871,1872,1870,1923,
+ 1873,1869,1335,1324,1313,1293,60,1019,1709,1876,
+ 1881,1880,1878,1879,1877,1882,1883,1875,1884,1885,
+ 1886,1485,1452,62,818,252,128,1335,1324,1313,
+ 1293,866,852,334,1920,1921,1922,798,778,758,
+ 738,718,678,698,658,638,618,981,1709,1871,
+ 1872,1870,1923,1873,1869,1639,68,1335,1324,1313,
+ 1293,41,1876,1881,1880,1878,1879,1877,1882,1883,
+ 1875,1884,1885,1886,1,1726,1439,1065,1727,1712,
+ 1304,1167,66,1087,1281,1252,1432,1621,1274,1040,
+ 1719,1720,1721,1722,881,386,267,528,1709,1726,
+ 1439,1214,1727,1712,1304,1167,50,500,1711,1492,
+ 1432,1621,1274,1040,1719,1720,1721,1722,881,386,
+ 1150,904,1,1726,1439,1425,1727,27,1304,1167,
+ 1709,1709,1711,1090,1432,1621,1274,1040,1719,1720,
+ 1721,1722,881,386,1367,394,1709,1726,1439,1425,
+ 1727,1712,1304,1167,70,1485,1452,27,1432,1621,
+ 1274,1040,1719,1720,1721,1722,881,386,54,1709,
+ 1,1,1,1,49,1,1,1492,72,1709,
+ 1711,1,1,1,1,1,1,1,1,1,
+ 1,1709,1726,1439,1425,1727,1,1304,1167,1190,
+ 1352,90,67,1432,1621,1274,1040,1719,1720,1721,
+ 1722,881,386,1087,1,1726,1439,1425,1727,1048,
+ 1304,1167,71,1485,1452,90,1432,1621,1274,1040,
+ 1719,1720,1721,1722,881,386,1367,1709,1726,1439,
+ 1425,1727,1709,1304,1167,1133,1637,1714,2016,1432,
+ 1621,1274,1040,1719,1720,1721,1722,881,386,1367,
+ 1709,1726,1439,1425,1727,394,1304,1167,1,1932,
+ 1343,1713,1432,1621,1274,1040,1719,1720,1721,1722,
+ 881,386,1709,1726,1441,1425,1727,1048,1304,1167,
+ 1709,69,187,186,1432,1621,1274,1040,1719,1720,
+ 1721,1722,881,386,1709,1726,1443,1425,1727,188,
+ 1304,1167,1087,1709,1242,1363,1432,1621,1274,1040,
+ 1719,1720,1721,1722,881,386,1,1726,1439,1425,
+ 1727,1366,1304,1167,1709,63,1,1706,1432,1621,
+ 1274,1040,1719,1720,1721,1722,881,386,17,1709,
+ 1697,1697,31,1697,1094,1150,179,179,179,1697,
+ 1709,1889,1709,1635,1890,1733,1734,1718,266,1963,
+ 1085,179,179,179,179,179,179,1697,18,500,
+ 1700,1700,1176,1700,51,129,178,178,178,1700,
+ 838,363,1233,1920,1921,1922,1281,1252,1709,1709,
+ 409,178,178,178,178,178,178,1700,1871,1872,
+ 1870,1923,1873,1869,130,65,1709,1709,333,1717,
+ 131,1709,1920,1921,1922,53,132,1225,1920,1921,
+ 1922,838,363,1709,1920,1921,1922,1871,1872,1870,
+ 1923,1873,1869,1871,1872,1870,1923,1873,1869,1871,
+ 1872,1870,1923,1873,1869,1,1703,1072,1709,1,
+ 1714,1364,1709,1718,1714,261,500,1364,1,1709,
+ 500,264,1932,1072,1239,1709,500,1709,1889,1696,
+ 1714,1890,500,264,1713,1364,1239,246,1713,1709,
+ 1738,1709,1709,1739,500,1,1,1,247,1177,
+ 1920,1921,1922,245,1713,1461,1,1,1,248,
+ 58,1920,1921,1922,249,1717,1709,1920,1921,1922,
+ 57,1712,1920,1921,1922,56,52,55,1,208,
+ 1,1090,838,363,1,190,205,1889,1709,1714,
+ 1890,1190,1352,219,1709,1240,1,1,1709,924,
+ 1711,1190,1352,1716,500,1,1190,1352,1190,1352,
+ 1718,1963,1,1713,28,190,284,189,1709,1889,
+ 204,455,1890,217,455,28,204,962,199,1963,
+ 1962,1709,1709,1715,500,943,1091,1709,1709,1709,
+ 1709,1709,1709,1709,431,1709,1709,189,1709,1709,
+ 573,1709,1709,1709,1709,1736,2667,1709,1709,1709,
+ 1709,1709,1717,1709,1181,1709,1709,1709,1709,1709,
+ 1709,1709,1709,1709,1709,1709,1709,1709,1709,1709,
+ 1709,1709,1709,1000
+ };
+ };
+ public final static char termAction[] = TermAction.termAction;
+ public final int termAction(int index) { return termAction[index]; }
+
+ public interface Asb {
+ public final static char asb[] = {0,
+ 424,1,44,75,40,75,75,75,75,75,
+ 75,75,75,75,3,345,23,20,27,25,
+ 33,31,35,34,37,36,9,75,345,345,
+ 311,311,168,75,162,162,339,345,75,75,
+ 75,75,75,75,75,75,75,75,75,75,
+ 75,75,75,75,75,75,75,75,75,75,
+ 75,75,75,75,75,75,75,75,162,162,
+ 162,165,51,343,69,281,160,159,314,326,
+ 326,65,65,326,65,326,359,116,116,20,
+ 20,25,25,25,25,23,23,31,27,27,
+ 34,33,279,36,35,222,67,49,339,334,
+ 96,165,382,73,162,395,284,261,187,261,
+ 187,216,261,75,49,334,382,382,165,72,
+ 69,162,337,359,161,286,187,187,187,187,
+ 216,216,257,93,49,382,334,75,75,165,
+ 73,281,274,273,343,286,162,187,258,388,
+ 187,187,258,257,256,257,216,258,47,386,
+ 311,75,92,49,334,165,165,162,395,284,
+ 337,258,390,258,258,75,311,257,51,165,
+ 311,75,257,286,43,75,42,88,343,258,
+ 165,258,162,161,390,75,88,312
+ };
+ };
+ public final static char asb[] = Asb.asb;
+ public final int asb(int index) { return asb[index]; }
+
+ public interface Asr {
+ public final static byte asr[] = {0,
+ 80,0,11,2,48,66,13,14,56,69,
+ 70,71,72,73,75,74,76,77,78,3,
+ 49,50,6,7,32,31,51,52,53,54,
+ 61,62,12,63,64,65,35,67,68,34,
+ 29,55,30,57,5,0,5,35,11,48,
+ 13,14,12,3,6,7,20,21,15,2,
+ 16,17,18,19,1,4,22,0,8,9,
+ 10,23,34,5,16,17,18,19,4,13,
+ 14,12,6,7,20,21,15,3,2,1,
+ 0,56,11,48,0,8,9,10,2,16,
+ 17,18,19,1,4,13,14,12,3,6,
+ 7,20,21,15,0,9,23,28,10,27,
+ 26,25,8,24,48,66,13,14,12,6,
+ 7,49,50,31,32,51,52,53,54,61,
+ 62,63,64,65,67,68,56,69,70,71,
+ 72,73,74,75,76,77,78,3,2,11,
+ 30,29,5,0,34,5,0,5,29,15,
+ 16,17,18,19,1,4,2,13,14,12,
+ 3,6,7,20,21,0,24,36,8,37,
+ 58,25,38,26,39,40,27,9,41,42,
+ 23,59,28,60,43,44,10,45,46,47,
+ 1,4,5,35,0,1,4,5,30,35,
+ 0,12,3,6,7,49,50,31,32,51,
+ 52,53,54,61,62,63,64,65,67,68,
+ 55,69,70,71,72,73,74,75,76,77,
+ 78,34,29,57,22,56,30,35,5,0,
+ 24,8,25,26,27,9,23,28,10,1,
+ 3,22,2,5,30,29,57,11,55,0,
+ 3,2,11,29,5,24,36,8,37,58,
+ 25,38,26,39,40,27,9,41,42,23,
+ 59,28,60,43,44,10,45,46,47,33,
+ 4,1,0,44,36,41,39,40,38,37,
+ 42,43,45,46,47,55,57,28,25,23,
+ 24,27,26,8,9,10,30,1,5,29,
+ 2,11,3,0,15,16,17,18,19,2,
+ 13,14,12,3,6,7,20,21,4,1,
+ 58,59,60,44,36,41,39,40,38,37,
+ 42,43,45,46,47,28,25,23,24,27,
+ 26,8,9,10,0,56,0,57,5,3,
+ 1,2,55,0,24,36,8,37,58,25,
+ 38,26,39,40,27,9,41,42,23,59,
+ 28,60,43,44,10,45,46,47,1,4,
+ 33,3,0,15,16,17,18,19,1,4,
+ 2,13,14,12,3,6,7,20,21,79,
+ 0
+ };
+ };
+ public final static byte asr[] = Asr.asr;
+ public final int asr(int index) { return asr[index]; }
+
+ public interface Nasb {
+ public final static byte nasb[] = {0,
+ 73,8,67,15,8,15,15,15,15,15,
+ 15,15,15,15,8,62,8,8,8,8,
+ 8,8,8,8,8,8,8,15,62,62,
+ 9,9,39,63,37,37,58,1,15,15,
+ 15,15,15,15,15,15,15,15,15,15,
+ 15,15,15,15,63,15,15,15,15,15,
+ 15,15,15,15,15,15,15,15,37,37,
+ 37,23,15,71,21,57,19,19,48,49,
+ 49,11,11,49,11,49,44,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,85,59,85,
+ 14,23,77,22,37,69,36,8,85,8,
+ 85,85,8,15,14,85,77,77,23,22,
+ 42,37,30,2,8,84,85,79,85,79,
+ 11,85,25,17,85,77,42,15,15,23,
+ 22,29,19,19,71,84,37,79,55,66,
+ 87,79,55,25,8,8,11,55,13,8,
+ 11,15,27,14,42,23,23,37,69,36,
+ 31,55,51,55,55,15,11,25,15,23,
+ 11,15,25,83,67,15,8,51,71,55,
+ 23,55,37,37,51,15,33,8
+ };
+ };
+ public final static byte nasb[] = Nasb.nasb;
+ public final int nasb(int index) { return nasb[index]; }
+
+ public interface Nasr {
+ public final static char nasr[] = {0,
+ 4,77,76,75,74,73,72,0,69,0,
+ 27,0,68,8,4,0,89,0,25,0,
+ 8,4,24,0,51,0,91,0,20,8,
+ 44,43,37,35,0,8,20,0,8,84,
+ 0,21,0,63,64,65,66,52,28,0,
+ 8,37,35,0,26,0,20,8,44,43,
+ 0,32,8,41,0,8,61,0,8,23,
+ 49,0,8,41,83,0,58,0,56,8,
+ 32,0,86,23,8,0,8,32,48,0
+ };
+ };
+ public final static char nasr[] = Nasr.nasr;
+ public final int nasr(int index) { return nasr[index]; }
+
+ public interface TerminalIndex {
+ public final static char terminalIndex[] = {0,
+ 85,2,9,86,87,10,11,48,64,76,
+ 1,8,6,7,68,81,82,83,84,12,
+ 13,3,69,44,55,60,63,72,90,42,
+ 16,17,30,89,91,47,52,56,61,62,
+ 66,67,74,75,78,79,80,4,14,15,
+ 18,19,20,21,29,31,92,54,70,73,
+ 22,23,24,25,26,5,27,28,32,33,
+ 34,35,36,37,38,39,40,41,93,94,
+ 45,46,49,50,51,53,57,58,59,65,
+ 71,77,88
+ };
+ };
+ public final static char terminalIndex[] = TerminalIndex.terminalIndex;
+ public final int terminalIndex(int index) { return terminalIndex[index]; }
+
+ public interface NonterminalIndex {
+ public final static char nonterminalIndex[] = {0,
+ 0,0,0,101,105,106,107,0,108,109,
+ 110,111,112,113,114,115,116,117,118,97,
+ 129,0,122,96,149,98,121,128,0,0,
+ 0,140,0,145,147,0,148,0,0,0,
+ 100,158,159,160,0,120,137,139,146,155,
+ 0,131,136,0,0,138,150,153,154,157,
+ 99,103,132,133,134,135,144,161,102,104,
+ 119,123,124,125,126,127,130,142,0,0,
+ 143,152,95,0,141,151,156,162,163,0,
+ 164,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0
+ };
+ };
+ public final static char nonterminalIndex[] = NonterminalIndex.nonterminalIndex;
+ public final int nonterminalIndex(int index) { return nonterminalIndex[index]; }
+
+ public interface ScopePrefix {
+ public final static char scopePrefix[] = {
+ 164,80,33,39,87,107,113,138,12,19,
+ 49,67,119,124,26,45,97,160,179,183,
+ 147,1,1,30,54,77,187,6,101,154,
+ 129,154,93,57,57,57
+ };
+ };
+ public final static char scopePrefix[] = ScopePrefix.scopePrefix;
+ public final int scopePrefix(int index) { return scopePrefix[index]; }
+
+ public interface ScopeSuffix {
+ public final static char scopeSuffix[] = {
+ 17,17,4,4,17,17,17,144,17,24,
+ 4,24,17,17,24,4,95,24,24,4,
+ 151,4,4,24,4,24,24,9,104,157,
+ 132,172,95,64,59,72
+ };
+ };
+ public final static char scopeSuffix[] = ScopeSuffix.scopeSuffix;
+ public final int scopeSuffix(int index) { return scopeSuffix[index]; }
+
+ public interface ScopeLhs {
+ public final static char scopeLhs[] = {
+ 4,65,25,25,65,63,63,98,53,45,
+ 25,40,63,63,45,25,48,5,4,4,
+ 18,91,90,43,25,37,2,68,48,6,
+ 99,4,48,40,38,40
+ };
+ };
+ public final static char scopeLhs[] = ScopeLhs.scopeLhs;
+ public final int scopeLhs(int index) { return scopeLhs[index]; }
+
+ public interface ScopeLa {
+ public final static byte scopeLa[] = {
+ 35,35,34,34,35,35,35,86,35,29,
+ 34,29,35,35,29,34,57,29,29,34,
+ 55,34,34,29,34,29,29,56,1,29,
+ 92,29,57,2,2,2
+ };
+ };
+ public final static byte scopeLa[] = ScopeLa.scopeLa;
+ public final int scopeLa(int index) { return scopeLa[index]; }
+
+ public interface ScopeStateSet {
+ public final static byte scopeStateSet[] = {
+ 34,19,23,23,19,19,19,-1,89,27,
+ 23,11,19,19,27,23,5,34,34,34,
+ 64,1,3,27,23,11,34,90,5,37,
+ -1,34,5,11,11,11
+ };
+ };
+ public final static byte scopeStateSet[] = ScopeStateSet.scopeStateSet;
+ public final int scopeStateSet(int index) { return scopeStateSet[index]; }
+
+ public interface ScopeRhs {
+ public final static char scopeRhs[] = {0,
+ 139,11,0,96,0,181,101,0,31,136,
+ 0,144,163,101,22,0,98,0,150,101,
+ 2,136,0,97,0,150,101,2,0,153,
+ 2,0,112,23,175,101,11,0,112,175,
+ 101,23,11,0,112,23,11,0,112,175,
+ 101,11,0,112,11,0,130,0,2,0,
+ 151,97,0,2,97,0,150,101,2,130,
+ 0,2,0,150,97,0,140,2,0,144,
+ 173,101,22,120,58,0,144,173,101,22,
+ 58,0,125,0,99,0,178,101,125,0,
+ 101,125,0,141,99,0,148,101,22,120,
+ 60,0,148,101,22,120,59,0,148,101,
+ 22,60,0,148,101,22,59,0,187,85,
+ 0,77,2,100,97,99,0,187,113,134,
+ 2,89,0,53,0,0,134,68,110,0,
+ 29,117,0,155,2,0,97,106,0,155,
+ 2,15,0,144,163,101,22,113,155,2,
+ 0,97,3,0,104,0,98,0,177,2,
+ 97,0,134,11,97,0,134,2,0
+ };
+ };
+ public final static char scopeRhs[] = ScopeRhs.scopeRhs;
+ public final int scopeRhs(int index) { return scopeRhs[index]; }
+
+ public interface ScopeState {
+ public final static char scopeState[] = {0,
+ 525,0,480,0,1572,1634,1542,1538,1536,0,
+ 1376,1233,1343,1166,451,1072,1039,0,826,1158,
+ 308,0,1321,1182,1088,498,451,1072,1039,1587,
+ 1364,1360,0,1621,1274,1040,1214,1065,1506,1048,
+ 1133,394,1150,1281,1252,1225,1352,1190,1335,1324,
+ 1313,1293,1492,1485,1452,838,363,1432,1425,1304,
+ 1167,881,386,1000,981,962,943,924,904,858,
+ 548,1019,528,500,818,798,778,758,738,718,
+ 698,678,658,638,618,308,593,456,573,411,
+ 431,340,0
+ };
+ };
+ public final static char scopeState[] = ScopeState.scopeState;
+ public final int scopeState(int index) { return scopeState[index]; }
+
+ public interface InSymb {
+ public final static char inSymb[] = {0,
+ 0,176,134,101,164,15,21,20,7,6,
+ 3,12,14,13,97,2,102,100,104,103,
+ 106,105,108,107,110,109,98,30,2,2,
+ 66,48,2,11,155,134,125,101,7,6,
+ 50,49,3,54,53,52,51,31,32,12,
+ 62,61,64,63,68,67,65,78,77,76,
+ 74,75,73,72,71,70,69,56,155,155,
+ 177,134,113,101,11,2,137,136,165,166,
+ 167,60,59,168,58,169,170,1,4,100,
+ 100,103,103,103,103,102,102,105,104,104,
+ 107,106,134,109,108,113,113,22,142,3,
+ 23,112,101,3,153,101,2,120,22,120,
+ 22,22,120,55,101,3,101,101,112,175,
+ 151,150,116,101,152,101,22,101,22,101,
+ 101,22,163,101,22,101,151,175,23,112,
+ 3,2,128,130,101,30,150,101,148,125,
+ 149,101,148,173,120,174,101,144,30,181,
+ 48,11,182,101,151,112,112,140,101,2,
+ 142,148,101,148,144,56,30,173,56,139,
+ 48,11,163,101,178,55,140,2,101,144,
+ 139,144,150,179,30,55,142,30
+ };
+ };
+ public final static char inSymb[] = InSymb.inSymb;
+ public final int inSymb(int index) { return inSymb[index]; }
+
+ public interface Name {
+ public final static String name[] = {
+ "",
+ "[",
+ "(",
+ "{",
+ ".",
+ "->",
+ "++",
+ "--",
+ "&",
+ "*",
+ "+",
+ "-",
+ "~",
+ "!",
+ "/",
+ "%",
+ ">>",
+ "<<",
+ "<",
+ ">",
+ "<=",
+ ">=",
+ "==",
+ "!=",
+ "^",
+ "|",
+ "&&",
+ "||",
+ "?",
+ ":",
+ "...",
+ "=",
+ "*=",
+ "/=",
+ "%=",
+ "+=",
+ "-=",
+ ">>=",
+ "<<=",
+ "&=",
+ "^=",
+ "|=",
+ ",",
+ "$empty",
+ "auto",
+ "break",
+ "case",
+ "char",
+ "const",
+ "continue",
+ "default",
+ "do",
+ "double",
+ "else",
+ "enum",
+ "extern",
+ "float",
+ "for",
+ "goto",
+ "if",
+ "inline",
+ "int",
+ "long",
+ "register",
+ "restrict",
+ "return",
+ "short",
+ "signed",
+ "sizeof",
+ "static",
+ "struct",
+ "switch",
+ "typedef",
+ "union",
+ "unsigned",
+ "void",
+ "volatile",
+ "while",
+ "_Bool",
+ "_Complex",
+ "_Imaginary",
+ "integer",
+ "floating",
+ "charconst",
+ "stringlit",
+ "identifier",
+ "Completion",
+ "EndOfCompletion",
+ "Invalid",
+ "RightBracket",
+ "RightParen",
+ "RightBrace",
+ "SemiColon",
+ "ERROR_TOKEN",
+ "EOF_TOKEN",
+ "expression_parser_start",
+ "]",
+ ")",
+ "}",
+ ";",
+ "expression",
+ "postfix_expression",
+ "member_name",
+ "type_name",
+ "initializer_list",
+ "unary_expression",
+ "cast_expression",
+ "multiplicative_expression",
+ "additive_expression",
+ "shift_expression",
+ "relational_expression",
+ "equality_expression",
+ "AND_expression",
+ "exclusive_OR_expression",
+ "inclusive_OR_expression",
+ "logical_AND_expression",
+ "logical_OR_expression",
+ "conditional_expression",
+ "assignment_expression",
+ "expression_list_actual",
+ "constant_expression",
+ "identifier_or_typedefname",
+ "declaration_specifiers",
+ "simple_declaration_specifiers",
+ "struct_or_union_declaration_sp" +
+ "ecifiers",
+ "elaborated_declaration_specifi" +
+ "ers",
+ "enum_declaration_specifiers",
+ "typdef_name_declaration_specif" +
+ "iers",
+ "no_type_declaration_specifier",
+ "type_qualifier",
+ "no_type_declaration_specifiers",
+ "simple_type_specifier",
+ "struct_or_union_specifier",
+ "elaborated_specifier",
+ "enum_specifier",
+ "typedef_name_in_declspec",
+ "initializer",
+ "declarator",
+ "struct_declaration_list",
+ "struct_declaration",
+ "specifier_qualifier_list",
+ "struct_declarator_list",
+ "complete_struct_declarator",
+ "enumerator_list",
+ "enumerator",
+ "direct_declarator",
+ "pointer_seq",
+ "array_direct_declarator",
+ "basic_direct_declarator",
+ "array_modifier",
+ "parameter_type_list",
+ "identifier_list",
+ "array_modifier_type_qualifiers",
+ "type_qualifier_list",
+ "parameter_list",
+ "parameter_declaration",
+ "complete_parameter_declarator",
+ "abstract_declarator",
+ "direct_abstract_declarator",
+ "basic_direct_abstract_declarat" +
+ "or",
+ "array_direct_abstract_declarat" +
+ "or",
+ "designated_initializer",
+ "designation",
+ "designator_list",
+ "designator"
+ };
+ };
+ public final static String name[] = Name.name;
+ public final String name(int index) { return name[index]; }
+
+ public final static int
+ ERROR_SYMBOL = 79,
+ SCOPE_UBOUND = 35,
+ SCOPE_SIZE = 36,
+ MAX_NAME_LENGTH = 38;
+
+ public final int getErrorSymbol() { return ERROR_SYMBOL; }
+ public final int getScopeUbound() { return SCOPE_UBOUND; }
+ public final int getScopeSize() { return SCOPE_SIZE; }
+ public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+ public final static int
+ NUM_STATES = 208,
+ NT_OFFSET = 93,
+ LA_STATE_OFFSET = 2016,
+ MAX_LA = 2,
+ NUM_RULES = 307,
+ NUM_NONTERMINALS = 115,
+ NUM_SYMBOLS = 208,
+ SEGMENT_SIZE = 8192,
+ START_STATE = 1516,
+ IDENTIFIER_SYMBOL = 0,
+ EOFT_SYMBOL = 80,
+ EOLT_SYMBOL = 80,
+ ACCEPT_ACTION = 1696,
+ ERROR_ACTION = 1709;
+
+ public final static boolean BACKTRACK = true;
+
+ public final int getNumStates() { return NUM_STATES; }
+ public final int getNtOffset() { return NT_OFFSET; }
+ public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+ public final int getMaxLa() { return MAX_LA; }
+ public final int getNumRules() { return NUM_RULES; }
+ public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+ public final int getNumSymbols() { return NUM_SYMBOLS; }
+ public final int getSegmentSize() { return SEGMENT_SIZE; }
+ public final int getStartState() { return START_STATE; }
+ public final int getStartSymbol() { return lhs[0]; }
+ public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+ public final int getEoftSymbol() { return EOFT_SYMBOL; }
+ public final int getEoltSymbol() { return EOLT_SYMBOL; }
+ public final int getAcceptAction() { return ACCEPT_ACTION; }
+ public final int getErrorAction() { return ERROR_ACTION; }
+ public final boolean isValidForParser() { return isValidForParser; }
+ public final boolean getBacktrack() { return BACKTRACK; }
+
+ public final int originalState(int state) {
+ return -baseCheck[state];
+ }
+ public final int asi(int state) {
+ return asb[originalState(state)];
+ }
+ public final int nasi(int state) {
+ return nasb[originalState(state)];
+ }
+ public final int inSymbol(int state) {
+ return inSymb[originalState(state)];
+ }
+
+ public final int ntAction(int state, int sym) {
+ return baseAction[state + sym];
+ }
+
+ public final int tAction(int state, int sym) {
+ int i = baseAction[state],
+ k = i + sym;
+ return termAction[termCheck[k] == sym ? k : i];
+ }
+ public final int lookAhead(int la_state, int sym) {
+ int k = la_state + sym;
+ return termAction[termCheck[k] == sym ? k : la_state];
+ }
+}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParsersym.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParsersym.java
new file mode 100644
index 0000000000..8edc95759b
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionStatementParsersym.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+public interface C99ExpressionStatementParsersym {
+ public final static int
+ TK_auto = 24,
+ TK_break = 81,
+ TK_case = 82,
+ TK_char = 36,
+ TK_const = 8,
+ TK_continue = 83,
+ TK_default = 84,
+ TK_do = 85,
+ TK_double = 37,
+ TK_else = 86,
+ TK_enum = 58,
+ TK_extern = 25,
+ TK_float = 38,
+ TK_for = 87,
+ TK_goto = 88,
+ TK_if = 89,
+ TK_inline = 26,
+ TK_int = 39,
+ TK_long = 40,
+ TK_register = 27,
+ TK_restrict = 9,
+ TK_return = 90,
+ TK_short = 41,
+ TK_signed = 42,
+ TK_sizeof = 15,
+ TK_static = 23,
+ TK_struct = 59,
+ TK_switch = 91,
+ TK_typedef = 28,
+ TK_union = 60,
+ TK_unsigned = 43,
+ TK_void = 44,
+ TK_volatile = 10,
+ TK_while = 92,
+ TK__Bool = 45,
+ TK__Complex = 46,
+ TK__Imaginary = 47,
+ TK_integer = 16,
+ TK_floating = 17,
+ TK_charconst = 18,
+ TK_stringlit = 19,
+ TK_identifier = 1,
+ TK_Completion = 4,
+ TK_EndOfCompletion = 5,
+ TK_Invalid = 93,
+ TK_LeftBracket = 11,
+ TK_LeftParen = 2,
+ TK_LeftBrace = 22,
+ TK_Dot = 48,
+ TK_Arrow = 66,
+ TK_PlusPlus = 13,
+ TK_MinusMinus = 14,
+ TK_And = 12,
+ TK_Star = 3,
+ TK_Plus = 6,
+ TK_Minus = 7,
+ TK_Tilde = 20,
+ TK_Bang = 21,
+ TK_Slash = 49,
+ TK_Percent = 50,
+ TK_RightShift = 31,
+ TK_LeftShift = 32,
+ TK_LT = 51,
+ TK_GT = 52,
+ TK_LE = 53,
+ TK_GE = 54,
+ TK_EQ = 61,
+ TK_NE = 62,
+ TK_Caret = 63,
+ TK_Or = 64,
+ TK_AndAnd = 65,
+ TK_OrOr = 67,
+ TK_Question = 68,
+ TK_Colon = 55,
+ TK_DotDotDot = 33,
+ TK_Assign = 56,
+ TK_StarAssign = 69,
+ TK_SlashAssign = 70,
+ TK_PercentAssign = 71,
+ TK_PlusAssign = 72,
+ TK_MinusAssign = 73,
+ TK_RightShiftAssign = 74,
+ TK_LeftShiftAssign = 75,
+ TK_AndAssign = 76,
+ TK_CaretAssign = 77,
+ TK_OrAssign = 78,
+ TK_Comma = 30,
+ TK_RightBracket = 34,
+ TK_RightParen = 29,
+ TK_RightBrace = 35,
+ TK_SemiColon = 57,
+ TK_ERROR_TOKEN = 79,
+ TK_EOF_TOKEN = 80;
+
+ public final static String orderedTerminalSymbols[] = {
+ "",
+ "identifier",
+ "LeftParen",
+ "Star",
+ "Completion",
+ "EndOfCompletion",
+ "Plus",
+ "Minus",
+ "const",
+ "restrict",
+ "volatile",
+ "LeftBracket",
+ "And",
+ "PlusPlus",
+ "MinusMinus",
+ "sizeof",
+ "integer",
+ "floating",
+ "charconst",
+ "stringlit",
+ "Tilde",
+ "Bang",
+ "LeftBrace",
+ "static",
+ "auto",
+ "extern",
+ "inline",
+ "register",
+ "typedef",
+ "RightParen",
+ "Comma",
+ "RightShift",
+ "LeftShift",
+ "DotDotDot",
+ "RightBracket",
+ "RightBrace",
+ "char",
+ "double",
+ "float",
+ "int",
+ "long",
+ "short",
+ "signed",
+ "unsigned",
+ "void",
+ "_Bool",
+ "_Complex",
+ "_Imaginary",
+ "Dot",
+ "Slash",
+ "Percent",
+ "LT",
+ "GT",
+ "LE",
+ "GE",
+ "Colon",
+ "Assign",
+ "SemiColon",
+ "enum",
+ "struct",
+ "union",
+ "EQ",
+ "NE",
+ "Caret",
+ "Or",
+ "AndAnd",
+ "Arrow",
+ "OrOr",
+ "Question",
+ "StarAssign",
+ "SlashAssign",
+ "PercentAssign",
+ "PlusAssign",
+ "MinusAssign",
+ "RightShiftAssign",
+ "LeftShiftAssign",
+ "AndAssign",
+ "CaretAssign",
+ "OrAssign",
+ "ERROR_TOKEN",
+ "EOF_TOKEN",
+ "break",
+ "case",
+ "continue",
+ "default",
+ "do",
+ "else",
+ "for",
+ "goto",
+ "if",
+ "return",
+ "switch",
+ "while",
+ "Invalid"
+ };
+
+ public final static boolean isValidForParser = true;
+}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
new file mode 100644
index 0000000000..1f30f8b831
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
@@ -0,0 +1,1244 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+import lpg.lpgjavaruntime.*;
+
+import java.util.*;
+import org.eclipse.cdt.core.dom.ast.*;
+import org.eclipse.cdt.core.dom.lrparser.IParser;
+import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+
+import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
+import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
+
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
+
+public class C99NoCastExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
+{
+ private static ParseTable prs = new C99NoCastExpressionParserprs();
+ private BacktrackingParser btParser;
+
+ public BacktrackingParser getParser() { return btParser; }
+ private void setResult(Object object) { btParser.setSym1(object); }
+ public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+ public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+ public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+
+ public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+ public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+ public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+ public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+ public int getLeftSpan() { return btParser.getFirstToken(); }
+ public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); }
+
+ public int getRightSpan() { return btParser.getLastToken(); }
+ public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+ public int getRhsErrorTokenIndex(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (err instanceof ErrorToken ? index : 0);
+ }
+ public ErrorToken getRhsErrorIToken(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (ErrorToken) (err instanceof ErrorToken ? err : null);
+ }
+
+ public C99NoCastExpressionParser(LexStream lexStream)
+ {
+ super(lexStream);
+
+ try
+ {
+ super.remapTerminalSymbols(orderedTerminalSymbols(), C99NoCastExpressionParserprs.EOFT_SYMBOL);
+ }
+ catch(NullExportedSymbolsException e) {
+ }
+ catch(NullTerminalSymbolsException e) {
+ }
+ catch(UnimplementedTerminalsException e)
+ {
+ java.util.ArrayList unimplemented_symbols = e.getSymbols();
+ System.out.println("The Lexer will not scan the following token(s):");
+ for (int i = 0; i < unimplemented_symbols.size(); i++)
+ {
+ Integer id = (Integer) unimplemented_symbols.get(i);
+ System.out.println(" " + C99NoCastExpressionParsersym.orderedTerminalSymbols[id.intValue()]);
+ }
+ System.out.println();
+ }
+ catch(UndefinedEofSymbolException e)
+ {
+ throw new Error(new UndefinedEofSymbolException
+ ("The Lexer does not implement the Eof symbol " +
+ C99NoCastExpressionParsersym.orderedTerminalSymbols[C99NoCastExpressionParserprs.EOFT_SYMBOL]));
+ }
+ }
+
+ public String[] orderedTerminalSymbols() { return C99NoCastExpressionParsersym.orderedTerminalSymbols; }
+ public String getTokenKindName(int kind) { return C99NoCastExpressionParsersym.orderedTerminalSymbols[kind]; }
+ public int getEOFTokenKind() { return C99NoCastExpressionParserprs.EOFT_SYMBOL; }
+ public PrsStream getParseStream() { return (PrsStream) this; }
+
+ //
+ // Report error message for given error_token.
+ //
+ public final void reportErrorTokenMessage(int error_token, String msg)
+ {
+ int firsttok = super.getFirstErrorToken(error_token),
+ lasttok = super.getLastErrorToken(error_token);
+ String location = super.getFileName() + ':' +
+ (firsttok > lasttok
+ ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
+ : (super.getLine(error_token) + ":" +
+ super.getColumn(error_token) + ":" +
+ super.getEndLine(error_token) + ":" +
+ super.getEndColumn(error_token)))
+ + ": ";
+ super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
+ }
+
+ public Object parser()
+ {
+ return parser(null, 0);
+ }
+
+ public Object parser(Monitor monitor)
+ {
+ return parser(monitor, 0);
+ }
+
+ public Object parser(int error_repair_count)
+ {
+ return parser(null, error_repair_count);
+ }
+
+ public Object parser(Monitor monitor, int error_repair_count)
+ {
+ try
+ {
+ btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ }
+ catch (NotBacktrackParseTableException e)
+ {
+ throw new Error(new NotBacktrackParseTableException
+ ("Regenerate C99NoCastExpressionParserprs.java with -BACKTRACK option"));
+ }
+ catch (BadParseSymFileException e)
+ {
+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- C99NoCastExpressionParsersym.java"));
+ }
+
+ try
+ {
+ return (Object) btParser.parse(error_repair_count);
+ }
+ catch (BadParseException e)
+ {
+ reset(e.error_token); // point to error token
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+ diagnoseParser.diagnose(e.error_token);
+ }
+
+ return null;
+ }
+
+
+private C99BuildASTParserAction action;
+
+public C99NoCastExpressionParser() { // constructor
+}
+
+private void initActions(IASTTranslationUnit tu) {
+ action = new C99BuildASTParserAction ( C99ASTNodeFactory.DEFAULT_INSTANCE , this, tu);
+ action.setTokenMap( C99NoCastExpressionParsersym .orderedTerminalSymbols);
+}
+
+
+public void addToken(IToken token) {
+ token.setKind(mapKind(token.getKind())); // TODO does mapKind need to be called?
+ super.addToken(token);
+}
+
+
+public IASTCompletionNode parse(IASTTranslationUnit tu) {
+ // this has to be done, or... kaboom!
+ setStreamLength(getSize());
+ initActions(tu);
+
+ final int errorRepairCount = -1; // -1 means full error handling
+ parser(null, errorRepairCount); // do the actual parse
+ super.resetTokenStream(); // allow tokens to be garbage collected
+
+ // the completion node may be null
+ IASTCompletionNode compNode = action.getASTCompletionNode();
+
+ //action = null;
+ //parserAction = null;
+ return compNode;
+}
+
+// uncomment this method to use with backtracking parser
+public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
+}
+
+
+
+private ITokenMap tokenMap = null;
+
+public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ addToken(new Token(null, 0, 0, 0)); // dummy token
+ for(IToken token : tokens) {
+ token.setKind(tokenMap.mapKind(token.getKind()));
+ addToken(token);
+ }
+ addToken(new Token(null, 0, 0, C99NoCastExpressionParsersym .TK_EOF_TOKEN));
+}
+
+public C99NoCastExpressionParser(String[] mapFrom) { // constructor
+ tokenMap = new TokenMap( C99NoCastExpressionParsersym .orderedTerminalSymbols, mapFrom);
+}
+
+
+public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+}
+
+ public void ruleAction(int ruleNumber)
+ {
+ switch (ruleNumber)
+ {
+
+ //
+ // Rule 1: <openscope-ast> ::= $Empty
+ //
+ case 1: { action. openASTScope(); break;
+ }
+
+ //
+ // Rule 10: literal ::= integer
+ //
+ case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
+ }
+
+ //
+ // Rule 11: literal ::= floating
+ //
+ case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
+ }
+
+ //
+ // Rule 12: literal ::= charconst
+ //
+ case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
+ }
+
+ //
+ // Rule 13: literal ::= stringlit
+ //
+ case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
+ }
+
+ //
+ // Rule 15: primary_expression ::= primary_expression_id
+ //
+ case 15: { action. consumeExpressionID(); break;
+ }
+
+ //
+ // Rule 16: primary_expression ::= ( expression )
+ //
+ case 16: { action. consumeExpressionBracketed(); break;
+ }
+
+ //
+ // Rule 20: postfix_expression ::= postfix_expression [ expression ]
+ //
+ case 20: { action. consumeExpressionArraySubscript(); break;
+ }
+
+ //
+ // Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
+ //
+ case 21: { action. consumeExpressionFunctionCall(); break;
+ }
+
+ //
+ // Rule 22: postfix_expression ::= postfix_expression . member_name
+ //
+ case 22: { action. consumeExpressionFieldReference(false); break;
+ }
+
+ //
+ // Rule 23: postfix_expression ::= postfix_expression -> member_name
+ //
+ case 23: { action. consumeExpressionFieldReference(true); break;
+ }
+
+ //
+ // Rule 24: postfix_expression ::= postfix_expression ++
+ //
+ case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
+ }
+
+ //
+ // Rule 25: postfix_expression ::= postfix_expression --
+ //
+ case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
+ }
+
+ //
+ // Rule 26: postfix_expression ::= ( type_name ) { <openscope-ast> initializer_list comma_opt }
+ //
+ case 26: { action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 32: unary_expression ::= ++ unary_expression
+ //
+ case 32: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break;
+ }
+
+ //
+ // Rule 33: unary_expression ::= -- unary_expression
+ //
+ case 33: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break;
+ }
+
+ //
+ // Rule 34: unary_expression ::= & cast_expression
+ //
+ case 34: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break;
+ }
+
+ //
+ // Rule 35: unary_expression ::= * cast_expression
+ //
+ case 35: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break;
+ }
+
+ //
+ // Rule 36: unary_expression ::= + cast_expression
+ //
+ case 36: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 37: unary_expression ::= - cast_expression
+ //
+ case 37: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 38: unary_expression ::= ~ cast_expression
+ //
+ case 38: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break;
+ }
+
+ //
+ // Rule 39: unary_expression ::= ! cast_expression
+ //
+ case 39: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break;
+ }
+
+ //
+ // Rule 40: unary_expression ::= sizeof unary_expression
+ //
+ case 40: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break;
+ }
+
+ //
+ // Rule 41: unary_expression ::= sizeof ( type_name )
+ //
+ case 41: { action. consumeExpressionSizeofTypeId(); break;
+ }
+
+ //
+ // Rule 44: multiplicative_expression ::= multiplicative_expression * cast_expression
+ //
+ case 44: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); break;
+ }
+
+ //
+ // Rule 45: multiplicative_expression ::= multiplicative_expression / cast_expression
+ //
+ case 45: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); break;
+ }
+
+ //
+ // Rule 46: multiplicative_expression ::= multiplicative_expression % cast_expression
+ //
+ case 46: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); break;
+ }
+
+ //
+ // Rule 48: additive_expression ::= additive_expression + multiplicative_expression
+ //
+ case 48: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 49: additive_expression ::= additive_expression - multiplicative_expression
+ //
+ case 49: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 51: shift_expression ::= shift_expression << additive_expression
+ //
+ case 51: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); break;
+ }
+
+ //
+ // Rule 52: shift_expression ::= shift_expression >> additive_expression
+ //
+ case 52: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); break;
+ }
+
+ //
+ // Rule 54: relational_expression ::= relational_expression < shift_expression
+ //
+ case 54: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); break;
+ }
+
+ //
+ // Rule 55: relational_expression ::= relational_expression > shift_expression
+ //
+ case 55: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); break;
+ }
+
+ //
+ // Rule 56: relational_expression ::= relational_expression <= shift_expression
+ //
+ case 56: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); break;
+ }
+
+ //
+ // Rule 57: relational_expression ::= relational_expression >= shift_expression
+ //
+ case 57: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); break;
+ }
+
+ //
+ // Rule 59: equality_expression ::= equality_expression == relational_expression
+ //
+ case 59: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); break;
+ }
+
+ //
+ // Rule 60: equality_expression ::= equality_expression != relational_expression
+ //
+ case 60: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); break;
+ }
+
+ //
+ // Rule 62: AND_expression ::= AND_expression & equality_expression
+ //
+ case 62: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); break;
+ }
+
+ //
+ // Rule 64: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
+ //
+ case 64: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); break;
+ }
+
+ //
+ // Rule 66: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
+ //
+ case 66: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); break;
+ }
+
+ //
+ // Rule 68: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
+ //
+ case 68: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); break;
+ }
+
+ //
+ // Rule 70: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
+ //
+ case 70: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); break;
+ }
+
+ //
+ // Rule 72: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
+ //
+ case 72: { action. consumeExpressionConditional(); break;
+ }
+
+ //
+ // Rule 74: assignment_expression ::= unary_expression = assignment_expression
+ //
+ case 74: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
+ }
+
+ //
+ // Rule 75: assignment_expression ::= unary_expression *= assignment_expression
+ //
+ case 75: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); break;
+ }
+
+ //
+ // Rule 76: assignment_expression ::= unary_expression /= assignment_expression
+ //
+ case 76: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); break;
+ }
+
+ //
+ // Rule 77: assignment_expression ::= unary_expression %= assignment_expression
+ //
+ case 77: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); break;
+ }
+
+ //
+ // Rule 78: assignment_expression ::= unary_expression += assignment_expression
+ //
+ case 78: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); break;
+ }
+
+ //
+ // Rule 79: assignment_expression ::= unary_expression -= assignment_expression
+ //
+ case 79: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); break;
+ }
+
+ //
+ // Rule 80: assignment_expression ::= unary_expression <<= assignment_expression
+ //
+ case 80: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); break;
+ }
+
+ //
+ // Rule 81: assignment_expression ::= unary_expression >>= assignment_expression
+ //
+ case 81: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); break;
+ }
+
+ //
+ // Rule 82: assignment_expression ::= unary_expression &= assignment_expression
+ //
+ case 82: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); break;
+ }
+
+ //
+ // Rule 83: assignment_expression ::= unary_expression ^= assignment_expression
+ //
+ case 83: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); break;
+ }
+
+ //
+ // Rule 84: assignment_expression ::= unary_expression |= assignment_expression
+ //
+ case 84: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); break;
+ }
+
+ //
+ // Rule 87: expression_list ::= <openscope-ast> expression_list_actual
+ //
+ case 87: { action. consumeExpressionList(); break;
+ }
+
+ //
+ // Rule 89: expression_list_opt ::= $Empty
+ //
+ case 89: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 99: statement ::= ERROR_TOKEN
+ //
+ case 99: { action. consumeStatementProblem(); break;
+ }
+
+ //
+ // Rule 100: labeled_statement ::= identifier_or_typedefname : statement
+ //
+ case 100: { action. consumeStatementLabeled(); break;
+ }
+
+ //
+ // Rule 101: labeled_statement ::= case constant_expression :
+ //
+ case 101: { action. consumeStatementCase(); break;
+ }
+
+ //
+ // Rule 102: labeled_statement ::= default :
+ //
+ case 102: { action. consumeStatementDefault(); break;
+ }
+
+ //
+ // Rule 103: compound_statement ::= { }
+ //
+ case 103: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 104: compound_statement ::= { <openscope-ast> block_item_list }
+ //
+ case 104: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 108: block_item ::= declaration
+ //
+ case 108: { action. consumeStatementDeclaration(); break;
+ }
+
+ //
+ // Rule 109: expression_statement ::= ;
+ //
+ case 109: { action. consumeStatementNull(); break;
+ }
+
+ //
+ // Rule 110: expression_statement ::= expression_in_statement ;
+ //
+ case 110: { action. consumeStatementExpression(); break;
+ }
+
+ //
+ // Rule 111: selection_statement ::= if ( expression ) statement
+ //
+ case 111: { action. consumeStatementIf(false); break;
+ }
+
+ //
+ // Rule 112: selection_statement ::= if ( expression ) statement else statement
+ //
+ case 112: { action. consumeStatementIf(true); break;
+ }
+
+ //
+ // Rule 113: selection_statement ::= switch ( expression ) statement
+ //
+ case 113: { action. consumeStatementSwitch(); break;
+ }
+
+ //
+ // Rule 115: expression_opt ::= $Empty
+ //
+ case 115: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 116: iteration_statement ::= do statement while ( expression ) ;
+ //
+ case 116: { action. consumeStatementDoLoop(); break;
+ }
+
+ //
+ // Rule 117: iteration_statement ::= while ( expression ) statement
+ //
+ case 117: { action. consumeStatementWhileLoop(); break;
+ }
+
+ //
+ // Rule 118: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement
+ //
+ case 118: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 119: iteration_statement ::= for ( declaration expression_opt ; expression_opt ) statement
+ //
+ case 119: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 120: jump_statement ::= goto identifier_or_typedefname ;
+ //
+ case 120: { action. consumeStatementGoto(); break;
+ }
+
+ //
+ // Rule 121: jump_statement ::= continue ;
+ //
+ case 121: { action. consumeStatementContinue(); break;
+ }
+
+ //
+ // Rule 122: jump_statement ::= break ;
+ //
+ case 122: { action. consumeStatementBreak(); break;
+ }
+
+ //
+ // Rule 123: jump_statement ::= return ;
+ //
+ case 123: { action. consumeStatementReturn(false); break;
+ }
+
+ //
+ // Rule 124: jump_statement ::= return expression ;
+ //
+ case 124: { action. consumeStatementReturn(true); break;
+ }
+
+ //
+ // Rule 125: declaration ::= declaration_specifiers ;
+ //
+ case 125: { action. consumeDeclarationSimple(false); break;
+ }
+
+ //
+ // Rule 126: declaration ::= declaration_specifiers <openscope-ast> init_declarator_list ;
+ //
+ case 126: { action. consumeDeclarationSimple(true); break;
+ }
+
+ //
+ // Rule 127: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers
+ //
+ case 127: { action. consumeDeclarationSpecifiersSimple(); break;
+ }
+
+ //
+ // Rule 128: declaration_specifiers ::= <openscope-ast> struct_or_union_declaration_specifiers
+ //
+ case 128: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 129: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers
+ //
+ case 129: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 130: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers
+ //
+ case 130: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 131: declaration_specifiers ::= <openscope-ast> typdef_name_declaration_specifiers
+ //
+ case 131: { action. consumeDeclarationSpecifiersTypedefName(); break;
+ }
+
+ //
+ // Rule 156: init_declarator ::= complete_declarator = initializer
+ //
+ case 156: { action. consumeDeclaratorWithInitializer(true); break;
+ }
+
+ //
+ // Rule 158: storage_class_specifier ::= storage_class_specifier_token
+ //
+ case 158: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 164: simple_type_specifier ::= simple_type_specifier_token
+ //
+ case 164: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 177: typedef_name_in_declspec ::= Completion
+ //
+ case 177: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 178: typedef_name_in_declspec ::= identifier
+ //
+ case 178: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 181: struct_or_union_specifier ::= struct { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 181: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 182: struct_or_union_specifier ::= union { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 182: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 183: struct_or_union_specifier ::= struct identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 183: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 184: struct_or_union_specifier ::= union identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 184: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 185: elaborated_specifier ::= struct identifier_or_typedefname
+ //
+ case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 186: elaborated_specifier ::= union identifier_or_typedefname
+ //
+ case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 187: elaborated_specifier ::= enum identifier_or_typedefname
+ //
+ case 187: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
+ }
+
+ //
+ // Rule 192: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
+ //
+ case 192: { action. consumeStructDeclaration(true); break;
+ }
+
+ //
+ // Rule 193: struct_declaration ::= specifier_qualifier_list ;
+ //
+ case 193: { action. consumeStructDeclaration(false); break;
+ }
+
+ //
+ // Rule 199: struct_declarator ::= : constant_expression
+ //
+ case 199: { action. consumeBitField(false); break;
+ }
+
+ //
+ // Rule 200: struct_declarator ::= declarator : constant_expression
+ //
+ case 200: { action. consumeBitField(true); break;
+ }
+
+ //
+ // Rule 201: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 201: { action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 202: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 202: { action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 207: enumerator ::= identifier_or_typedefname
+ //
+ case 207: { action. consumeEnumerator(false); break;
+ }
+
+ //
+ // Rule 208: enumerator ::= identifier_or_typedefname = constant_expression
+ //
+ case 208: { action. consumeEnumerator(true); break;
+ }
+
+ //
+ // Rule 209: type_qualifier ::= type_qualifier_token
+ //
+ case 209: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 213: function_specifier ::= inline
+ //
+ case 213: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 215: declarator ::= <openscope-ast> pointer_seq direct_declarator
+ //
+ case 215: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 220: basic_direct_declarator ::= declarator_id_name
+ //
+ case 220: { action. consumeDirectDeclaratorIdentifier(); break;
+ }
+
+ //
+ // Rule 221: basic_direct_declarator ::= ( declarator )
+ //
+ case 221: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 222: declarator_id_name ::= identifier
+ //
+ case 222: { action. consumeIdentifierName(); break;
+ }
+
+ //
+ // Rule 223: array_direct_declarator ::= basic_direct_declarator array_modifier
+ //
+ case 223: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 224: array_direct_declarator ::= array_direct_declarator array_modifier
+ //
+ case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 226: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 226: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 227: function_direct_declarator ::= basic_direct_declarator ( )
+ //
+ case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 229: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
+ //
+ case 229: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 230: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
+ //
+ case 230: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
+ }
+
+ //
+ // Rule 232: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
+ //
+ case 232: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 233: identifier_list ::= identifier
+ //
+ case 233: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 234: identifier_list ::= identifier_list , identifier
+ //
+ case 234: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 235: array_modifier ::= [ ]
+ //
+ case 235: { action. consumeDirectDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 236: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
+ //
+ case 236: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
+ }
+
+ //
+ // Rule 237: array_modifier ::= [ assignment_expression ]
+ //
+ case 237: { action. consumeDirectDeclaratorArrayModifier(true); break;
+ }
+
+ //
+ // Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
+ }
+
+ //
+ // Rule 239: array_modifier ::= [ static assignment_expression ]
+ //
+ case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
+ }
+
+ //
+ // Rule 240: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
+ //
+ case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 242: array_modifier ::= [ * ]
+ //
+ case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
+ }
+
+ //
+ // Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
+ //
+ case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
+ }
+
+ //
+ // Rule 245: pointer_seq ::= *
+ //
+ case 245: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 246: pointer_seq ::= pointer_seq *
+ //
+ case 246: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 247: pointer_seq ::= * <openscope-ast> type_qualifier_list
+ //
+ case 247: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 248: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
+ //
+ case 248: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 251: parameter_type_list ::= parameter_list
+ //
+ case 251: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 252: parameter_type_list ::= parameter_list , ...
+ //
+ case 252: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 253: parameter_type_list ::= ...
+ //
+ case 253: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 256: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
+ //
+ case 256: { action. consumeParameterDeclaration(); break;
+ }
+
+ //
+ // Rule 257: parameter_declaration ::= declaration_specifiers
+ //
+ case 257: { action. consumeParameterDeclarationWithoutDeclarator(); break;
+ }
+
+ //
+ // Rule 260: type_name ::= specifier_qualifier_list
+ //
+ case 260: { action. consumeTypeId(false); break;
+ }
+
+ //
+ // Rule 261: type_name ::= specifier_qualifier_list abstract_declarator
+ //
+ case 261: { action. consumeTypeId(true); break;
+ }
+
+ //
+ // Rule 263: abstract_declarator ::= <openscope-ast> pointer_seq
+ //
+ case 263: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
+ //
+ case 264: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 268: basic_direct_abstract_declarator ::= ( abstract_declarator )
+ //
+ case 268: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 269: array_direct_abstract_declarator ::= array_modifier
+ //
+ case 269: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
+ }
+
+ //
+ // Rule 270: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
+ //
+ case 270: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 271: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
+ //
+ case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 272: function_direct_abstract_declarator ::= ( )
+ //
+ case 272: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
+ }
+
+ //
+ // Rule 273: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
+ //
+ case 273: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 274: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
+ //
+ case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
+ }
+
+ //
+ // Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 276: initializer ::= assignment_expression
+ //
+ case 276: { action. consumeInitializer(); break;
+ }
+
+ //
+ // Rule 277: initializer ::= { <openscope-ast> initializer_list comma_opt }
+ //
+ case 277: { action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 282: designated_initializer ::= <openscope-ast> designation = initializer
+ //
+ case 282: { action. consumeInitializerDesignated(); break;
+ }
+
+ //
+ // Rule 286: designator_base ::= [ constant_expression ]
+ //
+ case 286: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 287: designator_base ::= . identifier_or_typedefname
+ //
+ case 287: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 288: designator ::= [ constant_expression ]
+ //
+ case 288: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 289: designator ::= . identifier_or_typedefname
+ //
+ case 289: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 290: translation_unit ::= external_declaration_list
+ //
+ case 290: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 291: translation_unit ::= $Empty
+ //
+ case 291: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 296: external_declaration ::= ;
+ //
+ case 296: { action. consumeDeclarationEmpty(); break;
+ }
+
+ //
+ // Rule 297: external_declaration ::= ERROR_TOKEN
+ //
+ case 297: { action. consumeDeclarationProblem(); break;
+ }
+
+ //
+ // Rule 300: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ //
+ case 300: { action. consumeFunctionDefinition(true); break;
+ }
+
+ //
+ // Rule 301: function_definition ::= <openscope-ast> function_declarator function_body
+ //
+ case 301: { action. consumeFunctionDefinition(false); break;
+ }
+
+ //
+ // Rule 302: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ //
+ case 302: { action. consumeFunctionDefinitionKnR(); break;
+ }
+
+ //
+ // Rule 303: function_body ::= { }
+ //
+ case 303: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 304: function_body ::= { <openscope-ast> block_item_list }
+ //
+ case 304: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 306: no_cast_start ::= ERROR_TOKEN
+ //
+ case 306: { action. consumeExpressionProblem(); break;
+ }
+
+
+ default:
+ break;
+ }
+ return;
+ }
+}
+
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParserprs.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParserprs.java
new file mode 100644
index 0000000000..d8b087d542
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParserprs.java
@@ -0,0 +1,1079 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+public class C99NoCastExpressionParserprs implements lpg.lpgjavaruntime.ParseTable, C99NoCastExpressionParsersym {
+
+ public interface IsKeyword {
+ public final static byte isKeyword[] = {0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0
+ };
+ };
+ public final static byte isKeyword[] = IsKeyword.isKeyword;
+ public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+ public interface BaseCheck {
+ public final static short baseCheck[] = {0,
+ 0,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,3,1,1,1,4,
+ 4,3,3,2,2,8,1,0,1,1,
+ 1,2,2,2,2,2,2,2,2,2,
+ 4,1,1,3,3,3,1,3,3,1,
+ 3,3,1,3,3,3,3,1,3,3,
+ 1,3,1,3,1,3,1,3,1,3,
+ 1,5,1,3,3,3,3,3,3,3,
+ 3,3,3,3,1,1,2,1,0,1,
+ 3,1,1,1,1,1,1,1,1,3,
+ 3,2,2,4,1,2,1,1,1,2,
+ 5,7,5,1,0,7,5,9,8,3,
+ 2,2,2,3,2,4,2,2,2,2,
+ 2,1,1,1,1,2,1,2,2,2,
+ 1,2,2,1,2,2,1,2,2,1,
+ 2,2,1,3,1,3,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,
+ 5,5,6,6,2,2,2,1,0,1,
+ 2,4,2,1,1,3,1,1,2,3,
+ 6,7,1,0,1,3,1,3,1,1,
+ 1,1,1,1,3,1,1,1,1,1,
+ 3,1,2,2,1,5,3,1,3,5,
+ 1,3,1,3,2,4,3,5,4,6,
+ 6,3,5,1,1,2,3,4,1,2,
+ 1,3,1,1,3,2,1,1,1,1,
+ 2,1,2,3,1,1,1,3,1,2,
+ 2,2,3,4,5,1,5,1,1,3,
+ 3,4,1,1,2,3,2,3,2,1,
+ 0,1,2,1,1,1,1,1,2,4,
+ 3,6,2,4,1,1,-32,0,0,0,
+ 0,0,0,0,0,-2,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-5,0,
+ 0,0,0,0,0,0,0,0,-121,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-177,
+ 0,-12,0,0,0,0,0,0,0,0,
+ 0,-13,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-127,-4,-15,-140,-169,
+ -104,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-16,0,-170,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-165,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-33,
+ -34,-29,-30,-3,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-17,0,-49,0,0,0,0,0,0,
+ 0,0,-18,0,0,0,-70,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-69,0,0,0,
+ -19,-20,-21,-22,0,-107,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-126,0,0,0,0,
+ 0,0,0,0,-23,0,0,0,0,0,
+ 0,0,0,0,0,0,-24,-25,0,-185,
+ 0,0,0,0,0,0,0,0,-26,0,
+ 0,0,0,0,0,0,0,0,0,-27,
+ 0,0,0,0,0,0,0,0,-68,0,
+ 0,0,0,0,0,0,0,0,0,-83,
+ -84,-139,-87,-56,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-57,0,0,0,0,0,0,
+ 0,0,-88,0,0,0,0,0,0,0,
+ 0,0,0,-58,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-59,0,0,0,0,0,0,
+ 0,0,-89,0,0,0,0,0,0,0,
+ 0,0,0,-60,0,0,0,0,0,0,
+ 0,0,-90,0,0,0,0,0,0,0,
+ 0,0,0,-61,0,0,0,0,0,0,
+ 0,0,-91,0,0,0,0,0,0,0,
+ 0,0,0,-62,0,0,0,0,0,0,
+ 0,0,-92,0,0,0,0,0,0,0,
+ 0,0,0,-63,0,0,0,0,0,0,
+ 0,0,-93,0,0,0,0,0,0,0,
+ 0,0,0,-64,0,0,0,0,0,0,
+ 0,0,-191,0,0,0,0,0,0,0,
+ 0,0,0,-65,0,0,0,0,0,0,
+ 0,0,-94,0,0,0,0,0,0,0,
+ 0,0,0,-66,0,0,0,0,0,0,
+ 0,0,-130,0,0,0,0,0,0,0,
+ 0,0,0,-46,0,0,0,0,0,0,
+ 0,0,0,0,-95,-96,-97,-98,-77,0,
+ 0,0,0,0,-144,0,0,0,0,0,
+ 0,0,0,-99,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-100,-101,-102,
+ -151,-103,-78,0,0,0,0,-6,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -145,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -168,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-182,
+ 0,0,0,0,0,0,0,0,-114,0,
+ 0,0,0,0,0,0,0,0,-37,0,
+ 0,0,0,0,0,0,0,-47,0,0,
+ 0,0,0,0,0,0,-188,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-192,0,0,0,0,
+ 0,0,0,0,-80,0,0,0,0,0,
+ 0,0,0,0,-38,0,0,0,0,0,
+ 0,0,0,-7,0,0,0,0,0,0,
+ -116,0,-202,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,-120,0,0,0,0,0,0,0,0,
+ -119,0,0,0,0,0,0,0,0,0,
+ -129,-8,0,0,0,0,0,0,0,0,
+ -51,0,0,0,0,0,0,0,0,-155,
+ 0,0,0,0,0,0,-131,-72,-123,-161,
+ -142,-148,-73,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,-203,0,0,0,
+ 0,0,0,0,-113,-67,0,0,-162,-166,
+ 0,-193,-106,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-204,
+ 0,0,-54,0,0,0,0,0,0,0,
+ 0,-160,0,0,0,0,0,0,0,-55,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-52,0,0,0,0,
+ 0,0,0,0,-82,0,0,0,0,-74,
+ -179,-9,0,0,0,0,0,0,-115,0,
+ 0,-143,0,0,0,0,-167,0,-85,0,
+ 0,-171,0,0,0,0,-86,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-184,0,0,0,0,0,
+ 0,0,-75,0,-111,0,0,0,0,-48,
+ 0,0,0,0,0,0,0,0,-201,0,
+ 0,0,0,0,-159,-152,0,0,0,0,
+ 0,0,0,0,0,0,-50,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-10,0,
+ 0,0,0,0,0,0,-42,0,0,0,
+ 0,0,0,0,0,0,0,-43,0,0,
+ 0,0,0,0,0,0,-117,0,-11,0,
+ 0,0,0,0,0,0,0,0,-44,0,
+ 0,0,0,0,0,0,0,-108,0,-45,
+ 0,0,0,0,0,0,0,0,-194,0,
+ -71,-187,-156,-109,-118,-31,-124,0,0,0,
+ 0,0,0,0,0,-110,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ -147,0,0,0,0,0,0,-14,-28,-35,
+ 0,0,-122,-76,0,0,0,0,0,0,
+ 0,0,0,0,-39,0,0,0,0,0,
+ 0,0,0,0,0,0,-189,0,0,0,
+ 0,0,0,0,0,-183,-125,0,0,0,
+ -79,-128,0,0,-40,0,0,0,0,0,
+ 0,-41,0,0,0,0,0,0,-81,0,
+ 0,0,0,0,-133,-36,0,0,0,0,
+ 0,0,-112,0,0,-153,-135,0,0,0,
+ 0,0,-134,0,-136,0,0,0,0,0,
+ -176,0,-138,0,-154,-174,0,0,-137,0,
+ 0,0,-105,0,-158,0,0,0,0,-149,
+ 0,-190,0,0,0,-164,0,0,0,0,
+ 0,0,0,0,-175,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-1,0,0,
+ 0,-150,0,-132,-178,-53,0,-163,-157,0,
+ 0,0,0,0,0,-146,-141,0,0,-195,
+ 0,-172,-180,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-173,-186,0,0,-181,
+ 0,-196,0,-197,0,0,0,0,0,-198,
+ 0,-199,-200,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0
+ };
+ };
+ public final static short baseCheck[] = BaseCheck.baseCheck;
+ public final int baseCheck(int index) { return baseCheck[index]; }
+ public final static short rhs[] = baseCheck;
+ public final int rhs(int index) { return rhs[index]; };
+
+ public interface BaseAction {
+ public final static char baseAction[] = {
+ 83,9,23,23,22,22,26,26,67,67,
+ 1,1,1,1,2,2,2,3,3,4,
+ 4,4,4,4,4,4,4,51,51,68,
+ 68,5,5,5,5,5,5,5,5,5,
+ 5,5,6,7,7,7,7,8,8,8,
+ 10,10,10,11,11,11,11,11,12,12,
+ 12,13,13,14,14,15,15,16,16,17,
+ 17,18,18,19,19,19,19,19,19,19,
+ 19,19,19,19,19,93,45,40,84,84,
+ 71,71,46,94,94,94,94,94,94,94,
+ 95,95,95,96,96,101,101,102,102,97,
+ 97,98,98,98,104,104,99,99,99,99,
+ 100,100,100,100,100,103,103,24,24,24,
+ 24,24,28,28,28,77,77,72,72,72,
+ 72,73,73,73,74,74,74,75,75,75,
+ 76,76,76,105,105,106,106,107,29,31,
+ 31,31,31,31,52,54,54,54,54,54,
+ 54,54,54,54,54,54,54,64,64,27,
+ 27,61,61,61,61,62,62,62,55,55,
+ 56,56,48,48,32,85,85,78,79,79,
+ 79,63,63,80,80,81,81,65,65,20,
+ 21,21,21,30,47,47,33,33,33,33,
+ 36,36,38,34,34,35,39,39,108,108,
+ 37,109,109,86,86,25,25,25,25,25,
+ 25,25,25,25,82,49,49,49,49,58,
+ 58,57,57,57,59,59,50,50,87,87,
+ 69,69,60,60,60,41,41,41,42,43,
+ 43,43,44,44,44,44,53,53,70,70,
+ 70,70,66,88,89,89,90,90,91,91,
+ 110,110,111,111,112,112,112,112,114,114,
+ 113,113,113,115,115,83,83,1,14,19,
+ 15,388,579,43,482,408,219,521,493,523,
+ 522,555,524,568,567,73,90,133,209,342,
+ 14,19,15,388,40,135,132,134,158,270,
+ 14,19,15,388,579,43,482,408,389,521,
+ 493,523,522,555,524,568,567,73,276,137,
+ 432,164,318,14,19,15,388,33,141,144,
+ 147,150,318,14,19,15,388,32,387,1210,
+ 1263,1444,1481,1499,1205,269,549,371,496,580,
+ 597,6,278,215,1550,217,1592,219,220,225,
+ 339,264,1103,1098,267,279,250,209,191,612,
+ 270,14,19,15,388,579,43,482,408,389,
+ 521,493,523,522,555,524,568,567,73,276,
+ 195,14,19,15,388,579,43,482,408,389,
+ 521,493,523,522,555,524,568,567,73,276,
+ 98,98,334,334,318,14,19,15,388,579,
+ 43,482,408,278,521,493,523,522,555,524,
+ 568,567,73,90,599,16,279,1130,390,284,
+ 1467,285,51,280,318,14,19,15,388,42,
+ 43,482,408,10,521,846,281,145,14,19,
+ 15,388,579,43,482,408,1384,521,493,523,
+ 522,555,524,568,567,73,1368,166,23,22,
+ 235,36,22,476,115,387,366,14,19,15,
+ 388,579,43,482,408,1387,521,493,523,522,
+ 555,524,568,567,73,1477,170,14,19,15,
+ 388,579,43,482,408,286,521,493,523,522,
+ 555,524,568,567,73,1606,1543,211,262,236,
+ 294,14,19,15,388,579,43,482,408,382,
+ 521,493,523,522,555,524,568,567,73,276,
+ 318,14,19,15,388,579,43,482,408,373,
+ 521,493,523,522,555,524,568,567,73,91,
+ 390,420,609,127,318,14,19,15,388,579,
+ 43,482,408,282,521,493,523,522,555,524,
+ 568,567,73,84,318,14,19,15,388,579,
+ 43,482,408,251,521,493,523,522,555,524,
+ 568,567,73,83,318,14,19,15,388,579,
+ 43,482,408,1556,521,493,523,522,555,524,
+ 568,567,73,82,318,14,19,15,388,579,
+ 43,482,408,245,521,493,523,522,555,524,
+ 568,567,73,81,318,14,19,15,388,579,
+ 43,482,408,408,521,493,523,522,555,524,
+ 568,567,73,80,318,14,19,15,388,579,
+ 43,482,408,550,521,493,523,522,555,524,
+ 568,567,73,79,318,14,19,15,388,579,
+ 43,482,408,554,521,493,523,522,555,524,
+ 568,567,73,78,318,14,19,15,388,579,
+ 43,482,408,564,521,493,523,522,555,524,
+ 568,567,73,77,318,14,19,15,388,579,
+ 43,482,408,237,521,493,523,522,555,524,
+ 568,567,73,76,318,14,19,15,388,579,
+ 43,482,408,573,521,493,523,522,555,524,
+ 568,567,73,75,318,14,19,15,388,579,
+ 43,482,408,49,521,493,523,522,555,524,
+ 568,567,73,74,318,14,19,15,388,42,
+ 43,482,763,133,209,518,30,66,350,31,
+ 192,135,132,134,158,318,14,19,15,388,
+ 579,43,482,408,598,521,493,523,522,555,
+ 524,568,567,73,1612,137,949,164,220,310,
+ 387,166,400,110,141,144,147,150,318,14,
+ 19,15,388,42,39,1210,1263,1444,1481,1499,
+ 1205,318,14,19,15,388,579,43,482,408,
+ 1031,521,493,523,522,555,524,568,567,73,
+ 1626,318,14,19,15,388,42,43,482,408,
+ 360,521,493,523,522,555,524,568,567,92,
+ 318,14,19,15,388,42,43,482,408,442,
+ 521,493,523,522,555,524,568,567,92,318,
+ 14,19,15,388,42,43,613,1627,318,14,
+ 19,15,388,42,43,482,803,318,14,19,
+ 15,388,42,43,482,408,208,521,493,523,
+ 522,555,524,568,567,92,318,14,19,15,
+ 388,42,43,482,408,409,521,493,523,522,
+ 555,524,568,567,92,318,14,19,15,388,
+ 42,43,643,1634,318,14,19,15,388,42,
+ 38,591,1061,318,14,19,15,388,42,43,
+ 482,408,199,521,493,523,522,555,524,568,
+ 567,92,318,14,19,15,388,42,43,482,
+ 408,608,521,493,523,522,555,524,568,567,
+ 72,69,318,14,19,15,388,42,37,200,
+ 881,318,14,19,15,388,42,43,482,408,
+ 590,521,493,523,522,848,269,607,194,540,
+ 504,540,402,349,214,1550,217,1592,219,220,
+ 225,1565,262,1103,1098,267,182,151,258,249,
+ 209,249,209,270,272,587,334,269,271,617,
+ 576,259,615,535,1594,214,1550,217,1592,219,
+ 220,225,1099,262,1103,1098,267,273,882,1536,
+ 215,1550,217,1592,219,220,225,1222,256,1232,
+ 252,1694,1265,318,14,19,15,388,42,43,
+ 482,408,614,521,493,523,522,555,524,879,
+ 318,14,19,15,388,42,43,482,408,1694,
+ 521,493,523,522,555,880,318,14,19,15,
+ 388,42,43,482,408,49,521,493,523,864,
+ 97,513,318,14,19,15,388,42,36,6,
+ 1610,1694,559,1630,1694,133,209,323,1523,334,
+ 133,209,563,136,132,134,158,478,140,132,
+ 134,158,250,209,214,1550,217,1592,219,220,
+ 225,21,250,209,287,614,1694,138,1132,164,
+ 20,1694,139,461,164,334,142,145,148,151,
+ 318,14,19,15,388,42,43,482,408,513,
+ 521,493,845,133,209,590,613,268,1610,195,
+ 197,143,132,134,158,823,783,318,14,19,
+ 15,388,42,43,482,408,1632,521,847,1694,
+ 1071,181,214,1550,217,1592,219,220,225,318,
+ 14,19,15,388,42,35,1132,318,14,19,
+ 15,388,42,43,482,408,255,683,318,14,
+ 19,15,388,42,43,482,408,6,703,318,
+ 14,19,15,388,42,34,1525,196,197,318,
+ 14,19,15,388,42,43,482,408,478,723,
+ 318,14,19,15,388,42,43,482,408,227,
+ 743,529,323,599,540,6,462,540,1610,1694,
+ 1513,237,1211,1694,1539,517,221,14,19,15,
+ 388,42,35,272,249,209,269,249,209,289,
+ 1694,269,214,1550,217,1592,219,220,225,242,
+ 1694,1694,262,1103,1098,267,1536,262,1103,1098,
+ 267,221,14,19,15,388,42,35,6,6,
+ 470,1265,386,545,466,386,261,307,307,454,
+ 193,1694,1101,1694,243,318,14,19,15,388,
+ 42,46,194,194,133,209,546,609,1694,855,
+ 1386,1386,146,132,134,158,323,478,86,86,
+ 88,495,334,453,453,318,14,19,15,388,
+ 42,45,318,14,19,15,388,42,44,500,
+ 239,133,209,1100,274,6,6,452,1126,149,
+ 132,134,158,372,1535,454,334,6,1640,133,
+ 209,1694,823,588,1229,588,1545,152,132,134,
+ 158,587,823,6,823,588,334,1071,275,128,
+ 1552,206,1598,530,823,588,86,194,1694,194,
+ 611,1237,79,227,823,1383,590,1383,221,194,
+ 1694,823,1543,254,1694,372,1100,1383,269,194,
+ 1482,190,1097,190,823,224,1071,1383,1090,1599,
+ 1285,1599,26,190,264,1103,1098,267,246,1071,
+ 1595,1599,594,190,391,590,6,454,128,600,
+ 1613,1599,254,823,205,454,478,6,823,1642,
+ 166,1097,478,590,360,254,410,223,1071,1172,
+ 1129,184,1482,194,1097,1100,478,478,86,238,
+ 590,1383,590,305,478,240,86,1694,1643,183,
+ 590,878,334,572,254,1694,1694,191,1694,241,
+ 286,1516,1694,1097,1694,1694,201,288,202,1117,
+ 1694,1694,1694,205,226,230,277,1694,1694,1694,
+ 1694,316,1694,1694,1694,1694,1694,1694,1255,1129,
+ 1694,0,17,178,0,18,177,0,1,1916,
+ 0,1,1927,0
+ };
+ };
+ public final static char baseAction[] = BaseAction.baseAction;
+ public final int baseAction(int index) { return baseAction[index]; }
+ public final static char lhs[] = baseAction;
+ public final int lhs(int index) { return lhs[index]; };
+
+ public interface TermCheck {
+ public final static byte termCheck[] = {0,
+ 0,1,2,3,4,0,6,7,8,0,
+ 10,11,12,13,14,15,16,17,18,19,
+ 20,0,22,23,24,25,26,27,28,0,
+ 0,1,0,12,4,0,36,37,38,39,
+ 40,41,42,43,44,45,46,47,0,1,
+ 0,21,4,3,6,7,8,57,58,59,
+ 51,52,53,54,16,0,31,32,0,1,
+ 2,3,24,25,26,27,28,9,0,1,
+ 51,52,53,54,36,37,38,39,40,41,
+ 42,43,44,45,46,47,0,0,1,49,
+ 50,4,6,7,8,57,58,59,0,0,
+ 1,33,16,4,0,0,51,52,53,54,
+ 24,25,26,27,28,0,0,0,1,3,
+ 21,4,36,37,38,39,40,41,42,43,
+ 44,45,46,47,0,1,2,3,4,5,
+ 0,1,2,3,10,11,12,13,14,15,
+ 16,17,18,19,20,0,22,23,3,0,
+ 1,2,3,4,5,49,50,63,34,10,
+ 11,12,13,14,15,16,17,18,19,20,
+ 0,22,23,0,0,1,2,3,4,5,
+ 10,11,9,34,10,11,12,13,14,15,
+ 0,17,18,19,20,21,22,23,0,0,
+ 0,1,2,3,4,5,0,1,2,35,
+ 10,11,12,13,14,15,0,17,18,19,
+ 20,5,22,23,0,0,1,2,3,4,
+ 0,0,1,3,34,10,11,12,13,14,
+ 15,0,17,18,19,20,30,22,23,0,
+ 1,2,3,4,55,31,32,67,68,10,
+ 11,12,13,14,15,0,17,18,19,20,
+ 21,22,23,0,1,2,3,4,80,49,
+ 50,65,0,10,11,12,13,14,15,0,
+ 17,18,19,20,21,22,23,0,1,2,
+ 3,4,0,1,79,64,4,10,11,12,
+ 13,14,15,0,17,18,19,20,5,22,
+ 23,0,1,2,3,4,0,62,0,0,
+ 2,10,11,12,13,14,15,9,17,18,
+ 19,20,29,22,23,0,1,2,3,4,
+ 0,0,0,64,3,10,11,12,13,14,
+ 15,0,17,18,19,20,0,22,23,0,
+ 0,2,3,21,5,6,7,8,9,0,
+ 30,0,1,2,33,16,5,0,0,1,
+ 9,62,4,24,25,26,27,28,29,0,
+ 21,2,3,33,5,6,7,8,9,21,
+ 29,0,1,2,3,16,0,56,31,32,
+ 9,0,0,24,25,26,27,28,29,63,
+ 69,70,71,72,73,74,75,76,77,78,
+ 0,0,21,2,3,0,6,7,8,0,
+ 9,6,7,8,5,0,16,0,0,0,
+ 1,16,5,4,24,25,26,27,28,24,
+ 25,26,27,28,0,0,0,2,29,0,
+ 6,7,8,0,9,6,7,8,13,14,
+ 16,34,0,1,2,16,0,0,24,25,
+ 26,27,28,24,25,26,27,28,0,0,
+ 2,2,3,5,0,60,61,9,9,0,
+ 6,7,8,48,0,6,7,8,0,0,
+ 6,7,8,0,6,7,8,29,0,56,
+ 0,66,0,0,6,7,8,55,6,7,
+ 8,0,0,10,11,0,5,60,61,0,
+ 31,32,10,11,31,32,0,0,9,0,
+ 0,5,5,0,5,2,0,0,0,0,
+ 29,30,9,5,5,9,0,0,0,12,
+ 0,21,0,0,0,29,0,0,0,9,
+ 0,0,35,0,35,0,0,48,21,0,
+ 0,56,0,0,35,0,30,0,30,0,
+ 0,0,0,30,48,33,30,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,65,0,0,0,0,0,55,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0
+ };
+ };
+ public final static byte termCheck[] = TermCheck.termCheck;
+ public final int termCheck(int index) { return termCheck[index]; }
+
+ public interface TermAction {
+ public final static char termAction[] = {0,
+ 1694,610,1438,1319,611,1,1904,1905,1906,58,
+ 1212,1072,1349,372,362,329,1855,1704,1705,1706,
+ 1707,63,1024,888,1856,1854,1907,1857,1853,60,
+ 1694,1873,1694,1270,1874,53,1860,1865,1864,1862,
+ 1863,1861,1866,1867,1859,1868,1869,1870,1694,1872,
+ 47,1219,1871,1492,1904,1905,1906,1005,883,849,
+ 1370,1359,1338,1327,1855,59,834,968,257,1916,
+ 1102,1,1856,1854,1907,1857,1853,497,1,1691,
+ 1370,1359,1338,1327,1860,1865,1864,1862,1863,1861,
+ 1866,1867,1859,1868,1869,1870,127,1694,1723,1485,
+ 1455,1724,1904,1905,1906,1005,883,849,1694,1694,
+ 1873,1947,1855,1874,67,1694,1370,1359,1338,1327,
+ 1856,1854,1907,1857,1853,1694,49,204,1873,1492,
+ 1347,1874,1860,1865,1864,1862,1863,1861,1866,1867,
+ 1859,1868,1869,1870,1,1711,1438,1396,1712,1697,
+ 1694,1916,1379,1443,1212,1072,1349,372,362,329,
+ 526,1704,1705,1706,1707,1694,1024,888,1133,1694,
+ 1711,1438,1431,1712,1697,1485,1455,1081,1696,1212,
+ 1072,1349,372,362,329,901,1704,1705,1706,1707,
+ 50,1024,888,266,1,1711,1438,1319,1712,27,
+ 1015,959,497,1696,1212,1072,1349,372,362,329,
+ 71,1704,1705,1706,1707,1607,1024,888,1694,1694,
+ 1694,1711,1438,1319,1712,1697,1,1916,1379,27,
+ 1212,1072,1349,372,362,329,1694,1704,1705,1706,
+ 1707,1703,1024,888,57,1694,1,1,1,1,
+ 48,1694,1928,1492,1696,1,1,1,1,1,
+ 1,69,1,1,1,1,1279,1,1,1,
+ 1711,1438,1319,1712,1052,834,968,1163,1596,1212,
+ 1072,1349,372,362,329,65,1704,1705,1706,1707,
+ 1607,1024,888,1694,1711,1438,1319,1712,1681,1485,
+ 1455,1702,1694,1212,1072,1349,372,362,329,70,
+ 1704,1705,1706,1707,1607,1024,888,1694,1711,1438,
+ 1319,1712,1694,1873,2000,1180,1874,1212,1072,1349,
+ 372,362,329,1694,1704,1705,1706,1707,1699,1024,
+ 888,1694,1711,1439,1319,1712,1694,1196,265,66,
+ 1125,1212,1072,1349,372,362,329,497,1704,1705,
+ 1706,1707,1698,1024,888,1,1711,1438,1319,1712,
+ 87,1,1694,1180,1133,1212,1072,1349,372,362,
+ 329,42,1704,1705,1706,1707,68,1024,888,17,
+ 1,1682,1682,391,1682,178,178,178,1682,41,
+ 590,1,1688,1102,1947,178,1699,56,1694,1873,
+ 497,1196,1874,178,178,178,178,178,1682,18,
+ 391,1685,1685,1947,1685,177,177,177,1685,1385,
+ 1698,263,1916,1102,1443,177,1694,814,834,968,
+ 497,186,1694,177,177,177,177,177,1685,1081,
+ 794,774,754,734,714,674,694,654,634,614,
+ 128,260,1505,1381,1,129,1904,1905,1906,1,
+ 497,1904,1905,1906,89,61,1855,1694,1694,203,
+ 1476,1855,1697,1476,1856,1854,1907,1857,1853,1856,
+ 1854,1907,1857,1853,130,31,1694,1440,89,131,
+ 1904,1905,1906,207,1506,1904,1905,1906,1718,1719,
+ 1855,1696,1,1916,1379,1855,1694,62,1856,1854,
+ 1907,1857,1853,1856,1854,1907,1857,1853,1,263,
+ 1381,1381,1443,1699,245,1297,484,497,497,1694,
+ 1,1,1,451,246,1904,1905,1906,244,55,
+ 1,1,1,54,1904,1905,1906,1698,247,940,
+ 1694,450,248,52,1904,1905,1906,996,1904,1905,
+ 1906,1694,51,1015,959,1694,1699,1297,484,1694,
+ 834,968,1015,959,834,968,1,1,921,1694,
+ 185,1699,189,218,1701,1531,283,64,1,1,
+ 1698,1160,497,1703,188,977,251,187,28,1270,
+ 216,1517,1,28,198,1698,203,1694,1694,497,
+ 1694,1694,189,1694,1700,1694,1694,1227,1533,1694,
+ 1694,570,1694,1694,188,1694,1286,1694,430,1694,
+ 1694,1694,1694,1721,1382,1946,2480,1694,1694,1694,
+ 1694,1694,1694,1694,1694,1694,1694,1694,1694,1694,
+ 1694,1694,1694,1702,1694,1694,1694,1694,1694,1033
+ };
+ };
+ public final static char termAction[] = TermAction.termAction;
+ public final int termAction(int index) { return termAction[index]; }
+
+ public interface Asb {
+ public final static char asb[] = {0,
+ 426,1,80,41,80,80,80,80,80,80,
+ 80,80,80,337,3,181,178,185,183,191,
+ 189,193,192,195,194,10,80,337,163,163,
+ 256,337,321,321,378,80,80,80,80,80,
+ 80,80,80,80,80,80,80,80,80,80,
+ 80,80,80,80,80,80,80,80,80,80,
+ 80,80,80,80,80,80,163,72,260,74,
+ 291,161,160,231,243,243,70,70,243,70,
+ 243,351,117,117,163,45,178,178,183,183,
+ 183,183,181,181,189,185,185,192,191,224,
+ 194,193,166,54,256,251,97,45,374,78,
+ 163,397,294,206,262,206,262,331,206,80,
+ 54,251,374,374,45,77,74,163,254,351,
+ 162,296,262,262,262,262,331,331,333,49,
+ 54,374,251,80,80,45,78,291,219,218,
+ 260,296,163,262,288,324,262,262,288,333,
+ 226,333,331,288,52,229,321,80,48,54,
+ 251,45,45,163,397,294,254,288,326,288,
+ 288,80,321,333,56,45,321,80,333,296,
+ 202,80,201,93,260,288,45,288,163,162,
+ 326,80,93,322
+ };
+ };
+ public final static char asb[] = Asb.asb;
+ public final int asb(int index) { return asb[index]; }
+
+ public interface Asr {
+ public final static byte asr[] = {0,
+ 80,0,65,9,2,48,66,13,14,12,
+ 3,10,11,49,50,31,32,51,52,53,
+ 54,60,61,62,63,64,67,68,35,56,
+ 69,70,71,72,73,75,74,76,77,78,
+ 55,29,80,30,34,5,0,56,9,48,
+ 0,5,35,9,48,13,14,12,3,10,
+ 11,22,23,15,2,17,18,19,20,1,
+ 4,21,0,6,7,8,16,34,5,17,
+ 18,19,20,4,13,14,12,10,11,22,
+ 23,15,3,2,1,0,6,7,8,2,
+ 17,18,19,20,1,4,13,14,12,3,
+ 10,11,22,23,15,0,7,16,28,8,
+ 27,26,25,6,24,48,66,13,14,12,
+ 10,11,49,50,31,32,51,52,53,54,
+ 60,61,62,63,64,67,68,56,69,70,
+ 71,72,73,74,75,76,77,78,3,2,
+ 9,30,29,5,0,56,69,70,71,72,
+ 73,74,75,76,77,78,21,3,49,50,
+ 10,11,32,31,51,52,53,54,60,61,
+ 12,62,63,64,34,29,35,80,67,68,
+ 55,65,5,30,0,24,6,25,26,27,
+ 7,16,28,8,1,3,21,2,5,30,
+ 29,65,9,55,0,5,30,35,56,0,
+ 44,36,41,39,40,38,37,42,43,45,
+ 46,47,55,65,28,25,16,24,27,26,
+ 6,7,8,30,1,5,29,2,9,3,
+ 0,24,36,6,37,57,25,38,26,39,
+ 40,27,7,41,42,16,58,28,59,43,
+ 44,8,45,46,47,1,4,35,5,0,
+ 3,2,9,29,5,24,36,6,37,57,
+ 25,38,26,39,40,27,7,41,42,16,
+ 58,28,59,43,44,8,45,46,47,33,
+ 4,1,0,65,5,3,1,2,55,0,
+ 1,4,5,35,30,0,15,17,18,19,
+ 20,2,13,14,12,3,10,11,22,23,
+ 4,1,57,58,59,44,36,41,39,40,
+ 38,37,42,43,45,46,47,28,25,16,
+ 24,27,26,6,7,8,0,5,29,15,
+ 17,18,19,20,1,4,2,13,14,12,
+ 3,10,11,22,23,0,24,36,6,37,
+ 57,25,38,26,39,40,27,7,41,42,
+ 16,58,28,59,43,44,8,45,46,47,
+ 1,4,33,3,0,15,17,18,19,20,
+ 1,4,2,13,14,12,3,10,11,22,
+ 23,79,0
+ };
+ };
+ public final static byte asr[] = Asr.asr;
+ public final int asr(int index) { return asr[index]; }
+
+ public interface Nasb {
+ public final static byte nasb[] = {0,
+ 83,8,17,8,17,17,17,17,17,17,
+ 17,17,17,64,8,8,8,8,8,8,
+ 8,8,8,8,8,8,17,64,41,41,
+ 55,1,19,19,68,65,17,17,17,17,
+ 17,17,17,17,17,17,17,17,17,17,
+ 17,17,65,17,17,17,17,17,17,17,
+ 17,17,17,17,17,17,41,8,73,21,
+ 54,31,31,47,48,48,27,27,48,27,
+ 48,43,8,8,41,23,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,81,56,81,16,23,62,22,
+ 41,71,40,8,81,8,81,81,8,17,
+ 16,81,62,62,23,22,9,41,34,2,
+ 8,80,81,75,81,75,27,81,25,11,
+ 81,62,9,17,17,23,22,33,31,31,
+ 73,80,41,75,29,59,86,75,29,25,
+ 8,8,27,29,15,8,27,17,13,16,
+ 9,23,23,41,71,40,35,29,50,29,
+ 29,17,27,25,17,23,27,17,25,79,
+ 60,17,8,50,73,29,23,29,41,41,
+ 50,17,37,8
+ };
+ };
+ public final static byte nasb[] = Nasb.nasb;
+ public final int nasb(int index) { return nasb[index]; }
+
+ public interface Nasr {
+ public final static char nasr[] = {0,
+ 4,77,76,75,74,73,72,0,20,0,
+ 89,0,91,0,66,9,4,0,68,0,
+ 9,4,23,0,51,0,27,0,26,0,
+ 25,0,22,9,43,42,36,34,0,9,
+ 22,0,61,62,63,64,52,28,0,9,
+ 36,34,0,22,9,43,42,0,9,67,
+ 0,58,0,32,9,45,0,9,84,0,
+ 9,24,49,0,56,9,32,0,86,24,
+ 9,0,9,83,0,9,32,48,0
+ };
+ };
+ public final static char nasr[] = Nasr.nasr;
+ public final int nasr(int index) { return nasr[index]; }
+
+ public interface TerminalIndex {
+ public final static char terminalIndex[] = {0,
+ 85,2,9,86,87,48,64,76,1,10,
+ 11,8,6,7,68,69,81,82,83,84,
+ 3,12,13,44,55,60,63,72,90,42,
+ 16,17,30,89,91,47,52,56,61,62,
+ 66,67,74,75,78,79,80,4,14,15,
+ 18,19,20,21,29,31,54,70,73,22,
+ 23,24,25,26,92,5,27,28,32,33,
+ 34,35,36,37,38,39,40,41,93,94,
+ 45,46,49,50,51,53,57,58,59,65,
+ 71,77,88
+ };
+ };
+ public final static char terminalIndex[] = TerminalIndex.terminalIndex;
+ public final int terminalIndex(int index) { return terminalIndex[index]; }
+
+ public interface NonterminalIndex {
+ public final static char nonterminalIndex[] = {0,
+ 0,0,0,101,105,106,107,108,0,109,
+ 110,111,112,113,114,115,116,117,118,129,
+ 0,97,96,122,149,98,121,128,0,0,
+ 0,140,145,147,0,148,0,0,0,0,
+ 158,159,160,0,100,120,137,139,146,155,
+ 0,131,136,0,0,138,150,153,154,157,
+ 132,133,134,135,144,161,99,102,103,104,
+ 119,123,124,125,126,127,130,142,0,0,
+ 143,152,95,0,141,151,156,162,163,0,
+ 164,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0
+ };
+ };
+ public final static char nonterminalIndex[] = NonterminalIndex.nonterminalIndex;
+ public final int nonterminalIndex(int index) { return nonterminalIndex[index]; }
+
+ public interface ScopePrefix {
+ public final static char scopePrefix[] = {
+ 158,80,33,39,87,107,113,138,12,19,
+ 49,67,119,124,26,45,97,154,176,180,
+ 147,1,1,30,54,77,184,6,101,129,
+ 166,93,57,57,57
+ };
+ };
+ public final static char scopePrefix[] = ScopePrefix.scopePrefix;
+ public final int scopePrefix(int index) { return scopePrefix[index]; }
+
+ public interface ScopeSuffix {
+ public final static char scopeSuffix[] = {
+ 17,17,4,4,17,17,17,144,17,24,
+ 4,24,17,17,24,4,95,24,24,4,
+ 151,4,4,24,4,24,24,9,104,132,
+ 169,95,64,59,72
+ };
+ };
+ public final static char scopeSuffix[] = ScopeSuffix.scopeSuffix;
+ public final int scopeSuffix(int index) { return scopeSuffix[index]; }
+
+ public interface ScopeLhs {
+ public final static char scopeLhs[] = {
+ 4,63,25,25,63,61,61,98,53,44,
+ 25,39,61,61,44,25,48,5,4,4,
+ 18,91,90,42,25,36,2,66,48,99,
+ 4,48,39,37,39
+ };
+ };
+ public final static char scopeLhs[] = ScopeLhs.scopeLhs;
+ public final int scopeLhs(int index) { return scopeLhs[index]; }
+
+ public interface ScopeLa {
+ public final static byte scopeLa[] = {
+ 35,35,34,34,35,35,35,86,35,29,
+ 34,29,35,35,29,34,65,29,29,34,
+ 55,34,34,29,34,29,29,56,1,92,
+ 29,65,2,2,2
+ };
+ };
+ public final static byte scopeLa[] = ScopeLa.scopeLa;
+ public final int scopeLa(int index) { return scopeLa[index]; }
+
+ public interface ScopeStateSet {
+ public final static byte scopeStateSet[] = {
+ 34,19,23,23,19,19,19,-1,88,27,
+ 23,11,19,19,27,23,5,34,34,34,
+ 63,1,3,27,23,11,34,89,5,-1,
+ 34,5,11,11,11
+ };
+ };
+ public final static byte scopeStateSet[] = ScopeStateSet.scopeStateSet;
+ public final int scopeStateSet(int index) { return scopeStateSet[index]; }
+
+ public interface ScopeRhs {
+ public final static char scopeRhs[] = {0,
+ 139,9,0,96,0,181,102,0,31,136,
+ 0,144,163,102,21,0,98,0,150,102,
+ 2,135,0,97,0,150,102,2,0,153,
+ 2,0,112,16,175,102,9,0,112,175,
+ 102,16,9,0,112,16,9,0,112,175,
+ 102,9,0,112,9,0,129,0,2,0,
+ 151,97,0,2,97,0,150,102,2,129,
+ 0,2,0,150,97,0,140,2,0,144,
+ 173,102,21,120,57,0,144,173,102,21,
+ 57,0,125,0,99,0,178,102,125,0,
+ 102,125,0,141,99,0,148,102,21,120,
+ 59,0,148,102,21,120,58,0,148,102,
+ 21,59,0,148,102,21,58,0,187,85,
+ 0,77,2,100,97,99,0,187,115,138,
+ 2,89,0,53,0,0,138,68,110,0,
+ 29,117,0,162,2,15,0,144,163,102,
+ 21,115,162,2,0,162,2,0,97,3,
+ 0,104,0,98,0,177,2,97,0,138,
+ 9,97,0,138,2,0
+ };
+ };
+ public final static char scopeRhs[] = ScopeRhs.scopeRhs;
+ public final int scopeRhs(int index) { return scopeRhs[index]; }
+
+ public interface ScopeState {
+ public final static char scopeState[] = {0,
+ 390,0,389,0,1545,1599,1535,1525,1523,0,
+ 1117,1279,1379,1211,360,1102,1071,0,823,1205,
+ 307,0,1592,1550,1103,1098,360,1102,1071,1543,
+ 1381,1386,0,1431,1396,1180,1163,1196,1081,1297,
+ 484,1270,968,834,1370,1359,1338,1327,1492,1485,
+ 1455,1015,959,372,362,1349,1319,1212,1072,1024,
+ 888,329,1033,996,977,940,921,901,855,546,
+ 1052,526,497,814,794,774,754,734,714,694,
+ 674,654,634,614,307,590,454,570,410,430,
+ 339,0
+ };
+ };
+ public final static char scopeState[] = ScopeState.scopeState;
+ public final int scopeState(int index) { return scopeState[index]; }
+
+ public interface InSymb {
+ public final static char inSymb[] = {0,
+ 0,176,102,164,15,23,22,11,10,3,
+ 12,14,13,2,97,101,100,104,103,106,
+ 105,108,107,110,109,98,30,2,162,138,
+ 125,102,66,48,2,9,11,10,50,49,
+ 3,54,53,52,51,31,32,12,61,60,
+ 63,62,68,67,64,78,77,76,74,75,
+ 73,72,71,70,69,56,162,115,102,9,
+ 2,136,135,165,166,167,59,58,168,57,
+ 169,170,1,4,177,138,100,100,103,103,
+ 103,103,101,101,105,104,104,107,106,138,
+ 109,108,115,21,142,3,16,112,102,3,
+ 153,102,2,120,21,120,21,21,120,55,
+ 102,3,102,102,112,175,151,150,117,102,
+ 152,102,21,102,21,102,102,21,163,102,
+ 21,102,151,175,16,112,3,2,127,129,
+ 102,30,150,102,148,125,149,102,148,173,
+ 120,174,102,144,30,181,48,9,182,102,
+ 151,112,112,140,102,2,142,148,102,148,
+ 144,56,30,173,56,139,48,9,163,102,
+ 178,55,140,2,102,144,139,144,150,179,
+ 30,55,142,30
+ };
+ };
+ public final static char inSymb[] = InSymb.inSymb;
+ public final int inSymb(int index) { return inSymb[index]; }
+
+ public interface Name {
+ public final static String name[] = {
+ "",
+ "[",
+ "(",
+ "{",
+ ".",
+ "->",
+ "++",
+ "--",
+ "&",
+ "*",
+ "+",
+ "-",
+ "~",
+ "!",
+ "/",
+ "%",
+ ">>",
+ "<<",
+ "<",
+ ">",
+ "<=",
+ ">=",
+ "==",
+ "!=",
+ "^",
+ "|",
+ "&&",
+ "||",
+ "?",
+ ":",
+ "...",
+ "=",
+ "*=",
+ "/=",
+ "%=",
+ "+=",
+ "-=",
+ ">>=",
+ "<<=",
+ "&=",
+ "^=",
+ "|=",
+ ",",
+ "$empty",
+ "auto",
+ "break",
+ "case",
+ "char",
+ "const",
+ "continue",
+ "default",
+ "do",
+ "double",
+ "else",
+ "enum",
+ "extern",
+ "float",
+ "for",
+ "goto",
+ "if",
+ "inline",
+ "int",
+ "long",
+ "register",
+ "restrict",
+ "return",
+ "short",
+ "signed",
+ "sizeof",
+ "static",
+ "struct",
+ "switch",
+ "typedef",
+ "union",
+ "unsigned",
+ "void",
+ "volatile",
+ "while",
+ "_Bool",
+ "_Complex",
+ "_Imaginary",
+ "integer",
+ "floating",
+ "charconst",
+ "stringlit",
+ "identifier",
+ "Completion",
+ "EndOfCompletion",
+ "Invalid",
+ "RightBracket",
+ "RightParen",
+ "RightBrace",
+ "SemiColon",
+ "ERROR_TOKEN",
+ "EOF_TOKEN",
+ "no_cast_start",
+ "]",
+ ")",
+ "}",
+ ";",
+ "expression",
+ "postfix_expression",
+ "member_name",
+ "type_name",
+ "initializer_list",
+ "unary_expression",
+ "cast_expression",
+ "multiplicative_expression",
+ "additive_expression",
+ "shift_expression",
+ "relational_expression",
+ "equality_expression",
+ "AND_expression",
+ "exclusive_OR_expression",
+ "inclusive_OR_expression",
+ "logical_AND_expression",
+ "logical_OR_expression",
+ "conditional_expression",
+ "assignment_expression",
+ "expression_list_actual",
+ "constant_expression",
+ "identifier_or_typedefname",
+ "declaration_specifiers",
+ "simple_declaration_specifiers",
+ "struct_or_union_declaration_sp" +
+ "ecifiers",
+ "elaborated_declaration_specifi" +
+ "ers",
+ "enum_declaration_specifiers",
+ "typdef_name_declaration_specif" +
+ "iers",
+ "no_type_declaration_specifier",
+ "type_qualifier",
+ "no_type_declaration_specifiers",
+ "simple_type_specifier",
+ "struct_or_union_specifier",
+ "elaborated_specifier",
+ "enum_specifier",
+ "typedef_name_in_declspec",
+ "initializer",
+ "declarator",
+ "struct_declaration_list",
+ "struct_declaration",
+ "specifier_qualifier_list",
+ "struct_declarator_list",
+ "complete_struct_declarator",
+ "enumerator_list",
+ "enumerator",
+ "direct_declarator",
+ "pointer_seq",
+ "array_direct_declarator",
+ "basic_direct_declarator",
+ "array_modifier",
+ "parameter_type_list",
+ "identifier_list",
+ "array_modifier_type_qualifiers",
+ "type_qualifier_list",
+ "parameter_list",
+ "parameter_declaration",
+ "complete_parameter_declarator",
+ "abstract_declarator",
+ "direct_abstract_declarator",
+ "basic_direct_abstract_declarat" +
+ "or",
+ "array_direct_abstract_declarat" +
+ "or",
+ "designated_initializer",
+ "designation",
+ "designator_list",
+ "designator"
+ };
+ };
+ public final static String name[] = Name.name;
+ public final String name(int index) { return name[index]; }
+
+ public final static int
+ ERROR_SYMBOL = 79,
+ SCOPE_UBOUND = 34,
+ SCOPE_SIZE = 35,
+ MAX_NAME_LENGTH = 38;
+
+ public final int getErrorSymbol() { return ERROR_SYMBOL; }
+ public final int getScopeUbound() { return SCOPE_UBOUND; }
+ public final int getScopeSize() { return SCOPE_SIZE; }
+ public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+ public final static int
+ NUM_STATES = 204,
+ NT_OFFSET = 93,
+ LA_STATE_OFFSET = 2000,
+ MAX_LA = 2,
+ NUM_RULES = 306,
+ NUM_NONTERMINALS = 115,
+ NUM_SYMBOLS = 208,
+ SEGMENT_SIZE = 8192,
+ START_STATE = 1588,
+ IDENTIFIER_SYMBOL = 0,
+ EOFT_SYMBOL = 80,
+ EOLT_SYMBOL = 80,
+ ACCEPT_ACTION = 1681,
+ ERROR_ACTION = 1694;
+
+ public final static boolean BACKTRACK = true;
+
+ public final int getNumStates() { return NUM_STATES; }
+ public final int getNtOffset() { return NT_OFFSET; }
+ public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+ public final int getMaxLa() { return MAX_LA; }
+ public final int getNumRules() { return NUM_RULES; }
+ public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+ public final int getNumSymbols() { return NUM_SYMBOLS; }
+ public final int getSegmentSize() { return SEGMENT_SIZE; }
+ public final int getStartState() { return START_STATE; }
+ public final int getStartSymbol() { return lhs[0]; }
+ public final int getIdentifierSymbol() { return IDENTIFIER_SYMBOL; }
+ public final int getEoftSymbol() { return EOFT_SYMBOL; }
+ public final int getEoltSymbol() { return EOLT_SYMBOL; }
+ public final int getAcceptAction() { return ACCEPT_ACTION; }
+ public final int getErrorAction() { return ERROR_ACTION; }
+ public final boolean isValidForParser() { return isValidForParser; }
+ public final boolean getBacktrack() { return BACKTRACK; }
+
+ public final int originalState(int state) {
+ return -baseCheck[state];
+ }
+ public final int asi(int state) {
+ return asb[originalState(state)];
+ }
+ public final int nasi(int state) {
+ return nasb[originalState(state)];
+ }
+ public final int inSymbol(int state) {
+ return inSymb[originalState(state)];
+ }
+
+ public final int ntAction(int state, int sym) {
+ return baseAction[state + sym];
+ }
+
+ public final int tAction(int state, int sym) {
+ int i = baseAction[state],
+ k = i + sym;
+ return termAction[termCheck[k] == sym ? k : i];
+ }
+ public final int lookAhead(int la_state, int sym) {
+ int k = la_state + sym;
+ return termAction[termCheck[k] == sym ? k : la_state];
+ }
+}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParsersym.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParsersym.java
new file mode 100644
index 0000000000..777d2a8bc8
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParsersym.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+public interface C99NoCastExpressionParsersym {
+ public final static int
+ TK_auto = 24,
+ TK_break = 81,
+ TK_case = 82,
+ TK_char = 36,
+ TK_const = 6,
+ TK_continue = 83,
+ TK_default = 84,
+ TK_do = 85,
+ TK_double = 37,
+ TK_else = 86,
+ TK_enum = 57,
+ TK_extern = 25,
+ TK_float = 38,
+ TK_for = 87,
+ TK_goto = 88,
+ TK_if = 89,
+ TK_inline = 26,
+ TK_int = 39,
+ TK_long = 40,
+ TK_register = 27,
+ TK_restrict = 7,
+ TK_return = 90,
+ TK_short = 41,
+ TK_signed = 42,
+ TK_sizeof = 15,
+ TK_static = 16,
+ TK_struct = 58,
+ TK_switch = 91,
+ TK_typedef = 28,
+ TK_union = 59,
+ TK_unsigned = 43,
+ TK_void = 44,
+ TK_volatile = 8,
+ TK_while = 92,
+ TK__Bool = 45,
+ TK__Complex = 46,
+ TK__Imaginary = 47,
+ TK_integer = 17,
+ TK_floating = 18,
+ TK_charconst = 19,
+ TK_stringlit = 20,
+ TK_identifier = 1,
+ TK_Completion = 4,
+ TK_EndOfCompletion = 5,
+ TK_Invalid = 93,
+ TK_LeftBracket = 9,
+ TK_LeftParen = 2,
+ TK_LeftBrace = 21,
+ TK_Dot = 48,
+ TK_Arrow = 66,
+ TK_PlusPlus = 13,
+ TK_MinusMinus = 14,
+ TK_And = 12,
+ TK_Star = 3,
+ TK_Plus = 10,
+ TK_Minus = 11,
+ TK_Tilde = 22,
+ TK_Bang = 23,
+ TK_Slash = 49,
+ TK_Percent = 50,
+ TK_RightShift = 31,
+ TK_LeftShift = 32,
+ TK_LT = 51,
+ TK_GT = 52,
+ TK_LE = 53,
+ TK_GE = 54,
+ TK_EQ = 60,
+ TK_NE = 61,
+ TK_Caret = 62,
+ TK_Or = 63,
+ TK_AndAnd = 64,
+ TK_OrOr = 67,
+ TK_Question = 68,
+ TK_Colon = 55,
+ TK_DotDotDot = 33,
+ TK_Assign = 56,
+ TK_StarAssign = 69,
+ TK_SlashAssign = 70,
+ TK_PercentAssign = 71,
+ TK_PlusAssign = 72,
+ TK_MinusAssign = 73,
+ TK_RightShiftAssign = 74,
+ TK_LeftShiftAssign = 75,
+ TK_AndAssign = 76,
+ TK_CaretAssign = 77,
+ TK_OrAssign = 78,
+ TK_Comma = 30,
+ TK_RightBracket = 34,
+ TK_RightParen = 29,
+ TK_RightBrace = 35,
+ TK_SemiColon = 65,
+ TK_ERROR_TOKEN = 79,
+ TK_EOF_TOKEN = 80;
+
+ public final static String orderedTerminalSymbols[] = {
+ "",
+ "identifier",
+ "LeftParen",
+ "Star",
+ "Completion",
+ "EndOfCompletion",
+ "const",
+ "restrict",
+ "volatile",
+ "LeftBracket",
+ "Plus",
+ "Minus",
+ "And",
+ "PlusPlus",
+ "MinusMinus",
+ "sizeof",
+ "static",
+ "integer",
+ "floating",
+ "charconst",
+ "stringlit",
+ "LeftBrace",
+ "Tilde",
+ "Bang",
+ "auto",
+ "extern",
+ "inline",
+ "register",
+ "typedef",
+ "RightParen",
+ "Comma",
+ "RightShift",
+ "LeftShift",
+ "DotDotDot",
+ "RightBracket",
+ "RightBrace",
+ "char",
+ "double",
+ "float",
+ "int",
+ "long",
+ "short",
+ "signed",
+ "unsigned",
+ "void",
+ "_Bool",
+ "_Complex",
+ "_Imaginary",
+ "Dot",
+ "Slash",
+ "Percent",
+ "LT",
+ "GT",
+ "LE",
+ "GE",
+ "Colon",
+ "Assign",
+ "enum",
+ "struct",
+ "union",
+ "EQ",
+ "NE",
+ "Caret",
+ "Or",
+ "AndAnd",
+ "SemiColon",
+ "Arrow",
+ "OrOr",
+ "Question",
+ "StarAssign",
+ "SlashAssign",
+ "PercentAssign",
+ "PlusAssign",
+ "MinusAssign",
+ "RightShiftAssign",
+ "LeftShiftAssign",
+ "AndAssign",
+ "CaretAssign",
+ "OrAssign",
+ "ERROR_TOKEN",
+ "EOF_TOKEN",
+ "break",
+ "case",
+ "continue",
+ "default",
+ "do",
+ "else",
+ "for",
+ "goto",
+ "if",
+ "return",
+ "switch",
+ "while",
+ "Invalid"
+ };
+
+ public final static boolean isValidForParser = true;
+}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
index cea3422a98..2eba59c623 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
@@ -13,148 +13,174 @@
package org.eclipse.cdt.internal.core.dom.lrparser.c99;
-
import lpg.lpgjavaruntime.*;
-import org.eclipse.cdt.core.dom.lrparser.lpgextensions.ITrialUndoActionProvider;
-import org.eclipse.cdt.core.dom.lrparser.lpgextensions.AbstractTrialUndoActionProvider;
-import org.eclipse.cdt.core.dom.lrparser.lpgextensions.TrialUndoParser;
import java.util.*;
-
import org.eclipse.cdt.core.dom.ast.*;
import org.eclipse.cdt.core.dom.lrparser.IParser;
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+
+import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
+import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
+
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
-import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
-
-public class C99Parser extends AbstractTrialUndoActionProvider< C99ParserAction , Object > implements IParserActionTokenProvider, IParser {
- private static ParseTable prs = new C99Parserprs();
- protected static final Action< C99ParserAction , Object >[] RULE_ACTIONS;
-
- {
- ruleAction = RULE_ACTIONS;
- }
-
- public C99Parser(LexStream lexStream) {
- super(lexStream);
-
- try {
- super.remapTerminalSymbols(orderedTerminalSymbols(), C99Parserprs.EOFT_SYMBOL);
- } catch (NullExportedSymbolsException e) {
- } catch (NullTerminalSymbolsException e) {
- } catch (UnimplementedTerminalsException e) {
- java.util.ArrayList unimplemented_symbols = e.getSymbols();
- System.out.println("The Lexer will not scan the following token(s):");
- for (int i = 0; i < unimplemented_symbols.size(); i++) {
- Integer id = (Integer) unimplemented_symbols.get(i);
- System.out.println(" " + C99Parsersym.orderedTerminalSymbols[id.intValue()]);
- }
- System.out.println();
- } catch (UndefinedEofSymbolException e) {
- throw new Error(new UndefinedEofSymbolException("The Lexer does not implement the Eof symbol " + C99Parsersym.orderedTerminalSymbols[C99Parserprs.EOFT_SYMBOL]));
- }
- }
-
- public C99Parser() { // constructor
- // this(new C99Lexer ());
- }
+public class C99Parser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
+{
+ private static ParseTable prs = new C99Parserprs();
+ private BacktrackingParser btParser;
- public String[] orderedTerminalSymbols() {
- return C99Parsersym.orderedTerminalSymbols;
- }
+ public BacktrackingParser getParser() { return btParser; }
+ private void setResult(Object object) { btParser.setSym1(object); }
+ public Object getRhsSym(int i) { return btParser.getSym(i); }
- public String getTokenKindName(int kind) {
- return C99Parsersym.orderedTerminalSymbols[kind];
- }
+ public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+ public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+
+ public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+ public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
- public int getEOFTokenKind() {
- return C99Parserprs.EOFT_SYMBOL;
- }
-
- public PrsStream getParseStream() {
- return (PrsStream) this;
- }
+ public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+ public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
- //
- // Report error message for given error_token.
- //
- public final void reportErrorTokenMessage(int error_token, String msg) {
- int firsttok = super.getFirstRealToken(error_token), lasttok = super.getLastRealToken(error_token);
- String location = super.getFileName() + ':' +
- (firsttok > lasttok
- ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
- : (super.getLine(error_token) + ":" +
- super.getColumn(error_token) + ":" +
- super.getEndLine(error_token) + ":" +
- super.getEndColumn(error_token))) + ": ";
- super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
- }
+ public int getLeftSpan() { return btParser.getFirstToken(); }
+ public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); }
- public Object parser() {
- return parser(null, 0);
- }
-
- public Object parser(Monitor monitor) {
- return parser(monitor, 0);
- }
+ public int getRightSpan() { return btParser.getLastToken(); }
+ public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
- public Object parser(int error_repair_count) {
- return parser(null, error_repair_count);
- }
+ public int getRhsErrorTokenIndex(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (err instanceof ErrorToken ? index : 0);
+ }
+ public ErrorToken getRhsErrorIToken(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (ErrorToken) (err instanceof ErrorToken ? err : null);
+ }
- public Object parser(Monitor monitor, int error_repair_count) {
- try {
- btParser = new TrialUndoParser((TokenStream) this, prs, (ITrialUndoActionProvider< Object >) this);
- } catch (NotBacktrackParseTableException e) {
- throw new Error(new NotBacktrackParseTableException("Regenerate C99Parserprs.java with -BACKTRACK option"));
- } catch (BadParseSymFileException e) {
- throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- C99Parsersym.java"));
- }
+ public C99Parser(LexStream lexStream)
+ {
+ super(lexStream);
+
+ try
+ {
+ super.remapTerminalSymbols(orderedTerminalSymbols(), C99Parserprs.EOFT_SYMBOL);
+ }
+ catch(NullExportedSymbolsException e) {
+ }
+ catch(NullTerminalSymbolsException e) {
+ }
+ catch(UnimplementedTerminalsException e)
+ {
+ java.util.ArrayList unimplemented_symbols = e.getSymbols();
+ System.out.println("The Lexer will not scan the following token(s):");
+ for (int i = 0; i < unimplemented_symbols.size(); i++)
+ {
+ Integer id = (Integer) unimplemented_symbols.get(i);
+ System.out.println(" " + C99Parsersym.orderedTerminalSymbols[id.intValue()]);
+ }
+ System.out.println();
+ }
+ catch(UndefinedEofSymbolException e)
+ {
+ throw new Error(new UndefinedEofSymbolException
+ ("The Lexer does not implement the Eof symbol " +
+ C99Parsersym.orderedTerminalSymbols[C99Parserprs.EOFT_SYMBOL]));
+ }
+ }
- try {
- Object result = (Object) btParser.parse(error_repair_count);
- btParser.commit();
- return result;
- } catch (BadParseException e) {
- reset(e.error_token); // point to error token
+ public String[] orderedTerminalSymbols() { return C99Parsersym.orderedTerminalSymbols; }
+ public String getTokenKindName(int kind) { return C99Parsersym.orderedTerminalSymbols[kind]; }
+ public int getEOFTokenKind() { return C99Parserprs.EOFT_SYMBOL; }
+ public PrsStream getParseStream() { return (PrsStream) this; }
+
+ //
+ // Report error message for given error_token.
+ //
+ public final void reportErrorTokenMessage(int error_token, String msg)
+ {
+ int firsttok = super.getFirstErrorToken(error_token),
+ lasttok = super.getLastErrorToken(error_token);
+ String location = super.getFileName() + ':' +
+ (firsttok > lasttok
+ ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
+ : (super.getLine(error_token) + ":" +
+ super.getColumn(error_token) + ":" +
+ super.getEndLine(error_token) + ":" +
+ super.getEndColumn(error_token)))
+ + ": ";
+ super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
+ }
- //DiagnoseParser diagnoseParser = new DiagnoseParser((TokenStream) this, prs);
- //diagnoseParser.diagnose(e.error_token);
- }
+ public Object parser()
+ {
+ return parser(null, 0);
+ }
+
+ public Object parser(Monitor monitor)
+ {
+ return parser(monitor, 0);
+ }
+
+ public Object parser(int error_repair_count)
+ {
+ return parser(null, error_repair_count);
+ }
- return null;
- }
+ public Object parser(Monitor monitor, int error_repair_count)
+ {
+ try
+ {
+ btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ }
+ catch (NotBacktrackParseTableException e)
+ {
+ throw new Error(new NotBacktrackParseTableException
+ ("Regenerate C99Parserprs.java with -BACKTRACK option"));
+ }
+ catch (BadParseSymFileException e)
+ {
+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- C99Parsersym.java"));
+ }
+
+ try
+ {
+ return (Object) btParser.parse(error_repair_count);
+ }
+ catch (BadParseException e)
+ {
+ reset(e.error_token); // point to error token
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+ diagnoseParser.diagnose(e.error_token);
+ }
+
+ return null;
+ }
-private C99ParserAction action;
+private C99BuildASTParserAction action;
-//public C99Parser() { // constructor
-//}
+public C99Parser() { // constructor
+}
private void initActions(IASTTranslationUnit tu) {
- // binding resolution actions need access to IASTName nodes, temporary
- action = new C99ParserAction ();
- action.resolver = new C99TypedefTrackerParserAction (this);
- action.builder = new C99BuildASTParserAction ( C99ASTNodeFactory.DEFAULT_INSTANCE , this, tu);
- action.builder.setTokenMap( C99Parsersym .orderedTerminalSymbols);
- setParserAction(action);
+ action = new C99BuildASTParserAction ( C99ASTNodeFactory.DEFAULT_INSTANCE , this, tu);
+ action.setTokenMap( C99Parsersym .orderedTerminalSymbols);
}
public void addToken(IToken token) {
- token.setKind(mapKind(token.getKind()));
+ token.setKind(mapKind(token.getKind())); // TODO does mapKind need to be called?
super.addToken(token);
}
-public void setTokens(List<IToken> tokens) {
- resetTokenStream();
- for(IToken token : tokens) {
- addToken(token);
- }
-}
public IASTCompletionNode parse(IASTTranslationUnit tu) {
// this has to be done, or... kaboom!
@@ -166,2283 +192,1049 @@ public IASTCompletionNode parse(IASTTranslationUnit tu) {
super.resetTokenStream(); // allow tokens to be garbage collected
// the completion node may be null
- IASTCompletionNode compNode = action.builder.getASTCompletionNode();
+ IASTCompletionNode compNode = action.getASTCompletionNode();
- action = null;
- parserAction = null;
+ //action = null;
+ //parserAction = null;
return compNode;
}
-
-public int getKind(int i) {
- int kind = super.getKind(i);
- // lexer feedback hack!
- if(kind == C99Parsersym .TK_identifier && action.resolver.isTypedef(getTokenText(i))) {
- kind = C99Parsersym .TK_TypedefName;
- }
- return kind;
+// uncomment this method to use with backtracking parser
+public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
}
- //
- // Initialize ruleAction array.
- //
- static {
- RULE_ACTIONS = new Action[309 + 1];
- RULE_ACTIONS[0] = null;
-
- RULE_ACTIONS[1] = new Action1();
- RULE_ACTIONS[2] = new Action2();
- RULE_ACTIONS[3] = new Action3();
- RULE_ACTIONS[12] = new Action12();
- RULE_ACTIONS[13] = new Action13();
- RULE_ACTIONS[14] = new Action14();
- RULE_ACTIONS[15] = new Action15();
- RULE_ACTIONS[17] = new Action17();
- RULE_ACTIONS[18] = new Action18();
- RULE_ACTIONS[22] = new Action22();
- RULE_ACTIONS[23] = new Action23();
- RULE_ACTIONS[24] = new Action24();
- RULE_ACTIONS[25] = new Action25();
- RULE_ACTIONS[26] = new Action26();
- RULE_ACTIONS[27] = new Action27();
- RULE_ACTIONS[28] = new Action28();
- RULE_ACTIONS[35] = new Action35();
- RULE_ACTIONS[36] = new Action36();
- RULE_ACTIONS[37] = new Action37();
- RULE_ACTIONS[38] = new Action38();
- RULE_ACTIONS[39] = new Action39();
- RULE_ACTIONS[40] = new Action40();
- RULE_ACTIONS[41] = new Action41();
- RULE_ACTIONS[42] = new Action42();
- RULE_ACTIONS[43] = new Action43();
- RULE_ACTIONS[44] = new Action44();
- RULE_ACTIONS[46] = new Action46();
- RULE_ACTIONS[48] = new Action48();
- RULE_ACTIONS[49] = new Action49();
- RULE_ACTIONS[50] = new Action50();
- RULE_ACTIONS[52] = new Action52();
- RULE_ACTIONS[53] = new Action53();
- RULE_ACTIONS[55] = new Action55();
- RULE_ACTIONS[56] = new Action56();
- RULE_ACTIONS[58] = new Action58();
- RULE_ACTIONS[59] = new Action59();
- RULE_ACTIONS[60] = new Action60();
- RULE_ACTIONS[61] = new Action61();
- RULE_ACTIONS[63] = new Action63();
- RULE_ACTIONS[64] = new Action64();
- RULE_ACTIONS[66] = new Action66();
- RULE_ACTIONS[68] = new Action68();
- RULE_ACTIONS[70] = new Action70();
- RULE_ACTIONS[72] = new Action72();
- RULE_ACTIONS[74] = new Action74();
- RULE_ACTIONS[76] = new Action76();
- RULE_ACTIONS[78] = new Action78();
- RULE_ACTIONS[79] = new Action79();
- RULE_ACTIONS[80] = new Action80();
- RULE_ACTIONS[81] = new Action81();
- RULE_ACTIONS[82] = new Action82();
- RULE_ACTIONS[83] = new Action83();
- RULE_ACTIONS[84] = new Action84();
- RULE_ACTIONS[85] = new Action85();
- RULE_ACTIONS[86] = new Action86();
- RULE_ACTIONS[87] = new Action87();
- RULE_ACTIONS[88] = new Action88();
- RULE_ACTIONS[91] = new Action91();
- RULE_ACTIONS[93] = new Action93();
- RULE_ACTIONS[103] = new Action103();
- RULE_ACTIONS[104] = new Action104();
- RULE_ACTIONS[105] = new Action105();
- RULE_ACTIONS[106] = new Action106();
- RULE_ACTIONS[107] = new Action107();
- RULE_ACTIONS[108] = new Action108();
- RULE_ACTIONS[112] = new Action112();
- RULE_ACTIONS[113] = new Action113();
- RULE_ACTIONS[114] = new Action114();
- RULE_ACTIONS[115] = new Action115();
- RULE_ACTIONS[116] = new Action116();
- RULE_ACTIONS[117] = new Action117();
- RULE_ACTIONS[119] = new Action119();
- RULE_ACTIONS[120] = new Action120();
- RULE_ACTIONS[121] = new Action121();
- RULE_ACTIONS[122] = new Action122();
- RULE_ACTIONS[123] = new Action123();
- RULE_ACTIONS[124] = new Action124();
- RULE_ACTIONS[125] = new Action125();
- RULE_ACTIONS[126] = new Action126();
- RULE_ACTIONS[127] = new Action127();
- RULE_ACTIONS[128] = new Action128();
- RULE_ACTIONS[129] = new Action129();
- RULE_ACTIONS[130] = new Action130();
- RULE_ACTIONS[131] = new Action131();
- RULE_ACTIONS[132] = new Action132();
- RULE_ACTIONS[133] = new Action133();
- RULE_ACTIONS[134] = new Action134();
- RULE_ACTIONS[135] = new Action135();
- RULE_ACTIONS[160] = new Action160();
- RULE_ACTIONS[161] = new Action161();
- RULE_ACTIONS[162] = new Action162();
- RULE_ACTIONS[168] = new Action168();
- RULE_ACTIONS[181] = new Action181();
- RULE_ACTIONS[182] = new Action182();
- RULE_ACTIONS[186] = new Action186();
- RULE_ACTIONS[187] = new Action187();
- RULE_ACTIONS[188] = new Action188();
- RULE_ACTIONS[189] = new Action189();
- RULE_ACTIONS[190] = new Action190();
- RULE_ACTIONS[191] = new Action191();
- RULE_ACTIONS[192] = new Action192();
- RULE_ACTIONS[197] = new Action197();
- RULE_ACTIONS[198] = new Action198();
- RULE_ACTIONS[202] = new Action202();
- RULE_ACTIONS[204] = new Action204();
- RULE_ACTIONS[205] = new Action205();
- RULE_ACTIONS[206] = new Action206();
- RULE_ACTIONS[207] = new Action207();
- RULE_ACTIONS[212] = new Action212();
- RULE_ACTIONS[213] = new Action213();
- RULE_ACTIONS[214] = new Action214();
- RULE_ACTIONS[218] = new Action218();
- RULE_ACTIONS[220] = new Action220();
- RULE_ACTIONS[225] = new Action225();
- RULE_ACTIONS[226] = new Action226();
- RULE_ACTIONS[227] = new Action227();
- RULE_ACTIONS[228] = new Action228();
- RULE_ACTIONS[229] = new Action229();
- RULE_ACTIONS[230] = new Action230();
- RULE_ACTIONS[231] = new Action231();
- RULE_ACTIONS[232] = new Action232();
- RULE_ACTIONS[234] = new Action234();
- RULE_ACTIONS[235] = new Action235();
- RULE_ACTIONS[237] = new Action237();
- RULE_ACTIONS[238] = new Action238();
- RULE_ACTIONS[239] = new Action239();
- RULE_ACTIONS[240] = new Action240();
- RULE_ACTIONS[241] = new Action241();
- RULE_ACTIONS[242] = new Action242();
- RULE_ACTIONS[243] = new Action243();
- RULE_ACTIONS[244] = new Action244();
- RULE_ACTIONS[245] = new Action245();
- RULE_ACTIONS[246] = new Action246();
- RULE_ACTIONS[247] = new Action247();
- RULE_ACTIONS[248] = new Action248();
- RULE_ACTIONS[250] = new Action250();
- RULE_ACTIONS[251] = new Action251();
- RULE_ACTIONS[252] = new Action252();
- RULE_ACTIONS[253] = new Action253();
- RULE_ACTIONS[256] = new Action256();
- RULE_ACTIONS[257] = new Action257();
- RULE_ACTIONS[258] = new Action258();
- RULE_ACTIONS[261] = new Action261();
- RULE_ACTIONS[262] = new Action262();
- RULE_ACTIONS[263] = new Action263();
- RULE_ACTIONS[264] = new Action264();
- RULE_ACTIONS[265] = new Action265();
- RULE_ACTIONS[266] = new Action266();
- RULE_ACTIONS[268] = new Action268();
- RULE_ACTIONS[269] = new Action269();
- RULE_ACTIONS[273] = new Action273();
- RULE_ACTIONS[274] = new Action274();
- RULE_ACTIONS[275] = new Action275();
- RULE_ACTIONS[276] = new Action276();
- RULE_ACTIONS[277] = new Action277();
- RULE_ACTIONS[278] = new Action278();
- RULE_ACTIONS[279] = new Action279();
- RULE_ACTIONS[280] = new Action280();
- RULE_ACTIONS[281] = new Action281();
- RULE_ACTIONS[282] = new Action282();
- RULE_ACTIONS[287] = new Action287();
- RULE_ACTIONS[291] = new Action291();
- RULE_ACTIONS[292] = new Action292();
- RULE_ACTIONS[293] = new Action293();
- RULE_ACTIONS[294] = new Action294();
- RULE_ACTIONS[295] = new Action295();
- RULE_ACTIONS[296] = new Action296();
- RULE_ACTIONS[301] = new Action301();
- RULE_ACTIONS[302] = new Action302();
- RULE_ACTIONS[305] = new Action305();
- RULE_ACTIONS[306] = new Action306();
- RULE_ACTIONS[307] = new Action307();
- RULE_ACTIONS[308] = new Action308();
- RULE_ACTIONS[309] = new Action309();
-
-
- //
- // Make sure that all elements of ruleAction are properly initialized
- //
- for (int i = 0; i < RULE_ACTIONS.length; i++) {
- if (RULE_ACTIONS[i] == null) {
- RULE_ACTIONS[i] = emptyAction();
- }
- }
- }
-
- //
- // Rule 1: <openscope-ast> ::= $Empty
- //
- static final class Action1 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- openASTScope(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 2: <openscope-symbol> ::= $Empty
- //
- static final class Action2 extends DeclaredAction< C99ParserAction , Object > {
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- openSymbolScope();
- return hasUndo;
- }
-
- public Action2() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
- }
-
- //
- // Rule 3: <openscope-declaration> ::= $Empty
- //
- static final class Action3 extends DeclaredAction< C99ParserAction , Object > {
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- openDeclarationScope();
- return hasUndo;
- }
-
- public Action3() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
- }
-
- //
- // Rule 12: literal ::= integer
- //
- static final class Action12 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 13: literal ::= floating
- //
- static final class Action13 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 14: literal ::= charconst
- //
- static final class Action14 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 15: literal ::= stringlit
- //
- static final class Action15 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 17: primary_expression ::= primary_expression_id
- //
- static final class Action17 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionID(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 18: primary_expression ::= ( expression )
- //
- static final class Action18 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBracketed(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 22: postfix_expression ::= postfix_expression [ expression ]
- //
- static final class Action22 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionArraySubscript(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 23: postfix_expression ::= postfix_expression ( expression_list_opt )
- //
- static final class Action23 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionFunctionCall(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 24: postfix_expression ::= postfix_expression . member_name
- //
- static final class Action24 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionFieldReference(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 25: postfix_expression ::= postfix_expression -> member_name
- //
- static final class Action25 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionFieldReference(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 26: postfix_expression ::= postfix_expression ++
- //
- static final class Action26 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 27: postfix_expression ::= postfix_expression --
- //
- static final class Action27 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 28: postfix_expression ::= ( type_name ) { <openscope-ast> initializer_list comma_opt }
- //
- static final class Action28 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionTypeIdInitializer(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 35: unary_expression ::= ++ unary_expression
- //
- static final class Action35 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 36: unary_expression ::= -- unary_expression
- //
- static final class Action36 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 37: unary_expression ::= & cast_expression
- //
- static final class Action37 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 38: unary_expression ::= * cast_expression
- //
- static final class Action38 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 39: unary_expression ::= + cast_expression
- //
- static final class Action39 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 40: unary_expression ::= - cast_expression
- //
- static final class Action40 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 41: unary_expression ::= ~ cast_expression
- //
- static final class Action41 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 42: unary_expression ::= ! cast_expression
- //
- static final class Action42 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 43: unary_expression ::= sizeof unary_expression
- //
- static final class Action43 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 44: unary_expression ::= sizeof ( type_name )
- //
- static final class Action44 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionTypeId(IASTTypeIdExpression.op_sizeof); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 46: cast_expression ::= ( type_name ) cast_expression
- //
- static final class Action46 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionCast(IASTCastExpression.op_cast); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 48: multiplicative_expression ::= multiplicative_expression * cast_expression
- //
- static final class Action48 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 49: multiplicative_expression ::= multiplicative_expression / cast_expression
- //
- static final class Action49 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 50: multiplicative_expression ::= multiplicative_expression % cast_expression
- //
- static final class Action50 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 52: additive_expression ::= additive_expression + multiplicative_expression
- //
- static final class Action52 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 53: additive_expression ::= additive_expression - multiplicative_expression
- //
- static final class Action53 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 55: shift_expression ::= shift_expression << additive_expression
- //
- static final class Action55 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 56: shift_expression ::= shift_expression >> additive_expression
- //
- static final class Action56 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 58: relational_expression ::= relational_expression < shift_expression
- //
- static final class Action58 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 59: relational_expression ::= relational_expression > shift_expression
- //
- static final class Action59 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 60: relational_expression ::= relational_expression <= shift_expression
- //
- static final class Action60 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 61: relational_expression ::= relational_expression >= shift_expression
- //
- static final class Action61 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 63: equality_expression ::= equality_expression == relational_expression
- //
- static final class Action63 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 64: equality_expression ::= equality_expression != relational_expression
- //
- static final class Action64 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 66: AND_expression ::= AND_expression & equality_expression
- //
- static final class Action66 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 68: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
- //
- static final class Action68 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 70: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
- //
- static final class Action70 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 72: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
- //
- static final class Action72 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 74: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
- //
- static final class Action74 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 76: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
- //
- static final class Action76 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionConditional(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 78: assignment_expression ::= unary_expression = assignment_expression
- //
- static final class Action78 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 79: assignment_expression ::= unary_expression *= assignment_expression
- //
- static final class Action79 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 80: assignment_expression ::= unary_expression /= assignment_expression
- //
- static final class Action80 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 81: assignment_expression ::= unary_expression %= assignment_expression
- //
- static final class Action81 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 82: assignment_expression ::= unary_expression += assignment_expression
- //
- static final class Action82 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 83: assignment_expression ::= unary_expression -= assignment_expression
- //
- static final class Action83 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 84: assignment_expression ::= unary_expression <<= assignment_expression
- //
- static final class Action84 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 85: assignment_expression ::= unary_expression >>= assignment_expression
- //
- static final class Action85 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 86: assignment_expression ::= unary_expression &= assignment_expression
- //
- static final class Action86 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 87: assignment_expression ::= unary_expression ^= assignment_expression
- //
- static final class Action87 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 88: assignment_expression ::= unary_expression |= assignment_expression
- //
- static final class Action88 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 91: expression_list ::= <openscope-ast> expression_list_actual
- //
- static final class Action91 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeExpressionList(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 93: expression_list_opt ::= $Empty
- //
- static final class Action93 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeEmpty(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 103: statement ::= ERROR_TOKEN
- //
- static final class Action103 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementProblem(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 104: labeled_statement ::= identifier_or_typedefname : statement
- //
- static final class Action104 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementLabeled(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 105: labeled_statement ::= case constant_expression :
- //
- static final class Action105 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementCase(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 106: labeled_statement ::= default :
- //
- static final class Action106 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementDefault(); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 107: compound_statement ::= <openscope-symbol> { }
- //
- static final class Action107 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeSymbolScope();
- return hasUndo;
- }
-
- public Action107() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementCompoundStatement(false); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 108: compound_statement ::= <openscope-symbol> { <openscope-ast> block_item_list }
- //
- static final class Action108 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeSymbolScope();
- return hasUndo;
- }
-
- public Action108() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementCompoundStatement(true); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 112: block_item ::= declaration
- //
- static final class Action112 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementDeclaration(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 113: expression_statement ::= ;
- //
- static final class Action113 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementNull(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 114: expression_statement ::= expression_in_statement ;
- //
- static final class Action114 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementExpression(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 115: selection_statement ::= if ( expression ) statement
- //
- static final class Action115 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementIf(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 116: selection_statement ::= if ( expression ) statement else statement
- //
- static final class Action116 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementIf(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 117: selection_statement ::= switch ( expression ) statement
- //
- static final class Action117 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementSwitch(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 119: expression_opt ::= $Empty
- //
- static final class Action119 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeEmpty(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 120: iteration_statement ::= do statement while ( expression ) ;
- //
- static final class Action120 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementDoLoop(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 121: iteration_statement ::= while ( expression ) statement
- //
- static final class Action121 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementWhileLoop(); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 122: iteration_statement ::= <openscope-symbol> for ( expression_opt ; expression_opt ; expression_opt ) statement
- //
- static final class Action122 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeSymbolScope();
- return hasUndo;
- }
-
- public Action122() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementForLoop(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 123: iteration_statement ::= <openscope-symbol> for ( declaration expression_opt ; expression_opt ) statement
- //
- static final class Action123 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeSymbolScope();
- return hasUndo;
- }
-
- public Action123() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementForLoop(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 124: jump_statement ::= goto identifier_or_typedefname ;
- //
- static final class Action124 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementGoto(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 125: jump_statement ::= continue ;
- //
- static final class Action125 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementContinue(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 126: jump_statement ::= break ;
- //
- static final class Action126 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementBreak(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 127: jump_statement ::= return ;
- //
- static final class Action127 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementReturn(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 128: jump_statement ::= return expression ;
- //
- static final class Action128 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementReturn(true); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 129: declaration ::= declaration_specifiers ;
- //
- static final class Action129 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeDeclarationScope();
- return hasUndo;
- }
-
- public Action129() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSimple(false); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 130: declaration ::= declaration_specifiers <openscope-ast> init_declarator_list ;
- //
- static final class Action130 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeDeclarationScope();
- return hasUndo;
- }
-
- public Action130() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSimple(true); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 131: declaration_specifiers ::= <openscope-declaration> <openscope-ast> simple_declaration_specifiers
- //
- static final class Action131 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSpecifiersSimple(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 132: declaration_specifiers ::= <openscope-declaration> <openscope-ast> struct_or_union_declaration_specifiers
- //
- static final class Action132 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSpecifiersStructUnionEnum(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 133: declaration_specifiers ::= <openscope-declaration> <openscope-ast> elaborated_declaration_specifiers
- //
- static final class Action133 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSpecifiersStructUnionEnum(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 134: declaration_specifiers ::= <openscope-declaration> <openscope-ast> enum_declaration_specifiers
- //
- static final class Action134 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSpecifiersStructUnionEnum(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 135: declaration_specifiers ::= <openscope-declaration> <openscope-ast> typdef_name_declaration_specifiers
- //
- static final class Action135 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationSpecifiersTypedefName(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 160: init_declarator ::= complete_declarator = initializer
- //
- static final class Action160 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithInitializer(true); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 161: complete_declarator ::= declarator
- //
- static final class Action161 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclaratorComplete();
- return hasUndo;
- }
-
- public Action161() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- }
-
-
- //
- // Rule 162: storage_class_specifier ::= storage_class_specifier_token
- //
- static final class Action162 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action162() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 168: simple_type_specifier ::= simple_type_specifier_token
- //
- static final class Action168 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action168() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 181: typedef_name_in_declspec ::= TypedefName
- //
- static final class Action181 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action181() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 182: typedef_name_in_declspec ::= Completion
- //
- static final class Action182 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action182() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 186: struct_or_union_specifier ::= struct { <openscope-ast> struct_declaration_list_opt }
- //
- static final class Action186 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 187: struct_or_union_specifier ::= union { <openscope-ast> struct_declaration_list_opt }
- //
- static final class Action187 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 188: struct_or_union_specifier ::= struct identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
- //
- static final class Action188 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 189: struct_or_union_specifier ::= union identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
- //
- static final class Action189 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 190: elaborated_specifier ::= struct identifier_or_typedefname
- //
- static final class Action190 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 191: elaborated_specifier ::= union identifier_or_typedefname
- //
- static final class Action191 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 192: elaborated_specifier ::= enum identifier_or_typedefname
- //
- static final class Action192 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 197: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
- //
- static final class Action197 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeDeclarationScope();
- return hasUndo;
- }
-
- public Action197() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStructDeclaration(true); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 198: struct_declaration ::= specifier_qualifier_list ;
- //
- static final class Action198 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeDeclarationScope();
- return hasUndo;
- }
-
- public Action198() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStructDeclaration(false); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 202: complete_struct_declarator ::= struct_declarator
- //
- static final class Action202 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclaratorCompleteField();
- return hasUndo;
- }
-
- public Action202() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- }
-
- //
- // Rule 204: struct_declarator ::= : constant_expression
- //
- static final class Action204 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeBitField(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 205: struct_declarator ::= declarator : constant_expression
- //
- static final class Action205 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeBitField(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 206: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
- //
- static final class Action206 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierEnumeration(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 207: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
- //
- static final class Action207 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeSpecifierEnumeration(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 212: enumerator ::= identifier_or_typedefname
- //
- static final class Action212 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeEnumerator(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 213: enumerator ::= identifier_or_typedefname = constant_expression
- //
- static final class Action213 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeEnumerator(true); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 214: type_qualifier ::= type_qualifier_token
- //
- static final class Action214 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action214() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 218: function_specifier ::= inline
- //
- static final class Action218 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclSpecToken();
- return hasUndo;
- }
-
- public Action218() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclSpecToken(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 220: declarator ::= <openscope-ast> pointer_seq direct_declarator
- //
- static final class Action220 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithPointer(true); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 225: basic_direct_declarator ::= declarator_id_name
- //
- static final class Action225 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDirectDeclaratorIdentifier();
- return hasUndo;
- }
-
- public Action225() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorIdentifier(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 226: basic_direct_declarator ::= ( declarator )
- //
- static final class Action226 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorBracketed(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 227: declarator_id_name ::= identifier
- //
- static final class Action227 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeIdentifierName(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 228: array_direct_declarator ::= basic_direct_declarator array_modifier
- //
- static final class Action228 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayDeclarator(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 229: array_direct_declarator ::= array_direct_declarator array_modifier
- //
- static final class Action229 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayDeclarator(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 230: function_prototype_direct_declarator ::= function_direct_declarator
- //
- static final class Action230 extends DeclaredAction< C99ParserAction , Object > {
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- closeSymbolScope();
- return hasUndo;
- }
-
- public Action230() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
- }
-
- //
- // Rule 231: function_direct_declarator ::= basic_direct_declarator ( <openscope-symbol> <openscope-ast> parameter_type_list )
- //
- static final class Action231 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(true, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 232: function_direct_declarator ::= basic_direct_declarator ( <openscope-symbol> )
- //
- static final class Action232 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(true, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 234: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
- //
- static final class Action234 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithPointer(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 235: knr_direct_declarator ::= basic_direct_declarator ( <openscope-symbol> <openscope-ast> identifier_list )
- //
- static final class Action235 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclaratorKnR(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 237: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
- //
- static final class Action237 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithPointer(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 238: identifier_list ::= identifier
- //
- static final class Action238 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeIdentifierKnR(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 239: identifier_list ::= identifier_list , identifier
- //
- static final class Action239 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeIdentifierKnR(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 240: array_modifier ::= [ ]
- //
- static final class Action240 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayModifier(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
- //
- static final class Action241 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 242: array_modifier ::= [ assignment_expression ]
- //
- static final class Action242 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayModifier(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
- //
- static final class Action243 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 244: array_modifier ::= [ static assignment_expression ]
- //
- static final class Action244 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 245: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
- //
- static final class Action245 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
- //
- static final class Action246 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 247: array_modifier ::= [ * ]
- //
- static final class Action247 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 248: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
- //
- static final class Action248 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 250: pointer_seq ::= *
- //
- static final class Action250 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePointer(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 251: pointer_seq ::= pointer_seq *
- //
- static final class Action251 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePointer(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 252: pointer_seq ::= * <openscope-ast> type_qualifier_list
- //
- static final class Action252 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePointerTypeQualifierList(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 253: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
- //
- static final class Action253 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePointerTypeQualifierList(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 256: parameter_type_list ::= parameter_list
- //
- static final class Action256 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeEmpty(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 257: parameter_type_list ::= parameter_list , ...
- //
- static final class Action257 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePlaceHolder(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 258: parameter_type_list ::= ...
- //
- static final class Action258 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumePlaceHolder(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 261: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
- //
- static final class Action261 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeParameterDeclaration(); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 262: parameter_declaration ::= declaration_specifiers
- //
- static final class Action262 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeParameterDeclarationWithoutDeclarator();
- return hasUndo;
- }
-
- public Action262() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeParameterDeclarationWithoutDeclarator(); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 263: complete_parameter_declarator ::= declarator
- //
- static final class Action263 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclaratorCompleteParameter();
- return hasUndo;
- }
-
- public Action263() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- }
-
-
- //
- // Rule 264: complete_parameter_declarator ::= abstract_declarator
- //
- static final class Action264 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeDeclaratorCompleteParameter();
- return hasUndo;
- }
-
- public Action264() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- }
-
-
- //
- // Rule 265: type_name ::= specifier_qualifier_list
- //
- static final class Action265 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeTypeId();
- return hasUndo;
- }
-
- public Action265() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeId(false); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 266: type_name ::= specifier_qualifier_list abstract_declarator
- //
- static final class Action266 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeTypeId();
- return hasUndo;
- }
-
- public Action266() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
-
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTypeId(true); /* action.builder.getASTStack().print();*/
- }
-
- }
-
- //
- // Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq
- //
- static final class Action268 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithPointer(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
- //
- static final class Action269 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclaratorWithPointer(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 273: basic_direct_abstract_declarator ::= ( abstract_declarator )
- //
- static final class Action273 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorBracketed(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 274: array_direct_abstract_declarator ::= array_modifier
- //
- static final class Action274 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayDeclarator(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 275: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
- //
- static final class Action275 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayDeclarator(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 276: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
- //
- static final class Action276 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorArrayDeclarator(true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 277: function_direct_abstract_declarator ::= ( )
- //
- static final class Action277 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(false, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 278: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
- //
- static final class Action278 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(true, false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 279: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
- //
- static final class Action279 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(false, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 280: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
- //
- static final class Action280 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDirectDeclaratorFunctionDeclarator(true, true); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 281: initializer ::= assignment_expression
- //
- static final class Action281 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeInitializer(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 282: initializer ::= { <openscope-ast> initializer_list comma_opt }
- //
- static final class Action282 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeInitializerList(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 287: designated_initializer ::= <openscope-ast> designation = initializer
- //
- static final class Action287 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeInitializerDesignated(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 291: designator_base ::= [ constant_expression ]
- //
- static final class Action291 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDesignatorArray(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 292: designator_base ::= . identifier_or_typedefname
- //
- static final class Action292 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDesignatorField(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 293: designator ::= [ constant_expression ]
- //
- static final class Action293 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDesignatorArray(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 294: designator ::= . identifier_or_typedefname
- //
- static final class Action294 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDesignatorField(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 295: translation_unit ::= external_declaration_list
- //
- static final class Action295 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTranslationUnit(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 296: translation_unit ::= $Empty
- //
- static final class Action296 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeTranslationUnit(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 301: external_declaration ::= ;
- //
- static final class Action301 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationEmpty(); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 302: external_declaration ::= ERROR_TOKEN
- //
- static final class Action302 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeDeclarationProblem(); /* action.builder.getASTStack().print();*/
- }
- }
-
-
- //
- // Rule 305: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
- //
- static final class Action305 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeFunctionDefinition();
- return hasUndo;
- }
-
- public Action305() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
+private ITokenMap tokenMap = null;
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeFunctionDefinition(true); /* action.builder.getASTStack().print();*/
- }
-
+public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ addToken(new Token(null, 0, 0, 0)); // dummy token
+ for(IToken token : tokens) {
+ token.setKind(tokenMap.mapKind(token.getKind()));
+ addToken(token);
}
-
-
- //
- // Rule 306: function_definition ::= <openscope-declaration> <openscope-ast> function_declarator function_body
- //
- static final class Action306 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeFunctionDefinition();
- return hasUndo;
- }
-
- public Action306() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
+ addToken(new Token(null, 0, 0, C99Parsersym .TK_EOF_TOKEN));
+}
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeFunctionDefinition(false); /* action.builder.getASTStack().print();*/
- }
-
- }
-
-
- //
- // Rule 307: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
- //
- static final class Action307 extends DeclaredAction< C99ParserAction , Object > {
-
-
- public boolean doTrial(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.
- consumeFunctionDefinition();
- return hasUndo;
- }
-
- public Action307() { hasUndo = true; };
- public void doUndo(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.resolver.undo();
- }
+public C99Parser(String[] mapFrom) { // constructor
+ tokenMap = new TokenMap( C99Parsersym .orderedTerminalSymbols, mapFrom);
+}
+
+
+ public void ruleAction(int ruleNumber)
+ {
+ switch (ruleNumber)
+ {
+
+ //
+ // Rule 1: <openscope-ast> ::= $Empty
+ //
+ case 1: { action. openASTScope(); break;
+ }
+
+ //
+ // Rule 10: literal ::= integer
+ //
+ case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
+ }
+
+ //
+ // Rule 11: literal ::= floating
+ //
+ case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
+ }
+
+ //
+ // Rule 12: literal ::= charconst
+ //
+ case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
+ }
+
+ //
+ // Rule 13: literal ::= stringlit
+ //
+ case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
+ }
+
+ //
+ // Rule 15: primary_expression ::= primary_expression_id
+ //
+ case 15: { action. consumeExpressionID(); break;
+ }
+
+ //
+ // Rule 16: primary_expression ::= ( expression )
+ //
+ case 16: { action. consumeExpressionBracketed(); break;
+ }
+
+ //
+ // Rule 20: postfix_expression ::= postfix_expression [ expression ]
+ //
+ case 20: { action. consumeExpressionArraySubscript(); break;
+ }
+
+ //
+ // Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
+ //
+ case 21: { action. consumeExpressionFunctionCall(); break;
+ }
+
+ //
+ // Rule 22: postfix_expression ::= postfix_expression . member_name
+ //
+ case 22: { action. consumeExpressionFieldReference(false); break;
+ }
+
+ //
+ // Rule 23: postfix_expression ::= postfix_expression -> member_name
+ //
+ case 23: { action. consumeExpressionFieldReference(true); break;
+ }
+
+ //
+ // Rule 24: postfix_expression ::= postfix_expression ++
+ //
+ case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
+ }
+
+ //
+ // Rule 25: postfix_expression ::= postfix_expression --
+ //
+ case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
+ }
+
+ //
+ // Rule 26: postfix_expression ::= ( type_name ) { <openscope-ast> initializer_list comma_opt }
+ //
+ case 26: { action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 32: unary_expression ::= ++ unary_expression
+ //
+ case 32: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break;
+ }
+
+ //
+ // Rule 33: unary_expression ::= -- unary_expression
+ //
+ case 33: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break;
+ }
+
+ //
+ // Rule 34: unary_expression ::= & cast_expression
+ //
+ case 34: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break;
+ }
+
+ //
+ // Rule 35: unary_expression ::= * cast_expression
+ //
+ case 35: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break;
+ }
+
+ //
+ // Rule 36: unary_expression ::= + cast_expression
+ //
+ case 36: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 37: unary_expression ::= - cast_expression
+ //
+ case 37: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 38: unary_expression ::= ~ cast_expression
+ //
+ case 38: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break;
+ }
+
+ //
+ // Rule 39: unary_expression ::= ! cast_expression
+ //
+ case 39: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break;
+ }
+
+ //
+ // Rule 40: unary_expression ::= sizeof unary_expression
+ //
+ case 40: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break;
+ }
+
+ //
+ // Rule 41: unary_expression ::= sizeof ( type_name )
+ //
+ case 41: { action. consumeExpressionSizeofTypeId(); break;
+ }
+
+ //
+ // Rule 43: cast_expression ::= ( type_name ) cast_expression
+ //
+ case 43: { action. consumeExpressionCast(IASTCastExpression.op_cast); break;
+ }
+
+ //
+ // Rule 45: multiplicative_expression ::= multiplicative_expression * cast_expression
+ //
+ case 45: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); break;
+ }
+
+ //
+ // Rule 46: multiplicative_expression ::= multiplicative_expression / cast_expression
+ //
+ case 46: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); break;
+ }
+
+ //
+ // Rule 47: multiplicative_expression ::= multiplicative_expression % cast_expression
+ //
+ case 47: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); break;
+ }
+
+ //
+ // Rule 49: additive_expression ::= additive_expression + multiplicative_expression
+ //
+ case 49: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 50: additive_expression ::= additive_expression - multiplicative_expression
+ //
+ case 50: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 52: shift_expression ::= shift_expression << additive_expression
+ //
+ case 52: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); break;
+ }
+
+ //
+ // Rule 53: shift_expression ::= shift_expression >> additive_expression
+ //
+ case 53: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); break;
+ }
+
+ //
+ // Rule 55: relational_expression ::= relational_expression < shift_expression
+ //
+ case 55: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); break;
+ }
+
+ //
+ // Rule 56: relational_expression ::= relational_expression > shift_expression
+ //
+ case 56: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); break;
+ }
+
+ //
+ // Rule 57: relational_expression ::= relational_expression <= shift_expression
+ //
+ case 57: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); break;
+ }
+
+ //
+ // Rule 58: relational_expression ::= relational_expression >= shift_expression
+ //
+ case 58: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); break;
+ }
+
+ //
+ // Rule 60: equality_expression ::= equality_expression == relational_expression
+ //
+ case 60: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); break;
+ }
+
+ //
+ // Rule 61: equality_expression ::= equality_expression != relational_expression
+ //
+ case 61: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); break;
+ }
+
+ //
+ // Rule 63: AND_expression ::= AND_expression & equality_expression
+ //
+ case 63: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); break;
+ }
+
+ //
+ // Rule 65: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
+ //
+ case 65: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); break;
+ }
+
+ //
+ // Rule 67: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
+ //
+ case 67: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); break;
+ }
+
+ //
+ // Rule 69: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
+ //
+ case 69: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); break;
+ }
+
+ //
+ // Rule 71: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
+ //
+ case 71: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); break;
+ }
+
+ //
+ // Rule 73: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
+ //
+ case 73: { action. consumeExpressionConditional(); break;
+ }
+
+ //
+ // Rule 75: assignment_expression ::= unary_expression = assignment_expression
+ //
+ case 75: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
+ }
+
+ //
+ // Rule 76: assignment_expression ::= unary_expression *= assignment_expression
+ //
+ case 76: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); break;
+ }
+
+ //
+ // Rule 77: assignment_expression ::= unary_expression /= assignment_expression
+ //
+ case 77: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); break;
+ }
+
+ //
+ // Rule 78: assignment_expression ::= unary_expression %= assignment_expression
+ //
+ case 78: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); break;
+ }
+
+ //
+ // Rule 79: assignment_expression ::= unary_expression += assignment_expression
+ //
+ case 79: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); break;
+ }
+
+ //
+ // Rule 80: assignment_expression ::= unary_expression -= assignment_expression
+ //
+ case 80: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); break;
+ }
+
+ //
+ // Rule 81: assignment_expression ::= unary_expression <<= assignment_expression
+ //
+ case 81: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); break;
+ }
+
+ //
+ // Rule 82: assignment_expression ::= unary_expression >>= assignment_expression
+ //
+ case 82: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); break;
+ }
+
+ //
+ // Rule 83: assignment_expression ::= unary_expression &= assignment_expression
+ //
+ case 83: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); break;
+ }
+
+ //
+ // Rule 84: assignment_expression ::= unary_expression ^= assignment_expression
+ //
+ case 84: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); break;
+ }
+
+ //
+ // Rule 85: assignment_expression ::= unary_expression |= assignment_expression
+ //
+ case 85: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); break;
+ }
+
+ //
+ // Rule 88: expression_list ::= <openscope-ast> expression_list_actual
+ //
+ case 88: { action. consumeExpressionList(); break;
+ }
+
+ //
+ // Rule 90: expression_list_opt ::= $Empty
+ //
+ case 90: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 100: statement ::= ERROR_TOKEN
+ //
+ case 100: { action. consumeStatementProblem(); break;
+ }
+
+ //
+ // Rule 101: labeled_statement ::= identifier_or_typedefname : statement
+ //
+ case 101: { action. consumeStatementLabeled(); break;
+ }
+
+ //
+ // Rule 102: labeled_statement ::= case constant_expression :
+ //
+ case 102: { action. consumeStatementCase(); break;
+ }
+
+ //
+ // Rule 103: labeled_statement ::= default :
+ //
+ case 103: { action. consumeStatementDefault(); break;
+ }
+
+ //
+ // Rule 104: compound_statement ::= { }
+ //
+ case 104: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 105: compound_statement ::= { <openscope-ast> block_item_list }
+ //
+ case 105: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 109: block_item ::= declaration
+ //
+ case 109: { action. consumeStatementDeclaration(); break;
+ }
+
+ //
+ // Rule 110: expression_statement ::= ;
+ //
+ case 110: { action. consumeStatementNull(); break;
+ }
+
+ //
+ // Rule 111: expression_statement ::= expression_in_statement ;
+ //
+ case 111: { action. consumeStatementExpression(); break;
+ }
+
+ //
+ // Rule 112: selection_statement ::= if ( expression ) statement
+ //
+ case 112: { action. consumeStatementIf(false); break;
+ }
+
+ //
+ // Rule 113: selection_statement ::= if ( expression ) statement else statement
+ //
+ case 113: { action. consumeStatementIf(true); break;
+ }
+
+ //
+ // Rule 114: selection_statement ::= switch ( expression ) statement
+ //
+ case 114: { action. consumeStatementSwitch(); break;
+ }
+
+ //
+ // Rule 116: expression_opt ::= $Empty
+ //
+ case 116: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 117: iteration_statement ::= do statement while ( expression ) ;
+ //
+ case 117: { action. consumeStatementDoLoop(); break;
+ }
+
+ //
+ // Rule 118: iteration_statement ::= while ( expression ) statement
+ //
+ case 118: { action. consumeStatementWhileLoop(); break;
+ }
+
+ //
+ // Rule 119: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement
+ //
+ case 119: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 120: iteration_statement ::= for ( declaration expression_opt ; expression_opt ) statement
+ //
+ case 120: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 121: jump_statement ::= goto identifier_or_typedefname ;
+ //
+ case 121: { action. consumeStatementGoto(); break;
+ }
+
+ //
+ // Rule 122: jump_statement ::= continue ;
+ //
+ case 122: { action. consumeStatementContinue(); break;
+ }
+
+ //
+ // Rule 123: jump_statement ::= break ;
+ //
+ case 123: { action. consumeStatementBreak(); break;
+ }
+
+ //
+ // Rule 124: jump_statement ::= return ;
+ //
+ case 124: { action. consumeStatementReturn(false); break;
+ }
+
+ //
+ // Rule 125: jump_statement ::= return expression ;
+ //
+ case 125: { action. consumeStatementReturn(true); break;
+ }
+
+ //
+ // Rule 126: declaration ::= declaration_specifiers ;
+ //
+ case 126: { action. consumeDeclarationSimple(false); break;
+ }
+
+ //
+ // Rule 127: declaration ::= declaration_specifiers <openscope-ast> init_declarator_list ;
+ //
+ case 127: { action. consumeDeclarationSimple(true); break;
+ }
+
+ //
+ // Rule 128: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers
+ //
+ case 128: { action. consumeDeclarationSpecifiersSimple(); break;
+ }
+
+ //
+ // Rule 129: declaration_specifiers ::= <openscope-ast> struct_or_union_declaration_specifiers
+ //
+ case 129: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 130: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers
+ //
+ case 130: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 131: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers
+ //
+ case 131: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 132: declaration_specifiers ::= <openscope-ast> typdef_name_declaration_specifiers
+ //
+ case 132: { action. consumeDeclarationSpecifiersTypedefName(); break;
+ }
+
+ //
+ // Rule 157: init_declarator ::= complete_declarator = initializer
+ //
+ case 157: { action. consumeDeclaratorWithInitializer(true); break;
+ }
+
+ //
+ // Rule 159: storage_class_specifier ::= storage_class_specifier_token
+ //
+ case 159: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 165: simple_type_specifier ::= simple_type_specifier_token
+ //
+ case 165: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 178: typedef_name_in_declspec ::= Completion
+ //
+ case 178: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 179: typedef_name_in_declspec ::= identifier
+ //
+ case 179: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 182: struct_or_union_specifier ::= struct { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 182: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 183: struct_or_union_specifier ::= union { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 183: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 184: struct_or_union_specifier ::= struct identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 184: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 185: struct_or_union_specifier ::= union identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 185: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 186: elaborated_specifier ::= struct identifier_or_typedefname
+ //
+ case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 187: elaborated_specifier ::= union identifier_or_typedefname
+ //
+ case 187: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 188: elaborated_specifier ::= enum identifier_or_typedefname
+ //
+ case 188: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
+ }
+
+ //
+ // Rule 193: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
+ //
+ case 193: { action. consumeStructDeclaration(true); break;
+ }
+
+ //
+ // Rule 194: struct_declaration ::= specifier_qualifier_list ;
+ //
+ case 194: { action. consumeStructDeclaration(false); break;
+ }
+
+ //
+ // Rule 200: struct_declarator ::= : constant_expression
+ //
+ case 200: { action. consumeBitField(false); break;
+ }
+
+ //
+ // Rule 201: struct_declarator ::= declarator : constant_expression
+ //
+ case 201: { action. consumeBitField(true); break;
+ }
+
+ //
+ // Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 202: { action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 203: { action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 208: enumerator ::= identifier_or_typedefname
+ //
+ case 208: { action. consumeEnumerator(false); break;
+ }
+
+ //
+ // Rule 209: enumerator ::= identifier_or_typedefname = constant_expression
+ //
+ case 209: { action. consumeEnumerator(true); break;
+ }
+
+ //
+ // Rule 210: type_qualifier ::= type_qualifier_token
+ //
+ case 210: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 214: function_specifier ::= inline
+ //
+ case 214: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator
+ //
+ case 216: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 221: basic_direct_declarator ::= declarator_id_name
+ //
+ case 221: { action. consumeDirectDeclaratorIdentifier(); break;
+ }
+
+ //
+ // Rule 222: basic_direct_declarator ::= ( declarator )
+ //
+ case 222: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 223: declarator_id_name ::= identifier
+ //
+ case 223: { action. consumeIdentifierName(); break;
+ }
+
+ //
+ // Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier
+ //
+ case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier
+ //
+ case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 228: function_direct_declarator ::= basic_direct_declarator ( )
+ //
+ case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
+ //
+ case 230: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
+ //
+ case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
+ }
+
+ //
+ // Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
+ //
+ case 233: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 234: identifier_list ::= identifier
+ //
+ case 234: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 235: identifier_list ::= identifier_list , identifier
+ //
+ case 235: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 236: array_modifier ::= [ ]
+ //
+ case 236: { action. consumeDirectDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
+ //
+ case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
+ }
+
+ //
+ // Rule 238: array_modifier ::= [ assignment_expression ]
+ //
+ case 238: { action. consumeDirectDeclaratorArrayModifier(true); break;
+ }
+
+ //
+ // Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
+ }
+
+ //
+ // Rule 240: array_modifier ::= [ static assignment_expression ]
+ //
+ case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
+ }
+
+ //
+ // Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
+ //
+ case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 243: array_modifier ::= [ * ]
+ //
+ case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
+ }
+
+ //
+ // Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
+ //
+ case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
+ }
+
+ //
+ // Rule 246: pointer_seq ::= *
+ //
+ case 246: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 247: pointer_seq ::= pointer_seq *
+ //
+ case 247: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list
+ //
+ case 248: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
+ //
+ case 249: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 252: parameter_type_list ::= parameter_list
+ //
+ case 252: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 253: parameter_type_list ::= parameter_list , ...
+ //
+ case 253: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 254: parameter_type_list ::= ...
+ //
+ case 254: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
+ //
+ case 257: { action. consumeParameterDeclaration(); break;
+ }
+
+ //
+ // Rule 258: parameter_declaration ::= declaration_specifiers
+ //
+ case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break;
+ }
+
+ //
+ // Rule 261: type_name ::= specifier_qualifier_list
+ //
+ case 261: { action. consumeTypeId(false); break;
+ }
+
+ //
+ // Rule 262: type_name ::= specifier_qualifier_list abstract_declarator
+ //
+ case 262: { action. consumeTypeId(true); break;
+ }
+
+ //
+ // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq
+ //
+ case 264: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
+ //
+ case 265: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator )
+ //
+ case 269: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 270: array_direct_abstract_declarator ::= array_modifier
+ //
+ case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
+ }
+
+ //
+ // Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
+ //
+ case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
+ //
+ case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 273: function_direct_abstract_declarator ::= ( )
+ //
+ case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
+ }
+
+ //
+ // Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
+ //
+ case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
+ //
+ case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
+ }
+
+ //
+ // Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 277: initializer ::= assignment_expression
+ //
+ case 277: { action. consumeInitializer(); break;
+ }
+
+ //
+ // Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt }
+ //
+ case 278: { action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 283: designated_initializer ::= <openscope-ast> designation = initializer
+ //
+ case 283: { action. consumeInitializerDesignated(); break;
+ }
+
+ //
+ // Rule 287: designator_base ::= [ constant_expression ]
+ //
+ case 287: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 288: designator_base ::= . identifier_or_typedefname
+ //
+ case 288: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 289: designator ::= [ constant_expression ]
+ //
+ case 289: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 290: designator ::= . identifier_or_typedefname
+ //
+ case 290: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 291: translation_unit ::= external_declaration_list
+ //
+ case 291: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 292: translation_unit ::= $Empty
+ //
+ case 292: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 297: external_declaration ::= ;
+ //
+ case 297: { action. consumeDeclarationEmpty(); break;
+ }
+
+ //
+ // Rule 298: external_declaration ::= ERROR_TOKEN
+ //
+ case 298: { action. consumeDeclarationProblem(); break;
+ }
+
+ //
+ // Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ //
+ case 301: { action. consumeFunctionDefinition(true); break;
+ }
+
+ //
+ // Rule 302: function_definition ::= <openscope-ast> function_declarator function_body
+ //
+ case 302: { action. consumeFunctionDefinition(false); break;
+ }
+
+ //
+ // Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ //
+ case 303: { action. consumeFunctionDefinitionKnR(); break;
+ }
+
+ //
+ // Rule 304: function_body ::= { }
+ //
+ case 304: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 305: function_body ::= { <openscope-ast> block_item_list }
+ //
+ case 305: { action. consumeStatementCompoundStatement(true); break;
+ }
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeFunctionDefinitionKnR(); /* action.builder.getASTStack().print();*/
- }
-
- }
- //
- // Rule 308: function_body ::= { }
- //
- static final class Action308 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementCompoundStatement(false); /* action.builder.getASTStack().print();*/
- }
- }
-
- //
- // Rule 309: function_body ::= { <openscope-ast> block_item_list }
- //
- static final class Action309 extends DeclaredAction< C99ParserAction , Object > {
-
- public void doFinal(ITrialUndoActionProvider< Object > provider, C99ParserAction action) { action.builder.
- consumeStatementCompoundStatement(true); /* action.builder.getASTStack().print();*/
- }
- }
-
+ default:
+ break;
+ }
+ return;
+ }
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parserprs.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parserprs.java
index 267add9c20..217930d316 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parserprs.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parserprs.java
@@ -26,7 +26,7 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0
+ 0,0,0
};
};
public final static byte isKeyword[] = IsKeyword.isKeyword;
@@ -34,222 +34,223 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface BaseCheck {
public final static short baseCheck[] = {0,
- 0,0,0,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,3,1,1,
- 1,4,4,3,3,2,2,8,1,0,
- 1,1,1,1,2,2,2,2,2,2,
- 2,2,2,4,1,4,1,3,3,3,
- 1,3,3,1,3,3,1,3,3,3,
- 3,1,3,3,1,3,1,3,1,3,
- 1,3,1,3,1,5,1,3,3,3,
- 3,3,3,3,3,3,3,3,1,1,
- 2,1,0,1,3,1,1,1,1,1,
- 1,1,1,3,3,2,3,5,1,2,
- 1,1,1,2,5,7,5,1,0,7,
- 5,10,9,3,2,2,2,3,2,4,
- 3,3,3,3,3,1,1,1,1,2,
- 1,2,2,2,1,2,2,1,2,2,
- 1,2,2,1,2,2,1,3,1,3,
+ 0,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,3,1,1,1,4,
+ 4,3,3,2,2,8,1,0,1,1,
+ 1,2,2,2,2,2,2,2,2,2,
+ 4,1,4,1,3,3,3,1,3,3,
+ 1,3,3,1,3,3,3,3,1,3,
+ 3,1,3,1,3,1,3,1,3,1,
+ 3,1,5,1,3,3,3,3,3,3,
+ 3,3,3,3,3,1,1,2,1,0,
+ 1,3,1,1,1,1,1,1,1,1,
+ 3,3,2,2,4,1,2,1,1,1,
+ 2,5,7,5,1,0,7,5,9,8,
+ 3,2,2,2,3,2,4,2,2,2,
+ 2,2,1,1,1,1,2,1,2,2,
+ 2,1,2,2,1,2,2,1,2,2,
+ 1,2,2,1,3,1,3,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,5,5,6,6,2,
- 2,2,1,0,1,2,4,2,1,1,
- 3,1,1,2,3,6,7,1,0,1,
- 3,1,3,1,1,1,1,1,1,3,
- 1,1,1,1,1,3,1,2,2,1,
- 6,4,1,3,6,1,3,1,3,2,
- 4,3,5,4,6,6,3,5,1,1,
- 2,3,4,1,2,1,3,1,1,3,
- 2,1,1,1,1,2,1,2,3,1,
- 1,1,3,1,2,2,2,3,4,5,
- 1,5,1,1,3,3,4,1,1,2,
- 3,2,3,2,1,0,1,2,1,1,
- 1,1,1,2,4,4,6,2,4,-6,
- 0,-167,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,
- -2,-98,0,0,-4,0,-18,0,0,-20,
- 0,0,0,-67,-37,0,0,0,0,0,
- 0,0,-26,0,-30,0,0,0,0,0,
- 0,0,0,-93,0,-61,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,
- -58,0,0,0,0,0,0,0,0,0,
- 0,0,-177,0,0,-27,0,0,0,0,
- 0,0,0,-12,0,-87,0,0,-265,0,
+ 1,5,5,6,6,2,2,2,1,0,
+ 1,2,4,2,1,1,3,1,1,2,
+ 3,6,7,1,0,1,3,1,3,1,
+ 1,1,1,1,1,3,1,1,1,1,
+ 1,3,1,2,2,1,5,3,1,3,
+ 5,1,3,1,3,2,4,3,5,4,
+ 6,6,3,5,1,1,2,3,4,1,
+ 2,1,3,1,1,3,2,1,1,1,
+ 1,2,1,2,3,1,1,1,3,1,
+ 2,2,2,3,4,5,1,5,1,1,
+ 3,3,4,1,1,2,3,2,3,2,
+ 1,0,1,2,1,1,1,1,1,2,
+ 4,3,6,2,4,-75,-240,0,0,0,
0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-2,-16,0,-4,0,-6,
+ 0,0,-8,-30,-50,0,0,0,-23,0,
+ -77,-170,0,-47,-79,-18,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-249,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -3,0,-46,0,0,0,0,0,0,0,
+ 0,-3,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-5,
+ 0,0,0,0,0,0,0,0,-21,0,
+ 0,0,0,-70,0,0,-19,0,0,0,
+ -115,0,-82,0,0,0,0,-28,0,0,
+ 0,0,0,0,0,0,0,0,-22,0,
+ 0,0,0,0,0,0,0,-37,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-29,-165,0,0,0,0,0,0,
+ 0,0,0,0,0,-186,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-196,
0,0,0,0,0,0,0,0,0,0,
- -8,0,-31,0,0,-44,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,-161,0,0,0,
+ 0,-271,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -62,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,-21,
- 0,-101,0,0,0,0,0,0,0,0,
+ -32,-57,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -32,0,-125,0,0,0,0,0,0,0,
+ -24,0,0,-262,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-33,0,-154,0,0,0,0,0,0,
- 0,0,0,0,0,-268,0,0,0,0,
+ 0,0,-27,0,0,0,0,-187,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,-48,0,-162,0,0,0,
+ 0,0,0,0,-38,-74,0,-39,0,-188,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-36,0,0,0,-242,0,-41,0,
- 0,-13,-236,-28,0,-15,0,-24,-92,0,
+ 0,0,0,0,0,0,-53,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -109,0,0,0,0,0,0,0,0,0,
- 0,0,-22,0,0,-145,0,-45,0,0,
- -243,0,0,0,0,0,0,0,0,0,
- 0,0,-65,0,0,0,0,-143,0,0,
- 0,0,0,0,0,-150,-121,0,0,0,
- 0,0,0,0,0,-105,0,0,0,0,
+ 0,0,0,0,0,-25,0,0,-36,-177,
+ 0,0,0,0,0,0,0,0,0,-90,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,-127,-76,0,0,
+ 0,0,0,0,0,0,0,0,-41,-125,
0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-64,-150,
0,0,0,0,0,0,0,0,0,0,
- -156,-23,0,0,0,0,0,0,0,0,
- 0,0,-25,-77,0,0,0,-34,0,0,
- 0,0,0,0,0,0,-72,-78,0,0,
+ 0,0,0,0,0,0,0,0,-31,-181,
0,0,0,0,0,0,0,0,0,0,
- -128,-79,0,0,0,0,0,0,0,0,
+ -273,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-129,0,0,0,0,0,0,0,0,
+ -72,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -35,0,-130,0,0,0,0,0,0,0,
+ -143,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-26,
+ 0,-179,0,0,0,0,0,0,0,0,
+ 0,0,0,-65,0,-152,-67,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-38,0,-131,0,0,0,0,0,0,
+ 0,0,0,0,0,-153,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-49,0,-132,0,0,0,0,0,
+ 0,0,0,0,-68,-154,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,-51,0,-133,0,0,0,0,
+ 0,0,0,0,-71,-155,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,-54,0,-134,0,0,0,
+ 0,0,0,0,-73,-156,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,-55,0,-135,0,0,
+ 0,0,0,0,-84,-157,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,-60,0,-136,0,
- 0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,-88,0,-137,
- 0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,-239,0,
- -184,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,-191,
- -40,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,-80,-108,
- -163,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,-192,0,0,0,0,
+ 0,0,0,0,-85,-158,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,-227,0,0,0,
+ 0,0,0,0,-93,-159,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,-229,0,-160,0,0,
+ 0,0,0,0,-104,-160,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-118,-81,-82,0,0,0,-222,0,-94,
- 0,0,-95,-83,-74,0,0,0,0,0,
+ 0,0,0,0,-105,-161,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-231,0,0,0,0,0,0,0,
+ 0,0,0,0,-106,-162,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-198,-252,0,0,0,0,0,0,0,
+ 0,0,0,0,-107,-204,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-39,-126,-260,0,-155,-187,0,0,
- 0,0,0,0,0,0,0,0,0,-144,
- -84,-85,-86,0,0,0,0,0,0,0,
- 0,0,0,-113,0,0,0,-90,0,0,
+ 0,0,0,0,-108,-206,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -91,-262,0,0,0,0,0,0,0,0,
+ 0,0,0,0,-210,-109,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- -63,-271,0,0,0,0,0,0,0,0,
+ 0,0,0,-110,-185,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-211,0,
0,0,0,0,0,0,0,0,0,0,
- -75,-199,0,0,0,0,0,-189,0,-97,
- 0,-96,-112,0,0,-124,-246,0,0,0,
+ 0,0,0,0,0,0,0,-40,-250,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,-42,0,0,0,0,
- 0,-7,0,-146,0,-234,0,0,0,0,
- 0,0,0,0,0,-99,0,-186,0,0,
- -102,-169,-100,0,-180,0,0,0,0,0,
- 0,-138,0,0,0,-1,0,0,0,0,
- 0,0,-9,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,-265,-61,0,
0,0,0,0,0,0,0,0,0,0,
- -258,0,-139,0,0,0,0,-253,-103,-104,
- 0,0,-193,-185,-164,0,0,-179,0,0,
- 0,0,0,0,0,-182,0,0,0,-170,
- -183,0,0,0,0,0,0,0,0,0,
- -106,0,0,0,-254,0,0,0,0,0,
+ 0,0,0,0,0,0,-180,0,0,0,
+ 0,0,0,0,0,0,0,0,-29,0,
+ 0,-276,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,-114,0,0,0,0,-115,-275,0,0,
- 0,-256,0,-120,0,0,0,-168,0,-110,
- 0,0,0,0,0,0,0,0,-172,0,
- 0,0,-188,-203,0,0,0,0,-257,0,
- 0,0,0,-56,-196,-53,-175,0,0,0,
- 0,0,0,0,-235,-176,0,0,0,-233,
- 0,-281,0,0,0,-280,0,0,0,0,
+ -258,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-42,
+ 0,-182,-10,0,0,0,0,0,0,0,
+ 0,0,-78,0,-111,0,-87,-112,0,0,
+ -113,0,-114,0,-59,0,0,0,-62,-44,
+ 0,0,-11,0,0,0,0,0,0,0,
+ -88,0,0,0,0,0,0,0,0,-35,
+ 0,0,0,-116,0,-83,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-117,-183,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-178,0,0,0,-200,-221,0,-201,
- 0,0,-286,0,0,0,-116,-17,-190,0,
- -202,0,0,0,0,0,0,0,-204,0,
- 0,0,0,0,-119,-251,0,0,0,-288,
+ -33,0,0,0,0,-43,0,-60,0,-13,
+ 0,0,0,0,0,0,0,0,0,-132,
+ 0,-69,0,0,0,-15,0,0,-86,0,
+ 0,0,0,0,0,-45,0,-121,0,0,
+ 0,0,0,0,-122,0,-123,0,-145,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,-10,0,0,0,
- 0,0,0,-230,0,0,0,0,0,0,
- 0,-122,0,-220,0,0,0,0,0,0,
- 0,0,0,-248,0,0,0,0,-181,0,
- -205,0,-259,0,0,0,0,0,0,0,
- 0,-223,0,0,0,0,0,0,-274,0,
- -264,0,0,0,0,0,0,0,0,0,
- 0,0,-270,0,-225,0,-226,0,-276,-43,
- 0,0,0,0,0,-64,-206,-207,-208,-209,
- 0,0,0,0,-283,-261,0,0,0,-210,
- 0,0,0,0,0,0,0,0,0,-211,
- 0,0,0,0,0,-212,-171,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,
- -47,0,0,0,-19,0,0,-237,0,0,
- 0,0,-213,0,0,0,-157,0,0,0,
- 0,0,0,0,0,0,0,-241,0,0,
- 0,0,0,0,-266,0,0,0,-272,-238,
- -214,0,-215,0,0,0,0,0,0,0,
- 0,0,-140,0,0,-216,0,-217,0,0,
- 0,-158,0,0,0,0,0,0,0,0,
- 0,0,-159,0,0,0,0,0,0,0,
- 0,0,0,-151,-218,0,0,0,0,0,
- 0,0,0,-197,0,-66,0,-277,-57,0,
- -152,-279,0,0,0,0,0,0,0,-282,
- 0,0,0,0,-269,0,0,0,0,-219,
- 0,0,0,-284,-224,-278,0,-232,0,0,
- 0,0,-123,-244,-245,-141,0,-173,0,-287,
- 0,0,0,0,0,-142,0,0,0,0,
- -247,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,-250,
- 0,-153,0,0,0,0,0,0,0,0,
- -194,-5,0,0,0,0,0,0,-11,0,
- -273,0,-228,0,-14,0,0,0,0,0,
- 0,0,0,-263,0,0,-16,-50,0,0,
+ -193,0,-55,0,-96,0,0,0,0,0,
+ 0,0,0,0,0,0,-195,0,-48,0,
+ 0,-49,0,0,0,-144,0,0,0,0,
+ 0,0,-129,-242,0,0,0,0,0,-34,
+ 0,0,0,0,0,0,-203,0,0,0,
+ 0,0,-92,-124,0,0,0,0,0,0,
+ -119,0,0,0,0,0,0,-147,0,-241,
+ 0,0,0,-194,0,-133,0,0,0,0,
+ 0,0,0,0,0,0,0,-20,0,-126,
+ 0,-190,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-52,
+ 0,0,-54,0,0,0,0,0,0,-266,
+ -66,0,-135,0,-80,0,0,0,0,0,
+ 0,0,0,-136,0,-137,0,-139,0,0,
+ 0,0,0,0,0,-138,0,-200,0,-141,
0,0,0,0,0,0,0,0,0,0,
+ 0,-134,0,0,0,0,0,0,-239,0,
+ 0,0,0,0,-140,0,0,0,0,0,
+ 0,0,0,-207,0,0,-146,-209,0,0,
+ 0,-168,-91,0,-151,0,0,0,0,0,
+ 0,0,-63,0,0,0,0,0,-245,0,
+ -51,0,0,-221,0,0,0,0,0,0,
+ 0,0,-142,0,0,0,0,0,0,-169,
+ 0,-198,0,0,0,-163,0,-247,0,0,
+ 0,0,0,0,0,0,0,0,0,-191,
+ 0,0,0,0,0,0,0,0,0,-222,
+ -164,0,-248,0,-192,0,-9,0,0,-223,
+ -199,0,0,0,0,0,0,0,0,0,
+ -215,0,0,0,-280,0,0,-224,-237,0,
+ 0,0,0,0,0,-149,0,0,0,0,
+ 0,0,0,0,0,-212,-283,0,0,0,
+ -12,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,-286,0,
+ 0,-225,-201,0,0,0,0,0,-202,-220,
+ 0,0,0,0,0,0,0,0,0,-56,
+ 0,-205,0,-249,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,-226,
+ 0,0,-17,0,-208,-253,0,-251,0,0,
+ 0,-281,0,0,0,-197,0,-243,-217,-252,
+ 0,0,0,0,0,0,0,0,-1,0,
+ 0,0,0,0,0,0,0,0,-58,0,
+ -7,0,0,0,0,0,0,0,-218,-219,
+ 0,0,-184,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,-240,0,0,0,0,0,0,
- 0,0,-52,0,0,0,-68,0,0,0,
+ -227,0,0,-228,0,0,0,0,0,0,
+ 0,0,0,-229,-230,-231,-232,0,0,0,
+ 0,-175,-238,0,0,0,0,0,0,0,
+ 0,0,-176,0,0,0,0,0,0,0,
+ 0,0,-216,0,-100,0,0,0,0,0,
+ 0,0,-165,0,-268,-233,-234,0,0,-235,
+ 0,-260,-236,-261,-256,0,-257,-263,-270,0,
+ 0,0,0,0,-274,-178,0,0,0,0,
+ 0,0,0,0,0,-89,0,0,-213,-14,
0,0,0,0,0,0,0,0,0,0,
+ 0,0,-46,0,-76,0,0,0,0,0,
+ 0,0,-269,0,0,0,0,-282,0,-285,
+ 0,-81,0,-264,0,-254,0,-97,0,0,
0,0,0,0,0,0,0,0,0,0,
- -69,0,0,0,0,0,0,0,0,0,
- 0,0,0,-70,0,0,0,0,0,0,
- 0,0,0,0,0,-71,0,0,0,0,
- 0,0,0,-107,0,-73,0,0,0,0,
- 0,0,0,0,0,-89,-111,0,0,0,
- 0,0,0,0,0,-147,0,0,0,0,
- 0,0,0,-166,0,0,0,0,-148,0,
- 0,0,0,0,0,0,-149,0,0,0,
- 0,0,0,0,0,-59,0,0,-195,0,
- 0,0,0,0,0,0,-117,0,-267,0,
+ 0,-118,0,0,0,-94,0,0,-272,0,
+ 0,0,0,0,0,-98,0,0,0,0,
+ 0,0,0,0,-275,0,0,0,0,0,
+ 0,0,0,0,-279,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,-285,0,0,0,0,0,0,0,
- 0,0,-174,0,0,0,-255,0,0,0,
+ 0,0,0,0,0,0,-99,0,0,0,
+ 0,0,0,0,-101,0,0,0,0,0,
+ 0,0,-120,-277,0,0,0,0,0,0,
+ -127,0,0,-166,0,0,-167,0,-172,0,
+ 0,0,0,0,0,0,0,-284,0,0,
0,0,0,0,0,0,0,0,0,0,
+ 0,0,-173,0,0,0,0,0,0,0,
+ 0,0,0,0,0,-174,0,0,0,0,
+ 0,0,0,-255,0,0,-259,0,0,-214,
+ 0,0,0,0,0,0,0,-95,0,0,
+ 0,0,0,0,-148,0,-244,0,0,0,
+ 0,0,-102,0,0,0,0,0,0,-103,
+ 0,0,0,0,0,0,0,-267,0,0,
0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,-278,0,-128,0,0,0,0,
+ 0,0,0,0,0,-130,0,-131,0,0,
+ 0,-171,0,0,0,0,0,0,0,0,
+ 0,0,0,-189,0,0,0,0,0,0,
+ 0,0,0,0,0,-246,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0
+ 0,0,0,0
};
};
public final static short baseCheck[] = BaseCheck.baseCheck;
@@ -259,224 +260,225 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface BaseAction {
public final static char baseAction[] = {
- 103,1,26,21,34,34,24,24,35,35,
- 19,19,2,2,2,2,3,3,3,4,
- 4,5,5,5,5,5,5,5,5,67,
- 67,84,84,84,6,6,6,6,6,6,
- 6,6,6,6,6,7,7,8,8,8,
- 8,9,9,9,10,10,10,11,11,11,
- 11,11,12,12,12,13,13,14,14,15,
- 15,16,16,17,17,18,18,22,22,22,
- 22,22,22,22,22,22,22,22,22,36,
- 27,20,104,104,105,105,56,37,37,37,
- 37,37,37,37,38,38,38,30,30,86,
- 86,68,68,39,39,40,40,40,62,62,
- 41,41,41,41,42,42,42,42,42,48,
- 48,23,23,23,23,23,49,49,49,93,
- 93,88,88,88,88,89,89,89,90,90,
- 90,91,91,91,92,92,92,87,87,80,
- 80,81,50,53,53,53,53,53,69,70,
- 70,70,70,70,70,70,70,70,70,70,
- 70,79,79,25,25,25,76,76,76,76,
- 77,77,77,71,71,72,72,64,64,54,
- 106,106,94,95,95,95,78,78,96,96,
- 97,97,82,82,28,29,29,29,51,52,
- 52,43,43,43,43,31,31,32,44,44,
- 45,33,33,98,98,46,108,108,107,107,
- 47,47,47,47,47,47,47,47,47,99,
- 55,55,55,55,73,73,65,65,65,66,
- 66,57,57,109,109,75,75,74,74,74,
- 58,58,58,59,60,60,60,61,61,61,
- 61,63,63,85,85,85,85,83,110,111,
- 111,112,112,113,113,103,103,114,114,100,
- 100,100,100,115,115,101,101,101,102,102,
- 772,337,1075,1138,16,21,17,748,703,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 77,43,436,552,281,1295,1332,178,137,214,
- 507,340,225,233,1151,310,16,21,17,748,
- 43,113,89,844,129,837,625,1431,1399,139,
- 136,138,98,162,1295,552,1295,1602,1351,1479,
- 97,99,100,101,102,283,340,225,234,141,
- 168,1296,1565,127,90,129,145,148,151,154,
- 308,1352,345,837,1116,284,625,1538,1373,1587,
- 1899,1905,1917,1548,1210,232,1296,2044,491,1075,
- 1138,16,21,17,748,703,47,784,812,798,
- 1133,1059,1144,1134,1222,1221,1223,77,107,493,
- 232,281,987,1138,16,21,17,748,703,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 77,104,310,966,281,16,21,17,748,703,
- 47,784,812,798,1133,1059,1144,1134,1222,1221,
- 1223,77,283,1211,1170,281,16,21,17,748,
- 45,47,784,812,798,1133,1059,1144,1134,1222,
- 1830,583,284,628,1659,285,920,1666,16,21,
- 17,748,703,47,784,812,798,1133,1059,1144,
- 1134,1222,1221,1223,77,286,160,1170,1271,16,
- 21,17,748,45,47,784,812,798,1133,1753,
- 240,1113,1843,16,21,17,748,703,47,784,
- 812,798,1133,1059,1144,1134,1222,1221,1223,77,
- 104,1326,1170,1306,16,21,17,748,703,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 77,104,1918,945,94,16,21,17,748,703,
- 47,784,812,798,1133,1059,1144,1134,1222,1221,
- 1223,77,667,306,1170,1403,16,21,17,748,
- 45,47,784,812,798,1669,966,241,16,21,
- 17,748,703,47,784,812,798,1133,1059,1144,
- 1134,1222,1221,1223,77,184,552,1170,281,16,
- 21,17,748,45,47,784,812,798,1133,1059,
- 1144,1134,1766,899,113,89,977,56,366,165,
- 1431,1399,1220,1316,178,98,1228,1497,423,1,
- 552,1351,111,97,99,100,101,102,977,287,
- 1298,1295,1619,112,977,381,1298,592,113,89,
- 977,643,366,583,1431,1399,1301,552,165,98,
- 198,1296,2079,109,309,1351,111,97,99,100,
- 101,102,1944,309,259,229,92,112,1249,1711,
- 260,659,1745,1549,406,278,1170,827,16,21,
- 17,748,45,47,784,1559,1170,110,16,21,
- 17,748,45,47,784,812,798,1133,1059,1144,
- 1134,1222,1221,1223,96,137,214,1170,1208,16,
- 21,17,748,703,47,784,812,798,1133,1059,
- 1144,1134,1222,1221,1223,77,139,136,138,88,
- 162,1170,1232,16,21,17,748,45,47,784,
- 812,1680,1533,378,1213,305,141,168,104,1953,
- 1551,130,25,145,148,151,154,1012,804,16,
- 21,17,748,45,38,1373,1587,1899,1905,1917,
- 1548,1170,584,16,21,17,748,703,47,784,
- 812,798,1133,1059,1144,1134,1222,1221,1223,77,
- 228,247,1170,87,16,21,17,748,703,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 77,104,1496,1170,86,16,21,17,748,703,
- 47,784,812,798,1133,1059,1144,1134,1222,1221,
- 1223,77,985,1494,1170,85,16,21,17,748,
- 703,47,784,812,798,1133,1059,1144,1134,1222,
- 1221,1223,77,104,2014,1170,84,16,21,17,
- 748,703,47,784,812,798,1133,1059,1144,1134,
- 1222,1221,1223,77,104,2027,1170,83,16,21,
- 17,748,703,47,784,812,798,1133,1059,1144,
- 1134,1222,1221,1223,77,104,1547,1170,82,16,
- 21,17,748,703,47,784,812,798,1133,1059,
- 1144,1134,1222,1221,1223,77,1010,2077,1170,81,
- 16,21,17,748,703,47,784,812,798,1133,
- 1059,1144,1134,1222,1221,1223,77,104,717,1170,
- 80,16,21,17,748,703,47,784,812,798,
- 1133,1059,1144,1134,1222,1221,1223,77,104,312,
- 1170,79,16,21,17,748,703,47,784,812,
- 798,1133,1059,1144,1134,1222,1221,1223,77,104,
- 409,1170,78,16,21,17,748,45,47,784,
- 812,798,1133,1059,1144,1134,1222,1221,1223,96,
- 1170,178,16,21,17,748,703,47,784,812,
- 798,1133,1059,1144,1134,1222,1221,1223,77,298,
- 1116,1170,1718,16,21,17,748,45,47,784,
- 812,798,1133,1059,1144,1768,1170,213,16,21,
- 17,748,703,47,784,812,798,1133,1059,1144,
- 1134,1222,1221,1223,77,187,1809,1170,1750,16,
- 21,17,748,703,47,784,812,798,1133,1059,
- 1144,1134,1222,1221,1223,77,243,552,1170,95,
- 16,21,17,748,45,47,784,812,798,1133,
- 1059,1751,1237,789,509,113,89,977,1279,366,
- 1300,1431,1399,1300,776,1189,98,16,21,17,
- 748,36,1351,111,97,99,100,101,102,126,
- 255,214,125,1170,112,16,21,17,748,45,
- 47,784,812,798,1133,1059,1144,1134,1222,1221,
- 1223,96,551,1170,109,16,21,17,748,45,
- 47,784,812,798,1133,1059,1144,1134,1222,1221,
- 1223,96,1205,890,1242,123,552,1170,1248,16,
- 21,17,748,45,47,784,812,798,1670,204,
- 1249,239,338,544,113,89,977,226,366,275,
- 1431,1399,255,214,809,98,255,214,1221,1825,
- 108,1351,111,97,99,100,101,102,1880,1398,
- 289,1062,1170,112,16,21,17,748,45,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 96,797,1170,110,16,21,17,748,45,47,
- 784,812,798,1133,1059,1144,1134,1222,1221,1223,
- 96,1189,421,16,21,17,748,35,315,1505,
- 669,1421,1238,1116,24,242,797,1170,205,16,
- 21,17,748,45,47,784,812,798,1133,1059,
- 1144,1134,1222,1221,1223,76,308,1420,1836,783,
- 225,230,367,654,104,552,805,1914,186,276,
- 244,219,658,222,224,274,709,977,809,366,
- 263,1300,1300,813,90,1116,267,1292,1182,272,
- 277,1484,890,783,225,396,302,783,225,230,
- 114,128,264,865,303,219,658,222,473,219,
- 658,222,224,274,161,301,2069,451,1203,335,
- 189,1290,552,890,267,1292,1182,272,1286,754,
- 226,137,214,797,1238,104,552,261,478,552,
- 1738,90,157,353,300,1510,1116,18,118,772,
- 1300,1116,144,136,138,90,162,113,89,1452,
- 683,1277,1795,1431,1399,520,552,243,98,124,
- 550,2066,143,168,1351,104,97,99,100,101,
- 102,188,845,1639,113,89,206,1236,1290,552,
- 1431,1399,562,552,1063,98,297,299,62,331,
- 1135,1351,121,97,99,100,101,102,90,467,
- 1892,113,89,890,797,118,211,1431,1399,604,
- 552,977,98,199,1223,178,370,1262,1351,117,
- 97,99,100,101,102,178,1034,231,113,89,
- 1116,290,1290,552,1431,1399,646,552,22,98,
- 1820,1452,254,214,671,1351,1901,97,99,100,
- 101,102,90,1302,196,113,89,890,1312,118,
- 890,1431,1399,688,552,207,98,370,827,1272,
- 1944,890,1351,116,97,99,100,101,102,668,
- 1641,1844,113,89,1845,900,1238,1132,1431,1399,
- 730,552,1452,98,1834,23,137,214,210,1351,
- 123,97,99,100,101,102,977,313,1298,113,
- 89,292,1234,1457,1285,1431,1399,140,136,138,
- 98,162,367,1041,1253,1614,1351,122,97,99,
- 100,101,102,197,1116,137,214,142,168,751,
- 1041,711,259,1300,146,149,152,155,235,210,
- 1483,1549,890,783,225,230,147,136,138,1300,
- 162,458,1458,1348,1457,219,658,222,224,282,
- 783,225,230,1238,161,890,1435,890,1512,1312,
- 367,1041,219,658,222,224,1223,1274,1280,831,
- 869,1838,783,225,230,1116,751,1041,294,1462,
- 1009,1489,157,353,220,658,222,224,274,772,
- 1255,783,225,230,254,214,1261,104,552,269,
- 1292,1182,272,219,658,222,224,783,225,230,
- 28,310,161,200,202,367,1041,90,797,219,
- 658,222,224,1267,1632,1594,1675,1170,1838,16,
- 21,17,748,45,47,784,812,1690,890,1204,
- 158,353,783,225,1251,890,783,225,230,890,
- 797,1065,245,466,220,658,222,1238,219,658,
- 222,224,273,501,1495,573,1306,1203,635,279,
- 201,202,1170,1812,16,21,17,748,45,47,
- 784,812,1696,1170,246,16,21,17,748,45,
- 47,784,812,1723,1170,1307,16,21,17,748,
- 45,47,784,1621,714,647,1132,552,890,310,
- 274,1170,1300,16,21,17,748,45,47,1667,
- 1300,267,1292,1182,272,797,90,977,277,199,
- 1309,120,280,1393,890,1038,797,266,1313,2093,
- 783,225,230,1223,1064,1323,1132,552,104,552,
- 890,274,220,658,222,224,1132,552,1543,291,
- 1763,759,267,1292,1182,272,90,977,90,199,
- 293,254,214,1393,1570,1655,90,977,1738,199,
- 1332,1362,1170,1393,16,21,17,748,45,47,
- 1668,1012,361,16,21,17,748,45,38,403,
- 1763,377,2174,1041,552,757,2174,2174,2174,2174,
- 1763,301,2174,451,56,335,1204,812,1037,2174,
- 2174,1537,2174,90,977,248,366,137,214,2174,
- 118,1540,2174,137,214,977,2174,1298,2174,977,
- 300,199,1040,2174,546,137,214,2174,150,136,
- 138,1391,162,1037,153,136,138,1170,162,16,
- 21,17,748,45,42,1623,156,136,138,1641,
- 162,259,671,2174,977,2174,199,2174,2174,1745,
- 1549,1170,195,16,21,17,748,45,41,1060,
- 1470,274,298,299,1170,2174,16,21,17,748,
- 45,40,269,1292,1182,272,1170,671,16,21,
- 17,748,45,39,1037,2174,1170,195,16,21,
- 17,748,45,37,1303,1470,1170,1037,16,21,
- 17,748,45,38,2174,977,1170,199,16,21,
- 17,748,45,50,790,2174,2174,2174,977,1170,
- 199,16,21,17,748,45,49,1170,2174,16,
- 21,17,748,45,48,977,1060,1298,671,1094,
- 2174,16,21,17,748,45,46,1223,195,900,
- 2174,671,2174,2174,2174,1355,1470,977,2174,366,
- 2174,195,1464,1290,552,2174,307,2174,1416,1470,
- 977,259,1298,104,552,254,214,104,552,1483,
- 1549,2174,2174,90,304,2174,2174,2174,2174,2174,
- 118,2174,2174,90,2174,2174,2174,90,2174,2174,
- 1657,2174,2174,2174,1749,2174,259,2174,2174,2174,
- 2174,2174,2174,2174,1808,1549,2174,2174,2174,2174,
- 1208,1604,2174,2174,2174,1850,2174,0,2183,1,
- 0,3,1,2359,0,3,1,0,9,11,
- 0,115,1516,0
+ 102,1,32,32,23,23,33,33,19,19,
+ 2,2,2,2,3,3,3,4,4,5,
+ 5,5,5,5,5,5,5,67,67,88,
+ 88,6,6,6,6,6,6,6,6,6,
+ 6,6,7,7,8,8,8,8,9,9,
+ 9,10,10,10,11,11,11,11,11,12,
+ 12,12,13,13,14,14,15,15,16,16,
+ 17,17,18,18,21,21,21,21,21,21,
+ 21,21,21,21,21,21,34,27,20,103,
+ 103,90,90,54,35,35,35,35,35,35,
+ 35,36,36,36,28,28,91,91,68,68,
+ 37,37,38,38,38,60,60,39,39,39,
+ 39,40,40,40,40,40,46,46,22,22,
+ 22,22,22,47,47,47,83,83,78,78,
+ 78,78,79,79,79,80,80,80,81,81,
+ 81,82,82,82,92,92,84,84,85,48,
+ 50,50,50,50,50,61,63,63,63,63,
+ 63,63,63,63,63,63,63,63,72,72,
+ 24,24,69,69,69,69,70,70,70,73,
+ 73,74,74,64,64,52,104,104,93,94,
+ 94,94,71,71,95,95,96,96,86,86,
+ 25,26,26,26,49,51,51,41,41,41,
+ 41,29,29,30,42,42,43,31,31,97,
+ 97,44,106,106,105,105,45,45,45,45,
+ 45,45,45,45,45,98,53,53,53,53,
+ 75,75,65,65,65,66,66,55,55,107,
+ 107,77,77,76,76,76,56,56,56,57,
+ 58,58,58,59,59,59,59,62,62,89,
+ 89,89,89,87,108,109,109,110,110,111,
+ 111,102,102,112,112,99,99,99,99,113,
+ 113,100,100,100,101,101,298,480,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,767,472,91,1293,1408,
+ 330,134,210,1072,363,1227,511,221,226,152,
+ 1210,1298,1304,650,632,859,120,126,216,1261,
+ 218,220,270,136,133,135,159,222,134,210,
+ 250,210,89,265,1570,1585,268,138,875,165,
+ 134,210,802,326,183,142,145,148,151,418,
+ 144,133,135,159,1731,333,1587,1631,1850,1286,
+ 412,372,136,133,135,159,1454,134,210,835,
+ 1180,407,221,229,835,1280,138,338,165,297,
+ 1221,363,328,1298,142,145,148,151,327,136,
+ 133,135,159,1731,333,1587,1631,1850,1286,717,
+ 206,302,304,138,227,165,296,104,1124,1236,
+ 895,142,145,148,151,1740,182,407,221,230,
+ 1731,333,1587,1631,1850,1286,1121,127,14,19,
+ 15,935,42,44,955,995,975,1036,1777,330,
+ 1073,1354,14,19,15,935,915,44,955,995,
+ 975,1036,1015,1195,1054,1201,1198,1203,74,294,
+ 295,277,1073,1354,14,19,15,935,915,44,
+ 955,995,975,1036,1015,1195,1054,1201,1198,1203,
+ 74,477,994,277,14,19,15,935,915,44,
+ 955,995,975,1036,1015,1195,1054,1201,1198,1203,
+ 74,719,279,277,1016,1354,14,19,15,935,
+ 915,44,955,995,975,1036,1015,1195,1054,1201,
+ 1198,1203,74,758,279,277,224,280,1121,1390,
+ 14,19,15,935,42,44,955,995,975,1036,
+ 1015,1195,1054,1816,157,30,1293,1443,759,280,
+ 1121,1702,14,19,15,935,42,44,955,995,
+ 975,1036,1015,1195,1817,126,281,950,1373,14,
+ 19,15,935,915,44,955,995,975,1036,1015,
+ 1195,1054,1201,1198,1203,74,152,1863,1513,330,
+ 1121,282,14,19,15,935,42,44,1590,236,
+ 1140,2055,14,19,15,935,915,44,955,995,
+ 975,1036,1015,1195,1054,1201,1198,1203,74,869,
+ 1121,1616,14,19,15,935,915,44,955,995,
+ 975,1036,1015,1195,1054,1201,1198,1203,74,429,
+ 974,91,14,19,15,935,915,44,955,995,
+ 975,1036,1015,1195,1054,1201,1198,1203,74,472,
+ 1121,1626,14,19,15,935,42,44,955,995,
+ 1761,994,237,14,19,15,935,915,44,955,
+ 995,975,1036,1015,1195,1054,1201,1198,1203,74,
+ 301,1121,277,14,19,15,935,42,44,955,
+ 995,975,1036,1015,1195,1054,1201,1198,1203,93,
+ 1454,1121,1531,14,19,15,935,42,44,955,
+ 995,975,1036,1015,1195,1054,1201,1198,1203,93,
+ 152,344,1121,283,14,19,15,935,42,44,
+ 955,995,975,1652,514,1396,1121,556,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,209,1121,85,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,593,1121,84,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,384,1121,83,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,809,1121,82,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,806,1121,81,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,1013,1121,80,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,361,1121,79,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,1243,1121,78,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,866,1121,77,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,119,1121,76,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,365,1121,75,14,19,
+ 15,935,915,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,74,1231,1121,92,14,19,
+ 15,935,42,44,955,995,975,1036,1015,1195,
+ 1054,1201,1198,1203,93,1121,441,14,19,15,
+ 935,915,44,955,995,975,1036,1015,1195,1054,
+ 1201,1198,1203,74,724,1121,1698,14,19,15,
+ 935,42,44,955,995,975,1036,1015,1776,1121,
+ 200,14,19,15,935,915,44,955,995,975,
+ 1036,1015,1195,1054,1201,1198,1203,74,472,1121,
+ 1710,14,19,15,935,42,44,955,995,975,
+ 1036,1015,1195,1054,1201,1198,1203,93,1121,1294,
+ 14,19,15,935,42,44,955,995,975,1036,
+ 1015,1195,1054,1201,1198,1203,93,1121,123,14,
+ 19,15,935,42,44,955,995,975,1690,877,
+ 335,1729,1121,201,14,19,15,935,42,44,
+ 955,995,975,1036,1015,1195,1054,1201,1198,1203,
+ 93,1121,1835,14,19,15,935,42,44,955,
+ 995,975,1036,1015,1195,1054,1201,1198,1203,73,
+ 184,306,1121,418,14,19,15,935,42,44,
+ 955,995,1764,1293,1495,971,1878,1227,891,110,
+ 86,893,576,426,855,1,306,429,95,1294,
+ 875,345,194,469,1282,108,94,96,97,98,
+ 99,1230,250,210,110,86,109,576,122,855,
+ 152,1323,195,95,333,1394,213,531,305,1282,
+ 108,94,96,97,98,99,251,210,106,1014,
+ 1121,109,14,19,15,935,42,44,955,995,
+ 1774,1314,1193,511,221,226,152,1865,1293,650,
+ 590,1205,1507,107,191,215,1261,218,220,270,
+ 241,306,1294,341,1445,259,859,124,87,632,
+ 263,1570,1585,268,553,1374,152,1882,871,110,
+ 86,111,576,1543,855,1059,225,62,95,213,
+ 260,134,210,875,1282,108,94,96,97,98,
+ 99,831,1489,152,345,1121,109,14,19,15,
+ 935,42,39,137,133,135,159,1319,345,152,
+ 1289,257,1046,1197,273,576,633,139,106,165,
+ 511,221,226,301,927,143,146,149,152,1234,
+ 1258,1433,215,1261,218,220,270,123,306,299,
+ 875,1367,334,1227,1294,206,1695,263,1570,1585,
+ 268,152,470,228,1309,895,110,86,805,576,
+ 1329,855,256,125,472,95,1317,1783,250,210,
+ 105,1282,108,94,96,97,98,99,58,1088,
+ 1294,231,1121,109,14,19,15,935,42,44,
+ 955,995,975,1036,1015,1195,1054,1201,1823,121,
+ 1258,1846,207,1037,345,107,1902,511,221,578,
+ 1289,486,650,58,689,1299,345,307,1515,215,
+ 1261,218,649,228,1146,1234,367,1824,1298,158,
+ 110,86,1828,1440,285,855,1197,195,639,95,
+ 1298,670,511,221,226,1282,1353,94,96,97,
+ 98,99,528,650,215,1261,218,220,255,1311,
+ 345,185,154,575,158,841,689,1193,411,1249,
+ 438,110,86,184,1321,619,855,1256,678,192,
+ 95,1234,674,1300,1230,1259,1282,101,94,96,
+ 97,98,99,633,511,221,226,154,575,570,
+ 650,327,251,210,591,438,215,1261,218,220,
+ 251,210,307,1298,255,238,1504,1410,110,86,
+ 674,286,1294,855,1822,1249,363,95,612,650,
+ 511,221,226,1282,118,94,96,97,98,99,
+ 1035,2057,216,1261,218,220,202,110,86,2040,
+ 675,363,855,654,650,1324,95,1184,196,198,
+ 1282,363,1282,114,94,96,97,98,99,1672,
+ 23,472,110,86,16,696,650,855,1284,1258,
+ 2037,95,134,210,1529,272,1300,1282,1829,94,
+ 96,97,98,99,110,86,1300,738,650,855,
+ 271,1213,274,95,147,133,135,159,22,1282,
+ 113,94,96,97,98,99,110,86,240,780,
+ 650,855,479,363,1886,95,134,210,239,363,
+ 1300,1282,120,94,96,97,98,99,110,86,
+ 58,689,1271,855,841,689,1558,95,150,133,
+ 135,159,1583,1282,119,94,96,97,98,99,
+ 483,193,20,58,689,1298,152,492,1300,511,
+ 221,226,1329,511,221,226,873,650,1294,363,
+ 1300,215,1261,218,220,215,1261,218,220,355,
+ 372,158,511,221,226,1504,87,2078,203,327,
+ 241,896,1825,115,215,1261,218,220,297,363,
+ 363,328,242,1121,334,14,19,15,935,42,
+ 44,955,995,1775,155,575,134,210,511,221,
+ 1305,1283,1827,21,1285,296,1708,197,198,1880,
+ 216,1261,218,1298,1308,1310,1060,1260,141,133,
+ 135,159,1121,363,14,19,15,935,42,44,
+ 955,1534,140,1121,165,14,19,15,935,42,
+ 44,955,1580,836,2034,1040,269,14,19,15,
+ 935,42,35,1228,1601,1294,1245,1287,293,295,
+ 1325,325,363,1326,1298,1327,273,1330,1331,641,
+ 2190,390,2190,2190,2094,1300,1121,243,14,19,
+ 15,935,42,44,1608,275,1273,345,270,1040,
+ 1242,14,19,15,935,42,35,278,270,263,
+ 1570,1585,268,875,345,875,345,287,1234,263,
+ 1570,1585,268,363,2190,134,210,2190,1300,1783,
+ 1298,244,875,345,633,195,1291,195,1121,262,
+ 14,19,15,935,42,38,1935,153,133,135,
+ 159,255,760,345,195,2190,152,306,288,363,
+ 289,411,1249,26,2190,1193,1121,1193,14,19,
+ 15,935,42,37,576,633,87,191,195,191,
+ 303,270,276,1581,1193,1294,413,1445,1458,1445,
+ 2190,2190,265,1570,1585,268,191,2190,300,290,
+ 2190,1388,2190,2190,117,1470,1445,1121,1813,14,
+ 19,15,935,42,36,1121,2190,14,19,15,
+ 935,42,34,1121,363,14,19,15,935,42,
+ 35,873,306,1556,152,306,2190,152,306,1121,
+ 2190,14,19,15,935,42,47,1627,363,2190,
+ 2190,87,2190,576,87,2190,195,87,115,195,
+ 2190,1581,2190,1121,1581,14,19,15,935,42,
+ 46,1649,2190,2190,2190,2190,1121,1706,14,19,
+ 15,935,42,45,1311,345,1813,1037,345,1813,
+ 1102,1552,14,19,15,935,42,43,1159,2190,
+ 14,19,15,935,40,1227,1234,873,650,1234,
+ 2190,1709,2190,1178,1739,14,19,15,935,33,
+ 1178,2190,14,19,15,935,32,87,873,650,
+ 250,210,2190,2190,115,2190,2190,1886,2190,255,
+ 2190,2190,255,2190,873,650,152,650,87,1822,
+ 1249,2190,1909,1249,2190,115,152,650,152,650,
+ 2190,2190,152,650,87,2190,87,1815,2190,2190,
+ 2190,115,2190,1591,152,650,87,2190,87,2190,
+ 1515,2190,87,1653,2190,1659,152,650,1974,1660,
+ 2190,2190,2190,2190,87,2190,2190,2190,2190,2190,
+ 2190,1820,2190,1035,1998,2190,87,2190,2190,2190,
+ 2190,2190,2190,1873,2190,0,179,223,0,2197,
+ 1,0,1,2424,0,7,9,0,179,17,
+ 0,178,18,0,1,2413,0,112,1605,0
};
};
public final static char baseAction[] = BaseAction.baseAction;
@@ -488,147 +490,148 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public final static byte termCheck[] = {0,
0,1,2,3,4,5,6,7,8,9,
10,11,12,13,14,15,16,17,18,19,
- 20,21,22,23,24,25,26,27,28,29,
+ 20,21,22,23,24,25,26,27,28,0,
30,31,32,33,34,35,36,37,38,39,
- 40,41,0,43,44,45,46,47,48,49,
- 50,51,52,53,54,0,56,57,58,4,
+ 40,41,42,43,44,45,46,47,48,49,
+ 50,51,52,53,54,55,56,0,1,2,
60,0,1,2,3,4,5,6,7,8,
9,10,11,12,13,14,15,16,17,18,
19,20,21,22,23,24,25,26,27,28,
- 29,30,31,32,33,34,35,36,37,38,
- 39,40,41,0,43,44,45,46,47,48,
- 49,50,51,52,53,54,74,56,57,58,
- 65,60,0,1,2,3,4,5,6,7,
+ 61,30,31,32,33,34,35,36,37,38,
+ 39,40,41,42,43,44,45,46,47,48,
+ 49,50,51,52,53,54,55,56,0,0,
+ 1,60,0,1,2,3,4,5,6,7,
8,9,10,11,12,13,14,15,16,17,
18,19,20,21,22,23,24,25,26,27,
- 28,29,30,31,32,33,34,35,36,37,
- 38,39,40,41,0,43,44,45,46,47,
- 48,49,50,51,52,53,54,0,56,57,
- 58,4,60,0,1,2,3,4,5,6,
+ 28,0,30,31,32,33,34,35,36,37,
+ 38,39,40,41,42,43,44,45,46,47,
+ 48,49,50,51,52,53,54,55,56,0,
+ 62,63,60,0,1,2,3,4,5,6,
7,8,9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24,25,26,
- 27,28,29,30,31,32,33,34,35,36,
- 37,38,39,40,41,0,43,44,45,46,
- 47,48,49,50,51,52,53,54,0,56,
- 57,58,0,1,2,3,4,5,6,7,
- 8,9,10,11,12,13,14,15,16,17,
- 18,19,20,21,22,23,24,25,26,27,
- 28,29,30,31,32,33,34,35,36,37,
- 38,39,40,41,59,43,44,45,46,47,
- 48,49,50,51,52,53,54,0,56,57,
- 58,0,1,2,3,4,5,0,0,0,
- 1,2,0,4,0,1,2,79,4,0,
- 19,20,21,22,23,24,25,26,27,0,
- 29,30,31,21,22,23,24,0,26,27,
- 0,29,30,31,43,44,45,46,47,48,
- 49,50,51,52,53,54,42,56,57,58,
- 0,1,2,3,4,5,0,1,2,0,
- 62,2,75,76,5,74,0,0,1,19,
- 20,21,22,23,24,25,26,27,19,29,
- 30,31,84,85,86,87,88,89,90,91,
- 92,93,0,43,44,45,46,47,48,49,
- 50,51,52,53,54,78,56,57,58,42,
- 0,1,0,21,22,23,24,0,26,27,
- 0,29,30,31,74,0,1,2,3,4,
+ 27,28,0,30,31,32,33,34,35,36,
+ 37,38,39,40,41,42,43,44,45,46,
+ 47,48,49,50,51,52,53,54,55,56,
+ 0,1,2,3,4,5,6,7,8,9,
+ 10,11,12,13,14,15,16,17,18,19,
+ 20,21,22,23,24,25,26,27,28,57,
+ 30,31,32,33,34,35,36,37,38,39,
+ 40,41,42,43,44,45,46,47,48,49,
+ 50,51,52,53,54,55,56,0,1,2,
+ 0,4,5,0,7,8,9,10,11,12,
+ 13,14,15,16,17,18,0,20,21,22,
+ 23,24,25,26,27,28,0,1,2,0,
+ 4,31,0,1,2,6,4,0,1,42,
+ 43,44,45,46,47,48,49,50,51,52,
+ 53,54,55,56,0,1,2,3,4,5,
+ 0,29,0,0,0,3,0,1,2,3,
+ 4,7,8,19,20,21,22,23,24,25,
+ 26,27,28,0,30,19,20,21,22,23,
+ 24,25,26,27,28,29,42,43,44,45,
+ 46,47,48,49,50,51,52,53,54,55,
+ 56,0,1,2,3,4,5,0,0,2,
+ 58,61,5,6,58,0,0,73,0,1,
+ 19,20,21,22,23,24,25,26,27,28,
+ 0,30,59,83,84,85,86,87,88,89,
+ 90,91,92,42,43,44,45,46,47,48,
+ 49,50,51,52,53,54,55,56,0,0,
+ 2,0,0,5,6,4,0,1,0,0,
+ 1,2,0,4,73,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
- 15,16,17,18,19,20,80,0,1,2,
- 25,4,42,28,42,0,0,32,33,34,
+ 15,16,17,18,19,29,81,82,29,69,
+ 70,71,72,0,1,30,31,32,33,34,
35,36,37,38,39,40,41,0,1,2,
3,4,5,6,7,8,9,10,11,12,
- 13,14,15,16,17,18,19,20,32,42,
- 0,1,25,0,4,28,0,1,0,32,
+ 13,14,15,16,17,18,19,69,70,71,
+ 72,69,70,71,72,0,1,30,31,32,
33,34,35,36,37,38,39,40,41,0,
1,2,3,4,5,6,7,8,9,10,
- 11,12,13,14,15,16,17,18,19,20,
- 75,76,42,0,25,0,1,28,0,4,
- 0,32,33,34,35,36,37,38,39,40,
+ 11,12,13,14,15,16,17,18,19,0,
+ 0,2,0,1,5,6,0,7,8,30,
+ 31,32,33,34,35,36,37,38,39,40,
41,0,1,2,3,4,5,6,7,8,
9,10,11,12,13,14,15,16,17,18,
- 19,20,0,0,0,77,25,42,6,28,
- 7,8,42,32,33,34,35,36,37,38,
+ 19,0,0,2,2,0,5,5,0,1,
+ 0,30,31,32,33,34,35,36,37,38,
39,40,41,0,1,2,3,4,5,6,
7,8,9,10,11,12,13,14,15,16,
- 17,18,19,20,0,82,83,0,25,0,
- 6,28,0,6,0,32,33,34,35,36,
+ 17,18,19,0,0,2,0,0,5,2,
+ 0,7,8,30,31,32,33,34,35,36,
37,38,39,40,41,0,1,2,3,4,
5,6,7,8,9,10,11,12,13,14,
- 15,16,17,18,19,20,0,0,0,1,
- 25,0,6,28,7,8,0,32,33,34,
+ 15,16,17,18,19,0,0,2,0,79,
+ 5,0,6,0,6,30,31,32,33,34,
35,36,37,38,39,40,41,0,1,2,
3,4,5,6,7,8,9,10,11,12,
- 13,14,15,16,17,18,19,20,0,1,
- 0,77,25,0,1,28,3,7,8,32,
+ 13,14,15,16,17,18,19,0,0,0,
+ 0,0,0,6,6,6,0,30,31,32,
33,34,35,36,37,38,39,40,41,0,
1,2,3,4,5,6,7,8,9,10,
- 11,12,13,14,15,16,17,18,19,20,
- 0,1,2,0,25,42,0,28,0,6,
- 2,32,33,34,35,36,37,38,39,40,
- 41,0,1,2,61,0,5,21,22,23,
- 24,28,26,27,9,29,30,31,0,0,
- 19,2,21,22,23,24,0,26,27,3,
- 29,30,31,0,0,1,2,3,0,59,
- 0,0,0,1,43,44,45,46,47,48,
- 49,50,51,52,53,54,0,56,57,58,
- 0,5,21,22,23,24,0,26,27,3,
- 29,30,31,0,0,19,42,21,22,23,
- 24,0,26,27,65,29,30,31,70,71,
- 72,73,66,55,0,61,63,64,0,43,
- 44,45,46,47,48,49,50,51,52,53,
- 54,0,56,57,58,21,22,23,24,0,
- 26,27,3,29,30,31,60,0,0,0,
- 70,71,72,73,6,62,62,43,44,45,
- 46,47,48,49,50,51,52,53,54,0,
- 1,2,3,4,5,0,7,8,9,10,
- 11,12,13,14,15,16,17,18,70,71,
- 72,73,0,24,0,1,2,3,4,5,
- 61,7,8,9,10,11,12,13,14,15,
- 16,17,18,0,65,0,1,2,24,4,
- 5,6,7,8,9,10,11,12,13,14,
- 15,16,17,18,0,66,0,1,2,3,
- 4,5,6,7,8,9,10,11,12,13,
- 14,15,16,17,18,21,22,23,0,0,
- 66,0,1,2,3,4,5,0,7,8,
- 9,10,11,12,13,14,15,16,17,18,
- 21,22,23,0,1,0,0,0,1,3,
- 0,1,2,3,4,5,60,7,8,9,
- 10,11,12,13,14,15,16,17,18,0,
- 20,0,0,0,0,6,0,6,6,6,
- 0,63,64,9,0,1,2,66,4,5,
- 6,7,8,9,10,11,12,13,14,15,
- 16,17,18,0,1,2,60,4,5,6,
+ 11,12,13,14,15,16,17,18,19,76,
+ 0,0,1,2,0,0,5,3,0,30,
+ 31,32,33,34,35,36,37,38,39,40,
+ 41,20,21,22,23,24,25,26,27,28,
+ 0,1,2,3,0,0,1,3,3,73,
+ 0,1,2,42,43,44,45,46,47,48,
+ 49,50,51,52,53,54,55,56,0,29,
+ 2,57,58,5,29,0,61,59,0,4,
+ 0,3,0,3,0,3,0,3,20,21,
+ 22,23,24,25,26,27,28,19,58,19,
+ 0,19,0,58,60,0,20,21,22,59,
+ 42,43,44,45,46,47,48,49,50,51,
+ 52,53,54,55,56,20,21,22,23,24,
+ 25,26,27,28,0,57,0,57,0,61,
+ 58,61,67,68,60,0,0,42,43,44,
+ 45,46,47,48,49,50,51,52,53,0,
+ 1,2,3,4,5,29,7,8,9,10,
+ 11,12,13,14,15,16,17,18,78,77,
+ 0,0,23,0,1,2,3,4,5,9,
+ 7,8,9,10,11,12,13,14,15,16,
+ 17,18,66,0,1,2,23,4,5,6,
7,8,9,10,11,12,13,14,15,16,
- 17,18,0,1,2,0,4,5,3,7,
+ 17,18,0,0,65,0,1,2,3,4,
+ 5,6,7,8,9,10,11,12,13,14,
+ 15,16,17,18,0,1,0,0,65,0,
+ 1,2,3,4,5,0,7,8,9,10,
+ 11,12,13,14,15,16,17,18,0,0,
+ 0,0,0,29,6,20,21,22,9,57,
+ 57,0,0,1,2,60,4,5,6,7,
8,9,10,11,12,13,14,15,16,17,
- 18,0,1,2,0,4,5,3,7,8,
+ 18,20,21,22,23,24,25,26,27,28,
+ 64,0,1,2,65,4,5,6,7,8,
9,10,11,12,13,14,15,16,17,18,
- 0,1,2,0,4,5,0,7,8,9,
+ 0,1,2,0,4,5,3,7,8,9,
10,11,12,13,14,15,16,17,18,0,
- 1,2,0,4,5,60,7,8,9,10,
+ 1,2,19,4,5,0,7,8,9,10,
11,12,13,14,15,16,17,18,0,1,
- 2,0,4,5,60,7,8,9,10,11,
- 12,13,14,15,16,17,18,0,1,0,
- 0,2,0,3,5,6,4,10,11,0,
- 0,2,0,3,5,6,0,0,19,2,
- 20,0,5,6,3,0,0,0,19,2,
- 20,0,5,21,22,23,19,0,0,42,
- 2,20,0,5,0,3,19,21,22,23,
- 0,0,21,22,23,55,0,19,21,22,
- 23,0,62,0,67,55,0,4,0,0,
- 68,69,62,4,0,0,55,3,81,0,
- 55,0,3,2,0,0,5,3,3,0,
- 0,0,3,3,20,0,0,55,0,20,
- 19,0,0,61,20,0,55,63,64,20,
- 42,0,0,63,64,0,55,42,6,63,
- 64,0,0,0,0,59,0,0,0,55,
- 0,68,69,0,0,67,0,68,69,0,
- 61,0,67,0,0,0,61,0,0,0,
- 59,61,0,0,0,59,55,0,0,0,
- 0,59,0,0,0,0,0,0,0,0,
- 65,0,0,78,59,0,0,79,0,0,
- 0,59,59,62,0,0,0,0,0,0,
+ 2,0,4,5,0,7,8,9,10,11,
+ 12,13,14,15,16,17,18,0,1,2,
+ 57,4,5,0,7,8,9,10,11,12,
+ 13,14,15,16,17,18,0,1,2,3,
+ 4,0,57,20,21,22,23,24,25,26,
+ 27,28,0,0,0,19,20,21,22,23,
+ 24,25,26,27,28,29,0,0,1,0,
+ 0,4,20,21,22,23,24,25,26,27,
+ 28,0,0,1,0,0,20,21,22,20,
+ 21,22,10,11,58,0,29,0,0,0,
+ 3,20,21,22,23,24,25,26,27,28,
+ 0,29,0,3,2,20,21,22,20,21,
+ 22,0,0,0,0,4,0,4,0,19,
+ 0,1,0,0,4,3,3,0,0,0,
+ 3,3,3,0,74,75,3,0,66,0,
+ 0,19,19,0,4,58,0,29,0,29,
+ 0,77,80,0,0,0,0,57,0,0,
+ 0,0,6,74,75,6,64,0,0,0,
+ 0,0,29,0,62,63,62,63,67,68,
+ 67,68,29,0,66,0,0,60,60,0,
+ 0,58,76,0,65,0,0,0,0,62,
+ 63,62,63,0,64,59,0,0,0,59,
+ 0,0,64,59,0,57,0,0,0,0,
+ 59,61,0,0,0,0,59,0,0,0,
+ 0,0,0,78,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0
+ 0
};
};
public final static byte termCheck[] = TermCheck.termCheck;
@@ -636,146 +639,147 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface TermAction {
public final static char termAction[] = {0,
- 2174,1,3816,1468,1,2161,2,1,1,1,
- 1,1,1,1,1,1,1,1,1,3809,
- 2184,3,3,3,3,2277,3,3,2,3,
- 3,3,1300,1140,726,1143,1400,332,1302,1353,
- 364,1346,2174,3,3,3,3,3,3,3,
- 3,3,3,3,3,3,3,3,3,872,
- 2182,9,2168,2168,2168,2168,2168,2168,2168,2168,
- 2168,2168,2168,2168,2168,2168,2168,2168,2168,2168,
- 2168,2168,2168,2168,2168,2168,2168,2168,2168,2168,
- 2168,2168,2168,2168,2168,2168,2168,2168,2168,2168,
- 2168,2168,2168,1,2168,2168,2168,2168,2168,2168,
- 2168,2168,2168,2168,2168,2168,2157,2168,2168,2168,
- 2432,2168,2174,1,3816,1468,1,2161,2,1,
+ 2190,1,3833,1307,1,3827,404,1,1,1,
+ 1,1,1,1,1,1,1,1,1,2198,
+ 1,1,1,1,1,1,1,1,1,156,
+ 2290,774,1109,721,1209,835,1441,669,1523,815,
+ 1268,777,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1693,2413,
+ 2196,7,2175,2175,2175,2175,2175,2175,2175,2175,
+ 2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,
+ 2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,
+ 512,2175,2175,2175,2175,2175,2175,2175,2175,2175,
+ 2175,2175,2175,2175,2175,2175,2175,2175,2175,2175,
+ 2175,2175,2175,2175,2175,2175,2175,2175,54,179,
+ 2166,2175,2190,1,3833,1307,1,3827,404,1,
1,1,1,1,1,1,1,1,1,1,
- 1,3809,2184,3,3,3,3,2277,3,3,
- 2,3,3,3,1300,1140,726,1143,1400,332,
- 1302,1353,364,1346,2,3,3,3,3,3,
- 3,3,3,3,3,3,3,2174,3,3,
- 3,872,2182,2174,1,3816,2185,1,2161,2,
+ 1,2198,1,1,1,1,1,1,1,1,
+ 1,1,2290,774,1109,721,1209,835,1441,669,
+ 1523,815,1268,777,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,2190,
+ 1782,1793,2196,2190,1,3833,2199,1,3827,404,
1,1,1,1,1,1,1,1,1,1,
- 1,1,3809,2184,3,3,3,3,2277,3,
- 3,2,3,3,3,1300,1140,726,1143,1400,
- 332,1302,1353,364,1346,2174,3,3,3,3,
- 3,3,3,3,3,3,3,3,73,3,
- 3,3,2174,1,3816,2185,1,2161,2,1,
+ 1,1,2198,1,1,1,1,1,1,1,
+ 1,1,28,2290,774,1109,721,1209,835,1441,
+ 669,1523,815,1268,777,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
- 1,3809,2184,3,3,3,3,2277,3,3,
- 2,3,3,3,1300,1140,726,1143,1400,332,
- 1302,1353,364,1346,2280,3,3,3,3,3,
- 3,3,3,3,3,3,3,65,3,3,
- 3,2174,3,3,2185,3,3,3,45,2174,
- 1715,2401,132,956,262,1336,2401,627,1,2174,
- 3,2184,3,3,3,3,2476,3,3,2174,
- 3,3,3,2389,2390,2391,2339,71,2340,2338,
- 2174,2392,2341,2337,3,3,3,3,3,3,
- 3,3,3,3,3,3,496,3,3,3,
- 2174,3,3,2185,3,3,1,1715,2401,209,
- 1000,2357,1207,594,2359,296,115,223,688,3,
- 2184,3,3,3,3,2476,3,3,2358,3,
- 3,3,979,958,937,916,895,853,874,832,
- 811,747,133,3,3,3,3,3,3,3,
- 3,3,3,3,3,1061,3,3,3,496,
- 270,691,221,2389,2390,2391,2339,2174,2340,2338,
- 2174,2392,2341,2337,295,2174,1,3816,2185,1,
- 3817,2,1,1,1,1,1,1,1,1,
- 1,1,1,1,2358,2184,2171,268,1336,2401,
- 2277,956,496,2,496,66,2174,1300,1140,726,
- 1143,1400,332,1302,1353,364,1346,2174,1,3816,
- 2185,1,3817,2,1,1,1,1,1,1,
- 1,1,1,1,1,1,2358,2184,1835,496,
- 265,1804,2277,2174,1,2,2174,649,69,1300,
- 1140,726,1143,1400,332,1302,1353,364,1346,2174,
- 1,3816,2185,1,3817,2,1,1,1,1,
- 1,1,1,1,1,1,1,1,2358,2184,
- 1207,594,496,75,2277,268,1804,2,2174,956,
- 271,1300,1140,726,1143,1400,332,1302,1353,364,
- 1346,2174,1,3816,2185,1,3817,2,1,1,
+ 2190,1,3833,2199,1,3827,404,1,1,1,
+ 1,1,1,1,1,1,1,1,1,2198,
+ 1,1,1,1,1,1,1,1,1,2217,
+ 2290,774,1109,721,1209,835,1441,669,1523,815,
+ 1268,777,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,2190,1906,1456,
+ 2190,1973,1466,2190,1957,1916,1965,2070,2063,2048,
+ 2200,2201,2202,2203,1888,1325,2190,2401,2402,2403,
+ 2352,2353,2351,2404,2354,2350,2190,1693,2413,2190,
+ 1342,1468,258,1321,2413,399,1,2190,1360,2357,
+ 2362,2361,2359,2360,2358,2363,2364,2356,2365,2366,
+ 2367,1270,1213,1183,2190,1,1,2199,1,1,
+ 42,597,2190,2190,51,2195,17,2178,179,2178,
+ 2178,1836,620,2198,1,1,1,1,1,1,
+ 1,1,1,2190,2488,2178,179,179,179,179,
+ 179,179,179,179,179,2178,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
- 2358,2184,2174,54,2174,1118,2277,496,355,2,
- 1882,1811,496,1300,1140,726,1143,1400,332,1302,
- 1353,364,1346,2174,1,3816,2185,1,3817,2,
+ 1,2190,1,1,2199,1,1,2190,2190,2370,
+ 2194,976,2371,339,2178,72,2190,292,2190,1981,
+ 2198,1,1,1,1,1,1,1,1,1,
+ 59,2488,2293,956,936,916,896,876,836,856,
+ 816,796,776,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,2190,2190,
+ 2370,2190,2190,2371,616,1139,219,1430,61,264,
+ 1321,2413,60,1342,291,2190,1,3833,2199,1,
+ 3827,404,1,1,1,1,1,1,1,1,
+ 1,1,1,1,2198,597,1412,2124,597,1743,
+ 1250,1182,690,2190,2096,2290,774,1109,721,1209,
+ 835,1441,669,1523,815,1268,777,2190,1,3833,
+ 2199,1,3827,404,1,1,1,1,1,1,
+ 1,1,1,1,1,1,2198,1743,1250,1182,
+ 690,1743,1250,1182,690,2190,2106,2290,774,1109,
+ 721,1209,835,1441,669,1523,815,1268,777,2190,
+ 1,3833,2199,1,3827,404,1,1,1,1,
+ 1,1,1,1,1,1,1,1,2198,2190,
+ 53,2370,2190,2108,2371,760,2190,1836,620,2290,
+ 774,1109,721,1209,835,1441,669,1523,815,1268,
+ 777,2190,1,3833,2199,1,3827,404,1,1,
1,1,1,1,1,1,1,1,1,1,
- 1,1,2358,2184,230,474,1405,191,2277,2174,
- 233,2,2174,893,70,1300,1140,726,1143,1400,
- 332,1302,1353,364,1346,2174,1,3816,2185,1,
- 3817,2,1,1,1,1,1,1,1,1,
- 1,1,1,1,2358,2184,190,56,2174,1697,
- 2277,2174,914,2,1882,1811,2174,1300,1140,726,
- 1143,1400,332,1302,1353,364,1346,2174,1,3816,
- 2185,1,3817,2,1,1,1,1,1,1,
- 1,1,1,1,1,1,2358,2184,2174,1848,
- 55,1118,2277,1,1804,2,2181,1882,1811,1300,
- 1140,726,1143,1400,332,1302,1353,364,1346,2174,
- 1,3816,2185,1,3817,2,1,1,1,1,
- 1,1,1,1,1,1,1,1,2358,2184,
- 1,1715,2401,2174,2277,496,134,2,2174,393,
- 2413,1300,1140,726,1143,1400,332,1302,1353,364,
- 1346,1,1715,2401,2180,67,2356,2389,2390,2391,
- 2339,1506,2340,2338,517,2392,2341,2337,62,3,
- 2355,2412,2389,2390,2391,2339,2174,2340,2338,2179,
- 2392,2341,2337,57,1,1336,2401,2181,30,1163,
- 2174,135,2174,2103,2344,2349,2348,2346,2347,2345,
- 2350,2351,2343,2352,2353,2354,2174,656,652,404,
- 64,2356,2389,2390,2391,2339,1,2340,2338,2158,
- 2392,2341,2337,159,212,2355,496,2389,2390,2391,
- 2339,2174,2340,2338,2432,2392,2341,2337,1783,1772,
- 1727,771,2178,2203,131,2180,716,1794,63,2344,
- 2349,2348,2346,2347,2345,2350,2351,2343,2352,2353,
- 2354,2174,656,652,404,2389,2390,2391,2339,2174,
- 2340,2338,2181,2392,2341,2337,2182,2174,192,3,
- 1783,1772,1727,771,935,453,1021,2344,2349,2348,
- 2346,2347,2345,2350,2351,2343,2352,2353,2354,1,
- 1806,2193,2179,797,2194,2174,2006,1994,2016,1291,
- 1145,344,2186,2187,2188,2189,1981,1957,1783,1772,
- 1727,771,2174,531,2174,1806,2193,2179,1891,2194,
- 2180,2006,1994,2016,1291,1145,344,2186,2187,2188,
- 2189,1981,1957,2174,2432,2174,1806,2193,1076,2026,
- 2194,998,2006,1994,2016,1291,1145,344,2186,2187,
- 2188,2189,1981,1957,250,2178,1,1806,2193,29,
- 2026,2194,998,2006,1994,2016,1291,1145,344,2186,
- 2187,2188,2189,1981,1957,1,1,1,61,251,
- 2178,2174,1806,2193,2179,2026,2194,2174,2006,1994,
- 2016,1291,1145,344,2186,2187,2188,2189,1981,1957,
- 1,1,1,2174,1903,2174,3,2174,2107,194,
- 3,1,1,119,1,2165,29,1,1,1,
- 1,1,1,1,1,1,1,1,1,3,
- 119,230,2174,44,68,2,2174,234,393,1019,
- 2174,716,1794,517,1,1806,2193,2178,2026,2194,
- 998,2006,1994,2016,1291,1145,344,2186,2187,2188,
- 2189,1981,1957,2174,1806,2193,194,2026,2194,1019,
- 2006,1994,2016,1291,1145,344,2186,2187,2188,2189,
- 1981,1957,1,1806,2193,2174,2026,2194,2183,2006,
- 1994,2016,1291,1145,344,2186,2187,2188,2189,1981,
- 1957,3,1,1,3,1,2165,193,1,1,
+ 2198,205,2190,2370,2370,2190,2371,2371,2190,2136,
+ 112,2290,774,1109,721,1209,835,1441,669,1523,
+ 815,1268,777,2190,1,3833,2199,1,3827,404,
1,1,1,1,1,1,1,1,1,1,
- 2174,1846,2193,2174,2026,2194,2174,2006,1994,2016,
- 1291,1145,344,2186,2187,2188,2189,1981,1957,2174,
- 1806,2193,2174,2026,2194,2182,2006,1994,2016,1291,
- 1145,344,2186,2187,2188,2189,1981,1957,2174,1856,
- 2193,2174,2026,2194,193,2006,1994,2016,1291,1145,
- 344,2186,2187,2188,2189,1981,1957,34,686,2174,
- 236,2357,51,224,2359,571,2057,2200,2201,2174,
- 237,2357,2174,224,2359,788,2174,2174,2358,2357,
- 224,2174,2359,851,2185,208,252,2174,2358,2357,
- 224,249,2359,2389,2390,2391,2358,253,2174,1334,
- 2205,2184,2174,2207,60,2181,2358,2389,2390,2391,
- 59,91,2389,2390,2391,224,58,2206,2389,2390,
- 2391,256,224,53,1220,224,2174,2057,2174,52,
- 2049,2036,224,2057,2174,288,1660,2185,708,1,
- 3775,208,119,1404,1,1,1404,2185,2181,2174,
- 1,2174,2185,93,2184,72,2174,1861,74,119,
- 1404,30,203,2180,2184,3,1097,716,1794,2184,
- 1183,2174,2174,716,1794,3,653,1272,1019,716,
- 1794,2174,1,1,2174,1408,2174,2174,2174,1676,
- 2174,2049,2036,2174,2174,1566,2174,2049,2036,2174,
- 119,2174,1653,2174,2174,2174,2180,2174,2174,2174,
- 2279,93,2174,2174,2174,1307,432,2174,2174,2174,
- 2174,1252,2174,2174,2174,2174,2174,2174,2174,2174,
- 2431,2174,2174,1061,2358,2174,2174,627,2174,2174,
- 2174,2357,2359,606
+ 1,1,2198,2190,52,2219,2190,2190,2220,2425,
+ 2190,1836,620,2290,774,1109,721,1209,835,1441,
+ 669,1523,815,1268,777,2190,1,3833,2199,1,
+ 3827,404,1,1,1,1,1,1,1,1,
+ 1,1,1,1,2198,204,187,1346,186,2187,
+ 1346,2190,1266,66,1296,2290,774,1109,721,1209,
+ 835,1441,669,1523,815,1268,777,2190,1,3833,
+ 2199,1,3827,404,1,1,1,1,1,1,
+ 1,1,1,1,1,1,2198,188,226,1,
+ 2190,2190,2190,1339,229,404,2190,2290,774,1109,
+ 721,1209,835,1441,669,1523,815,1268,777,2190,
+ 1,3833,2199,1,3827,404,1,1,1,1,
+ 1,1,1,1,1,1,1,1,2198,1055,
+ 2190,1,1693,346,2190,208,2368,2195,2190,2290,
+ 774,1109,721,1209,835,1441,669,1523,815,1268,
+ 777,2401,2402,2403,2352,2353,2351,2404,2354,2350,
+ 1,1321,2184,2195,1,1,1803,2169,2195,2165,
+ 1,1693,2413,2357,2362,2361,2359,2360,2358,2363,
+ 2364,2356,2365,2366,2367,1270,1213,1183,2190,597,
+ 2369,1508,2194,2368,597,48,741,1482,232,2026,
+ 233,220,1,220,1,116,246,190,2401,2402,
+ 2403,2352,2353,2351,2404,2354,2350,220,2194,220,
+ 70,116,68,2194,2196,128,1,1,1,1016,
+ 2357,2362,2361,2359,2360,2358,2363,2364,2356,2365,
+ 2366,2367,1270,1213,1183,2401,2402,2403,2352,2353,
+ 2351,2404,2354,2350,2190,220,2190,220,2190,220,
+ 116,220,2013,1989,190,2190,2190,2357,2362,2361,
+ 2359,2360,2358,2363,2364,2356,2365,2366,2367,1,
+ 1906,2207,2193,1805,2208,1108,1957,1916,1965,2070,
+ 2063,2048,2200,2201,2202,2203,1888,1325,558,580,
+ 64,2190,630,2190,1906,2207,2193,1849,2208,456,
+ 1957,1916,1965,2070,2063,2048,2200,2201,2202,2203,
+ 1888,1325,1884,2190,1906,2207,1069,1973,2208,1381,
+ 1957,1916,1965,2070,2063,2048,2200,2201,2202,2203,
+ 1888,1325,204,252,2192,1,1906,2207,27,1973,
+ 2208,1381,1957,1916,1965,2070,2063,2048,2200,2201,
+ 2202,2203,1888,1325,266,1609,1,2190,2192,2190,
+ 1906,2207,2193,1973,2208,247,1957,1916,1965,2070,
+ 2063,2048,2200,2201,2202,2203,1888,1325,226,65,
+ 2190,2190,2190,597,230,1,1,1,456,3211,
+ 1337,129,1,1906,2207,27,1973,2208,1381,1957,
+ 1916,1965,2070,2063,2048,2200,2201,2202,2203,1888,
+ 1325,2401,2402,2403,2352,2353,2351,2404,2354,2350,
+ 2444,2190,1906,2207,2192,1973,2208,1696,1957,1916,
+ 1965,2070,2063,2048,2200,2201,2202,2203,1888,1325,
+ 2190,1906,2207,2190,1973,2208,2199,1957,1916,1965,
+ 2070,2063,2048,2200,2201,2202,2203,1888,1325,1,
+ 1906,2207,2198,1973,2208,88,1957,1916,1965,2070,
+ 2063,2048,2200,2201,2202,2203,1888,1325,2190,1984,
+ 2207,2190,1973,2208,2190,1957,1916,1965,2070,2063,
+ 2048,2200,2201,2202,2203,1888,1325,2190,1987,2207,
+ 1670,1973,2208,130,1957,1916,1965,2070,2063,2048,
+ 2200,2201,2202,2203,1888,1325,18,2181,178,2181,
+ 2181,2190,996,2401,2402,2403,2352,2353,2351,2404,
+ 2354,2350,131,2190,2190,2181,178,178,178,178,
+ 178,178,178,178,178,2181,2190,261,1803,248,
+ 62,1,2401,2402,2403,2352,2353,2351,2404,2354,
+ 2350,132,31,342,69,2190,2401,2402,2403,2401,
+ 2402,2403,2214,2215,2181,249,597,1,245,63,
+ 2195,2401,2402,2403,2352,2353,2351,2404,2354,2350,
+ 2190,2112,1,2199,2172,2401,2402,2403,2401,2402,
+ 2403,50,58,49,57,2026,67,2026,284,2198,
+ 264,1803,1,2190,1342,2199,2199,2190,1,2190,
+ 2197,189,2193,1,1127,762,90,56,1550,55,
+ 1,2198,2198,217,1139,2194,2190,1142,1,597,
+ 199,580,1512,267,2190,71,41,1674,28,2190,
+ 2190,1,1696,1127,762,1696,2444,1,2190,2190,
+ 2190,2190,597,2190,1782,1793,1782,1793,2013,1989,
+ 2013,1989,597,2190,1925,2190,2190,2196,189,2190,
+ 2190,90,1055,2190,2192,2190,2190,2190,2190,1782,
+ 1793,1782,1793,2190,2444,2292,2190,2190,2190,1089,
+ 2190,2190,2443,1161,2190,534,2190,2190,2190,2190,
+ 2371,701,2190,2190,2190,2190,2370,2190,2190,2190,
+ 2190,2190,2190,558
};
};
public final static char termAction[] = TermAction.termAction;
@@ -783,35 +787,35 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface Asb {
public final static char asb[] = {0,
- 359,1,466,387,359,466,389,569,393,405,
- 405,36,36,405,36,405,469,213,389,34,
- 469,569,305,310,309,538,537,213,63,438,
- 94,157,94,157,318,94,389,413,421,213,
- 329,469,389,114,234,45,389,439,157,157,
- 157,157,318,318,413,492,389,329,543,469,
- 387,137,134,492,271,454,19,19,19,19,
- 19,118,19,19,19,265,282,287,285,293,
- 289,296,295,298,297,299,234,43,19,63,
- 537,438,17,306,306,261,34,3,34,34,
- 19,306,428,112,19,112,157,183,107,157,
- 157,183,321,431,321,318,492,413,331,569,
- 469,389,492,134,117,114,19,19,19,19,
- 19,19,19,19,19,19,19,421,421,498,
- 454,454,261,261,215,19,19,19,19,19,
- 19,19,19,19,19,19,19,19,19,19,
- 19,19,19,19,19,236,43,436,306,306,
- 19,496,19,19,302,34,438,112,3,183,
- 109,183,183,19,261,321,413,421,416,420,
- 19,19,134,118,45,213,326,419,418,421,
- 421,421,134,285,285,282,282,289,289,287,
- 287,287,287,295,293,297,296,112,298,420,
- 321,425,421,34,421,421,19,452,439,305,
- 19,304,183,325,213,331,134,134,43,498,
- 421,186,329,504,569,19,391,183,41,541,
- 261,19,424,3,19,3,3,17,306,438,
- 109,19,186,416,43,421,331,45,134,261,
- 19,421,437,306,17,321,421,134,306,3,
- 215,306,183,421,215,3,421,3
+ 441,1,261,406,441,576,474,486,486,574,
+ 574,486,574,486,263,359,408,397,472,408,
+ 233,51,3,51,3,176,51,408,494,502,
+ 359,71,72,293,263,576,227,545,544,359,
+ 145,234,3,3,3,3,176,176,494,286,
+ 408,293,102,295,263,408,84,408,233,342,
+ 228,228,320,472,472,329,472,472,228,233,
+ 69,344,69,406,249,3,29,64,263,3,
+ 3,29,178,182,178,176,286,494,295,125,
+ 122,286,193,249,344,344,344,344,344,106,
+ 344,344,344,187,204,209,207,215,211,218,
+ 217,220,219,221,502,497,501,550,82,344,
+ 145,544,231,228,344,228,247,344,323,344,
+ 344,234,69,329,408,224,361,361,29,66,
+ 29,29,344,320,178,494,501,286,122,105,
+ 102,344,344,344,344,344,344,344,344,344,
+ 344,344,502,502,505,249,249,320,320,32,
+ 344,344,344,344,344,344,344,344,344,344,
+ 344,344,344,344,344,344,344,344,344,344,
+ 499,500,290,359,295,82,342,228,502,472,
+ 502,502,233,344,227,344,226,29,410,344,
+ 344,122,106,84,359,290,502,502,502,122,
+ 207,207,204,204,211,211,209,209,209,209,
+ 217,215,219,218,69,220,293,502,412,497,
+ 178,326,228,342,329,344,329,329,66,344,
+ 122,122,82,505,412,511,576,344,295,502,
+ 29,80,548,320,344,325,32,228,502,232,
+ 82,502,84,122,320,344,502,32,228,329,
+ 178,122,329,502,29,329
};
};
public final static char asb[] = Asb.asb;
@@ -819,63 +823,64 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface Asr {
public final static byte asr[] = {0,
- 74,0,28,6,34,36,19,39,41,37,
- 32,38,35,33,40,25,20,3,13,14,
- 15,16,2,5,10,11,9,4,7,8,
- 17,18,12,1,0,2,19,5,6,0,
- 3,60,42,67,1,13,14,15,16,2,
- 5,10,11,9,4,7,8,17,18,12,
- 6,0,26,43,21,44,56,27,45,29,
- 46,47,30,22,48,49,24,57,31,58,
- 50,51,23,52,53,54,19,5,3,62,
- 55,20,0,26,21,27,29,30,22,24,
- 31,23,42,55,61,6,20,3,4,2,
- 1,59,0,21,22,23,24,10,11,9,
+ 73,0,24,42,20,43,54,25,44,26,
+ 45,46,27,21,47,48,23,55,28,56,
+ 49,50,22,51,52,53,2,5,60,3,
+ 0,3,58,12,13,14,15,16,2,5,
+ 1,10,11,9,4,7,8,17,18,0,
+ 24,20,25,26,27,21,23,28,22,29,
+ 57,58,6,19,3,4,2,1,59,0,
+ 1,3,59,61,57,58,19,29,0,3,
+ 60,29,66,1,13,14,15,16,2,5,
+ 10,11,9,4,7,8,17,18,12,6,
+ 0,20,21,22,23,10,11,9,4,7,
+ 8,17,18,12,1,2,5,13,14,15,
+ 16,65,3,0,20,21,22,10,11,9,
4,7,8,17,18,12,1,2,5,13,
- 14,15,16,66,3,0,21,22,23,10,
- 11,9,4,7,8,17,18,12,1,2,
- 5,13,14,15,16,0,26,43,21,44,
- 56,27,45,29,46,47,30,22,48,49,
- 24,57,31,58,50,51,23,52,53,54,
- 19,5,60,3,0,26,43,21,44,56,
- 27,45,29,46,47,30,22,48,49,24,
- 57,31,58,50,51,23,52,53,54,19,
- 5,65,4,0,3,61,12,13,14,15,
- 16,2,5,1,10,11,9,4,7,8,
- 17,18,0,3,61,26,43,21,44,56,
- 27,45,29,46,47,30,22,48,49,24,
- 57,31,58,50,51,23,52,53,54,65,
- 2,19,5,0,42,1,67,81,10,11,
- 62,84,85,86,87,88,90,89,91,92,
- 93,4,68,69,7,8,64,63,70,71,
- 72,73,75,76,9,77,78,79,60,82,
- 83,66,61,59,55,20,3,0,1,3,
- 59,62,55,61,20,42,0,2,19,5,
- 3,60,55,0,2,4,1,42,3,61,
- 26,43,21,44,56,27,45,29,46,47,
- 30,22,48,49,24,57,31,58,50,51,
- 23,52,53,54,19,5,65,0,74,26,
- 43,21,44,56,27,45,29,46,47,30,
- 22,48,49,24,57,31,58,50,51,23,
- 52,53,54,19,5,25,20,3,4,1,
- 2,0,51,43,48,46,47,45,44,49,
- 50,52,53,54,59,20,31,27,24,26,
- 30,29,21,22,23,4,2,1,42,55,
- 61,3,0,62,42,67,0,6,28,0,
- 3,55,60,62,0,74,80,60,28,6,
- 34,36,39,41,37,32,38,35,33,40,
- 25,20,3,13,14,15,16,12,10,11,
- 9,7,8,17,18,2,1,4,19,5,
- 56,57,58,51,43,48,46,47,45,44,
- 49,50,52,53,54,31,27,24,26,30,
- 29,21,22,23,0,32,0,3,61,4,
- 1,42,0,9,4,7,8,68,69,63,
- 64,70,71,72,73,75,76,77,78,79,
- 82,83,59,84,85,86,87,88,89,90,
- 91,92,93,66,61,60,6,3,55,20,
- 62,0,26,43,21,44,56,27,45,29,
- 46,47,30,22,48,49,24,57,31,58,
- 50,51,23,52,53,54,19,5,6,0
+ 14,15,16,0,24,42,20,43,54,25,
+ 44,26,45,46,27,21,47,48,23,55,
+ 28,56,49,50,22,51,52,53,2,5,
+ 3,61,57,19,0,2,5,3,60,57,
+ 0,3,57,60,61,0,29,1,66,80,
+ 10,11,61,83,84,85,86,87,89,88,
+ 90,91,92,4,67,68,7,8,63,62,
+ 69,70,71,72,74,75,9,76,77,78,
+ 60,81,82,65,58,59,57,19,3,0,
+ 73,79,60,33,35,6,39,41,36,31,
+ 37,38,34,32,40,30,3,19,13,14,
+ 15,16,10,11,9,7,8,17,18,12,
+ 4,1,5,2,54,55,56,50,42,47,
+ 45,46,44,43,48,49,51,52,53,28,
+ 25,23,24,27,26,20,21,22,0,4,
+ 1,29,58,3,24,42,20,43,54,25,
+ 44,26,45,46,27,21,47,48,23,55,
+ 28,56,49,50,22,51,52,53,64,2,
+ 5,0,31,0,61,29,66,0,33,35,
+ 6,39,41,36,31,37,38,34,32,40,
+ 30,19,3,10,11,9,7,8,17,18,
+ 12,1,2,5,13,14,15,16,4,0,
+ 66,80,10,11,9,7,8,67,68,62,
+ 63,69,70,71,72,74,75,76,77,78,
+ 81,82,61,83,84,85,86,87,88,89,
+ 90,91,92,57,29,58,24,20,25,26,
+ 27,21,23,28,22,19,3,4,1,2,
+ 0,24,42,20,43,54,25,44,26,45,
+ 46,27,21,47,48,23,55,28,56,49,
+ 50,22,51,52,53,2,5,64,4,0,
+ 73,24,42,20,43,54,25,44,26,45,
+ 46,27,21,47,48,23,55,28,56,49,
+ 50,22,51,52,53,2,5,4,19,3,
+ 30,1,0,50,42,47,45,46,44,43,
+ 48,49,51,52,53,59,19,28,25,23,
+ 24,27,26,20,21,22,4,2,1,29,
+ 57,58,3,0,3,58,4,1,29,0,
+ 9,4,7,8,67,68,62,63,69,70,
+ 71,72,74,75,76,77,78,81,82,59,
+ 83,84,85,86,87,88,89,90,91,92,
+ 65,58,60,6,3,57,19,61,0,24,
+ 42,20,43,54,25,44,26,45,46,27,
+ 21,47,48,23,55,28,56,49,50,22,
+ 51,52,53,2,5,6,0
};
};
public final static byte asr[] = Asr.asr;
@@ -883,35 +888,35 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface Nasb {
public final static char nasb[] = {0,
- 91,10,132,24,124,1,78,34,107,108,
- 108,15,15,108,15,108,103,50,110,10,
- 132,34,25,52,52,10,10,50,10,20,
- 10,132,10,132,132,10,17,132,28,50,
- 46,74,110,36,46,32,79,40,132,134,
- 132,134,15,132,132,101,81,27,142,132,
- 24,31,38,101,10,119,32,32,32,32,
- 32,37,32,32,32,10,10,10,10,10,
- 10,10,10,10,10,10,27,132,32,10,
- 10,54,23,25,25,15,10,11,10,10,
- 32,25,10,10,32,10,134,21,24,97,
- 134,21,72,10,10,15,101,68,60,10,
- 4,110,101,38,37,68,32,32,32,32,
- 32,32,32,32,32,32,32,28,28,115,
- 119,119,66,66,63,121,32,32,32,32,
- 32,32,32,32,32,32,32,32,32,32,
- 32,32,32,121,32,138,31,10,25,25,
- 121,10,121,121,10,10,20,10,11,21,
- 110,21,21,32,15,72,68,28,85,10,
- 32,32,38,37,32,50,114,52,52,28,
- 28,28,38,10,10,10,10,10,10,10,
- 10,10,10,10,10,10,10,10,10,28,
- 72,70,28,10,28,28,32,128,40,25,
- 32,10,21,84,50,60,38,38,132,88,
- 28,48,27,10,10,32,10,21,30,10,
- 15,32,95,11,121,11,11,131,25,54,
- 110,32,48,86,31,28,60,32,38,15,
- 32,28,10,25,131,72,28,38,25,11,
- 131,25,21,28,131,11,28,11
+ 121,25,16,68,26,9,75,76,76,50,
+ 50,76,50,76,71,113,117,25,25,94,
+ 30,25,57,25,57,57,25,33,57,92,
+ 113,36,36,91,57,9,69,25,25,113,
+ 25,46,57,59,57,59,50,57,57,11,
+ 97,91,42,56,85,117,7,95,52,67,
+ 69,69,50,25,25,102,25,25,69,30,
+ 25,7,25,68,1,59,31,68,19,107,
+ 59,31,65,25,25,50,11,63,130,39,
+ 44,11,25,139,7,7,7,7,7,43,
+ 7,7,7,25,25,25,25,25,25,25,
+ 25,25,25,25,92,79,25,134,57,7,
+ 25,25,25,69,7,69,143,140,25,140,
+ 140,46,25,102,117,25,25,25,31,117,
+ 31,31,7,50,65,63,92,11,44,43,
+ 63,7,7,7,7,7,7,7,7,7,
+ 7,7,92,92,126,139,139,115,115,13,
+ 140,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,140,7,
+ 36,36,78,113,56,39,145,69,92,25,
+ 92,92,52,7,69,7,25,31,25,7,
+ 7,44,43,7,113,125,92,92,92,44,
+ 25,25,25,25,25,25,25,25,25,25,
+ 25,25,25,25,25,25,91,92,111,80,
+ 65,89,69,145,102,140,102,102,117,7,
+ 44,44,57,82,111,25,25,7,56,92,
+ 31,38,25,50,7,100,145,69,92,25,
+ 39,92,7,44,50,7,92,145,69,102,
+ 65,44,102,92,31,102
};
};
public final static char nasb[] = Nasb.nasb;
@@ -919,21 +924,21 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface Nasr {
public final static char nasr[] = {0,
- 31,1,98,93,92,91,90,89,88,0,
- 26,36,1,37,25,0,31,33,0,1,
- 35,0,27,1,19,0,1,24,0,83,
- 1,5,0,102,0,1,5,34,0,21,
- 23,25,36,1,86,26,0,21,23,55,
- 0,47,0,26,1,36,25,68,35,21,
- 23,0,1,104,0,84,0,28,0,111,
- 0,67,0,23,21,115,0,1,33,46,
- 31,44,0,24,1,31,44,60,59,0,
- 114,23,21,0,113,0,21,54,64,0,
- 73,0,76,77,78,79,69,49,0,44,
- 31,1,0,24,59,60,1,0,21,54,
- 1,27,0,23,21,100,0,21,23,48,
- 62,1,0,72,21,54,0,107,21,23,
- 0,26,21,23,48,30,0
+ 83,82,81,80,79,78,5,0,101,0,
+ 75,0,1,103,0,29,1,97,83,82,
+ 81,80,79,78,0,22,1,99,0,1,
+ 33,0,29,31,0,45,0,87,5,1,
+ 0,1,5,32,0,1,22,34,91,24,
+ 0,34,24,68,33,22,1,0,74,1,
+ 52,0,25,0,67,0,27,1,19,0,
+ 69,70,71,72,61,47,0,23,1,29,
+ 42,58,57,0,22,1,113,0,109,0,
+ 1,23,0,1,31,44,29,42,0,111,
+ 0,24,34,1,35,0,1,52,64,0,
+ 1,22,53,0,88,0,42,29,1,0,
+ 112,22,1,0,23,57,58,1,0,105,
+ 1,22,0,1,22,46,28,0,52,1,
+ 27,0,22,46,1,60,0
};
};
public final static char nasr[] = Nasr.nasr;
@@ -941,16 +946,16 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface TerminalIndex {
public final static char terminalIndex[] = {0,
- 2,85,88,9,87,3,10,11,8,6,
- 7,68,81,82,83,84,12,13,86,93,
- 48,64,76,69,94,44,55,57,60,63,
- 72,77,45,46,49,50,51,58,59,65,
- 71,1,47,52,56,61,62,66,67,74,
- 75,78,79,80,42,54,70,73,29,92,
- 91,31,16,17,30,90,4,14,15,18,
- 19,20,21,95,22,23,24,25,26,53,
- 5,27,28,32,33,34,35,36,37,38,
- 39,40,41,89
+ 2,85,87,9,86,3,10,11,8,6,
+ 7,68,81,82,83,84,12,13,92,48,
+ 64,76,69,44,55,60,63,72,1,93,
+ 77,45,46,49,50,51,57,58,59,65,
+ 71,47,52,56,61,62,66,67,74,75,
+ 78,79,80,54,70,73,42,90,29,91,
+ 31,16,17,30,89,4,14,15,18,19,
+ 20,21,94,22,23,24,25,26,53,5,
+ 27,28,32,33,34,35,36,37,38,39,
+ 40,41,88
};
};
public final static char terminalIndex[] = TerminalIndex.terminalIndex;
@@ -958,18 +963,18 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface NonterminalIndex {
public final static char nonterminalIndex[] = {0,
- 0,0,0,0,101,105,106,107,108,109,
- 110,111,112,113,114,115,116,117,99,0,
- 0,118,128,97,124,0,100,136,0,123,
- 157,0,160,96,98,119,122,0,0,0,
- 0,0,154,156,0,158,159,127,135,0,
- 0,146,0,149,155,121,168,171,172,173,
- 0,0,145,148,161,167,0,126,138,0,
- 0,147,166,170,103,139,140,141,142,143,
- 144,153,174,102,104,125,129,130,131,132,
- 133,134,137,151,0,0,152,162,165,179,
- 0,181,0,0,120,150,163,164,169,175,
- 176,0,177,178,180,0
+ 0,0,0,0,100,104,105,106,107,108,
+ 109,110,111,112,113,114,115,116,98,0,
+ 117,127,96,123,135,0,99,122,156,0,
+ 159,95,97,118,121,0,0,0,0,0,
+ 153,155,0,157,158,126,134,0,0,0,
+ 145,148,154,120,167,170,171,172,0,0,
+ 137,144,0,147,160,166,0,125,138,139,
+ 140,141,0,146,165,169,102,129,130,131,
+ 132,133,136,142,143,152,173,101,103,119,
+ 124,128,150,0,0,151,161,164,178,0,
+ 180,0,0,149,162,163,168,174,175,0,
+ 176,177,179,0
};
};
public final static char nonterminalIndex[] = NonterminalIndex.nonterminalIndex;
@@ -977,10 +982,10 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopePrefix {
public final static char scopePrefix[] = {
- 173,84,33,39,69,91,111,117,142,12,
- 19,49,123,128,151,26,45,101,169,188,
- 192,156,1,1,30,54,81,196,6,105,
- 163,133,163,97,57,57,57
+ 168,80,33,39,87,107,113,138,12,19,
+ 49,67,119,124,26,45,97,147,164,183,
+ 187,151,1,1,30,54,77,191,6,101,
+ 158,129,158,93,57,57,57
};
};
public final static char scopePrefix[] = ScopePrefix.scopePrefix;
@@ -988,10 +993,10 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeSuffix {
public final static char scopeSuffix[] = {
- 17,17,4,4,24,17,17,17,148,17,
- 24,4,17,17,17,24,4,99,24,24,
- 4,160,4,4,24,4,24,24,9,108,
- 166,136,181,99,65,59,75
+ 17,17,4,4,17,17,17,144,17,24,
+ 4,24,17,17,24,4,95,17,24,24,
+ 4,155,4,4,24,4,24,24,9,104,
+ 161,132,176,95,64,59,72
};
};
public final static char scopeSuffix[] = ScopeSuffix.scopeSuffix;
@@ -999,10 +1004,10 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeLhs {
public final static char scopeLhs[] = {
- 5,78,47,47,33,78,76,76,40,63,
- 61,47,76,76,30,61,47,64,6,5,
- 5,18,113,112,59,47,31,3,83,64,
- 7,41,5,64,33,46,33
+ 5,71,45,45,71,69,69,38,62,59,
+ 45,31,69,69,59,45,64,28,6,5,
+ 5,18,111,110,57,45,29,3,87,64,
+ 7,39,5,64,31,44,31
};
};
public final static char scopeLhs[] = ScopeLhs.scopeLhs;
@@ -1010,10 +1015,10 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeLa {
public final static byte scopeLa[] = {
- 60,60,66,66,61,60,60,60,80,60,
- 61,66,60,60,60,61,66,20,61,61,
- 66,59,66,66,61,66,61,61,62,2,
- 61,32,61,20,1,1,1
+ 60,60,65,65,60,60,60,79,60,58,
+ 65,58,60,60,58,65,19,60,58,58,
+ 65,59,65,65,58,65,58,58,61,2,
+ 58,31,58,19,1,1,1
};
};
public final static byte scopeLa[] = ScopeLa.scopeLa;
@@ -1021,10 +1026,10 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeStateSet {
public final static byte scopeStateSet[] = {
- 25,111,86,86,97,111,111,111,12,80,
- 90,86,111,111,11,90,86,5,25,25,
- 25,55,1,3,90,86,97,25,82,5,
- 28,12,25,5,97,99,97
+ 5,112,87,87,112,112,112,74,61,91,
+ 87,98,112,112,91,87,67,73,5,5,
+ 5,35,1,3,91,87,98,5,63,67,
+ 8,74,5,67,98,100,98
};
};
public final static byte scopeStateSet[] = ScopeStateSet.scopeStateSet;
@@ -1032,26 +1037,26 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeRhs {
public final static char scopeRhs[] = {0,
- 150,42,0,96,0,204,95,0,31,145,
- 0,161,179,95,6,0,98,0,159,95,
- 1,153,0,97,0,159,95,1,0,168,
- 1,0,116,24,193,95,42,0,116,193,
- 95,24,42,0,116,24,42,0,116,193,
- 95,42,0,116,42,0,125,0,2,0,
- 0,163,97,0,2,0,97,0,159,95,
- 120,1,125,0,2,0,0,161,97,0,
- 146,1,0,161,190,95,6,119,56,0,
- 161,190,95,6,56,0,148,0,99,0,
- 200,95,148,0,95,148,0,150,99,0,
- 165,95,6,119,58,0,165,95,6,119,
- 57,0,165,95,6,58,0,165,95,6,
- 57,0,131,37,0,77,2,100,97,99,
- 0,131,118,121,1,39,0,53,122,0,
- 180,95,6,120,0,121,83,111,0,29,
- 117,0,169,1,0,97,106,0,169,1,
- 12,0,161,179,95,6,118,169,1,0,
- 97,3,0,104,0,98,0,198,1,99,
- 0,121,42,99,0,121,1,0
+ 147,29,0,95,0,201,94,0,31,144,
+ 0,160,182,94,6,0,97,0,158,94,
+ 1,150,0,96,0,158,94,1,0,169,
+ 1,0,114,23,191,94,29,0,114,191,
+ 94,23,29,0,114,23,29,0,114,191,
+ 94,29,0,114,29,0,122,0,2,0,
+ 162,96,0,2,96,0,158,94,1,122,
+ 0,2,0,160,96,0,144,1,0,160,
+ 188,94,6,117,54,0,160,188,94,6,
+ 54,0,145,0,98,0,197,94,145,0,
+ 94,145,0,149,98,0,166,94,6,117,
+ 56,0,166,94,6,117,55,0,166,94,
+ 6,56,0,166,94,6,55,0,128,36,
+ 0,77,2,99,96,98,0,128,116,120,
+ 1,39,0,53,121,0,184,94,6,0,
+ 120,82,110,0,29,116,0,170,1,0,
+ 96,105,0,170,1,12,0,160,182,94,
+ 6,116,170,1,0,96,3,0,103,0,
+ 97,0,196,1,98,0,120,29,98,0,
+ 120,1,0
};
};
public final static char scopeRhs[] = ScopeRhs.scopeRhs;
@@ -1059,18 +1064,18 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface ScopeState {
public final static char scopeState[] = {0,
- 1398,0,1138,0,2027,1470,2014,1953,1918,0,
- 2066,1570,1543,1516,1205,1489,1462,1435,1116,1408,
- 332,659,625,0,1291,1145,344,2069,1891,474,
- 1061,627,517,1118,1783,1772,1727,771,1207,594,
- 1882,1811,1794,716,2057,2049,2036,2026,2016,797,
- 2006,1994,1981,1957,1272,1252,1183,1307,1163,1097,
- 1076,1040,1021,1000,979,958,937,916,895,874,
- 853,832,811,747,573,726,552,531,496,606,
- 453,409,432,312,0,1292,1182,783,658,1641,
- 1944,1336,1804,1298,1763,0,345,310,1641,1676,
- 1336,1298,1619,1602,1809,1711,1660,1715,1332,0,
- 717,1548,310,0
+ 1440,0,1354,0,2070,2063,2048,2040,1849,1412,
+ 580,558,456,1055,1743,1250,1182,690,1127,762,
+ 1836,620,1793,1782,2026,2013,1989,1973,1965,1805,
+ 1957,1916,1888,1325,1142,1108,1161,1089,1069,1035,
+ 1016,996,976,956,936,916,896,876,856,836,
+ 816,796,776,670,741,650,630,306,721,597,
+ 701,512,492,534,470,0,1882,1445,1865,1863,
+ 1210,0,1902,1649,1627,1605,1583,1558,1529,1367,
+ 1482,1280,1441,1205,1180,0,1585,1570,1261,511,
+ 1886,307,1803,1321,1813,1234,0,418,372,1674,
+ 307,1321,1495,1443,1234,1729,1670,1531,1408,1693,
+ 0,345,306,1286,372,0
};
};
public final static char scopeState[] = ScopeState.scopeState;
@@ -1078,35 +1083,35 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public interface InSymb {
public final static char inSymb[] = {0,
- 0,197,115,117,208,95,95,192,182,183,
- 184,58,57,185,56,186,187,95,1,125,
- 202,192,181,138,125,175,127,95,140,6,
- 119,6,119,6,6,119,149,4,146,95,
- 1,95,55,42,1,62,149,95,6,95,
- 6,95,95,6,4,95,149,120,209,115,
- 117,24,116,95,100,1,12,18,17,8,
- 7,4,9,11,10,99,102,104,103,106,
- 105,108,107,110,109,111,120,6,4,140,
- 127,180,40,33,35,38,32,37,41,39,
- 95,130,120,36,34,119,95,165,148,166,
- 95,165,190,119,191,95,95,167,95,120,
- 95,95,95,116,193,167,93,92,91,89,
- 90,88,87,86,85,84,62,169,121,148,
- 1,1,81,67,1,42,69,68,4,63,
- 64,8,7,76,75,73,72,71,70,77,
- 9,79,78,83,82,95,95,3,121,119,
- 1,131,1,1,199,28,6,150,59,165,
- 95,165,161,62,55,190,167,159,117,160,
- 193,24,116,4,118,95,1,154,153,169,
- 169,198,121,103,103,102,102,105,105,104,
- 104,104,104,107,106,109,108,121,110,201,
- 179,95,121,32,121,121,55,1,95,200,
- 59,146,161,1,95,55,116,116,6,149,
- 168,95,1,118,118,59,55,161,55,204,
- 67,42,205,118,1,118,118,142,156,180,
- 55,59,95,149,95,159,95,62,150,67,
- 42,121,131,156,113,179,159,150,118,80,
- 113,156,161,156,113,118,156,118
+ 0,195,94,115,205,190,171,172,173,56,
+ 55,174,54,175,176,94,1,2,122,94,
+ 6,117,6,117,6,6,117,146,4,144,
+ 94,122,135,1,199,190,185,178,124,94,
+ 137,94,6,94,6,94,94,6,4,94,
+ 146,1,29,94,94,57,61,146,184,40,
+ 32,34,38,37,31,36,41,39,127,6,
+ 35,33,117,115,94,94,166,145,94,167,
+ 94,166,188,117,189,94,94,168,94,23,
+ 114,94,99,1,12,18,17,8,7,4,
+ 9,11,10,98,101,103,102,105,104,107,
+ 106,109,108,110,158,115,159,206,6,4,
+ 137,124,3,120,94,117,1,1,128,1,
+ 1,94,147,59,94,183,2,5,166,94,
+ 166,160,61,57,188,168,198,94,114,191,
+ 168,92,91,90,88,89,87,86,85,84,
+ 83,61,170,120,145,1,1,80,66,1,
+ 29,68,67,4,62,63,8,7,75,74,
+ 72,71,70,69,76,9,78,77,82,81,
+ 150,151,1,94,57,94,139,153,120,31,
+ 120,120,184,57,197,59,144,160,57,191,
+ 23,114,4,116,94,1,170,170,196,120,
+ 102,102,101,101,104,104,103,103,103,103,
+ 106,105,108,107,120,109,1,169,94,146,
+ 182,94,153,112,116,1,116,116,57,59,
+ 114,114,6,146,94,116,116,59,94,158,
+ 160,57,201,66,29,202,112,153,120,128,
+ 94,158,61,147,66,29,153,112,116,79,
+ 182,147,116,153,160,116
};
};
public final static char inSymb[] = InSymb.inSymb;
@@ -1200,7 +1205,6 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
"charconst",
"stringlit",
"identifier",
- "TypedefName",
"Completion",
"EndOfCompletion",
"Invalid",
@@ -1307,7 +1311,7 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public final String name(int index) { return name[index]; }
public final static int
- ERROR_SYMBOL = 25,
+ ERROR_SYMBOL = 30,
SCOPE_UBOUND = 36,
SCOPE_SIZE = 37,
MAX_NAME_LENGTH = 38;
@@ -1318,20 +1322,20 @@ public class C99Parserprs implements lpg.lpgjavaruntime.ParseTable, C99Parsersym
public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
public final static int
- NUM_STATES = 288,
- NT_OFFSET = 94,
- LA_STATE_OFFSET = 2483,
+ NUM_STATES = 286,
+ NT_OFFSET = 93,
+ LA_STATE_OFFSET = 2495,
MAX_LA = 2147483647,
- NUM_RULES = 309,
- NUM_NONTERMINALS = 116,
- NUM_SYMBOLS = 210,
+ NUM_RULES = 305,
+ NUM_NONTERMINALS = 114,
+ NUM_SYMBOLS = 207,
SEGMENT_SIZE = 8192,
- START_STATE = 1366,
+ START_STATE = 1719,
IDENTIFIER_SYMBOL = 0,
- EOFT_SYMBOL = 74,
- EOLT_SYMBOL = 74,
- ACCEPT_ACTION = 2157,
- ERROR_ACTION = 2174;
+ EOFT_SYMBOL = 73,
+ EOLT_SYMBOL = 73,
+ ACCEPT_ACTION = 2165,
+ ERROR_ACTION = 2190;
public final static boolean BACKTRACK = true;
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parsersym.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parsersym.java
index f65bafc130..76e4707d4f 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parsersym.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parsersym.java
@@ -15,57 +15,56 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
public interface C99Parsersym {
public final static int
- TK_auto = 26,
- TK_break = 33,
- TK_case = 34,
- TK_char = 43,
- TK_const = 21,
- TK_continue = 35,
- TK_default = 36,
- TK_do = 37,
- TK_double = 44,
- TK_else = 80,
- TK_enum = 56,
- TK_extern = 27,
- TK_float = 45,
- TK_for = 28,
+ TK_auto = 24,
+ TK_break = 32,
+ TK_case = 33,
+ TK_char = 42,
+ TK_const = 20,
+ TK_continue = 34,
+ TK_default = 35,
+ TK_do = 36,
+ TK_double = 43,
+ TK_else = 79,
+ TK_enum = 54,
+ TK_extern = 25,
+ TK_float = 44,
+ TK_for = 37,
TK_goto = 38,
TK_if = 39,
- TK_inline = 29,
- TK_int = 46,
- TK_long = 47,
- TK_register = 30,
- TK_restrict = 22,
+ TK_inline = 26,
+ TK_int = 45,
+ TK_long = 46,
+ TK_register = 27,
+ TK_restrict = 21,
TK_return = 40,
- TK_short = 48,
- TK_signed = 49,
+ TK_short = 47,
+ TK_signed = 48,
TK_sizeof = 12,
- TK_static = 24,
- TK_struct = 57,
+ TK_static = 23,
+ TK_struct = 55,
TK_switch = 41,
- TK_typedef = 31,
- TK_union = 58,
- TK_unsigned = 50,
- TK_void = 51,
- TK_volatile = 23,
- TK_while = 32,
- TK__Bool = 52,
- TK__Complex = 53,
- TK__Imaginary = 54,
+ TK_typedef = 28,
+ TK_union = 56,
+ TK_unsigned = 49,
+ TK_void = 50,
+ TK_volatile = 22,
+ TK_while = 31,
+ TK__Bool = 51,
+ TK__Complex = 52,
+ TK__Imaginary = 53,
TK_integer = 13,
TK_floating = 14,
TK_charconst = 15,
TK_stringlit = 16,
TK_identifier = 2,
- TK_TypedefName = 19,
TK_Completion = 5,
TK_EndOfCompletion = 3,
- TK_Invalid = 94,
- TK_LeftBracket = 42,
+ TK_Invalid = 93,
+ TK_LeftBracket = 29,
TK_LeftParen = 1,
TK_LeftBrace = 6,
- TK_Dot = 67,
- TK_Arrow = 81,
+ TK_Dot = 66,
+ TK_Arrow = 80,
TK_PlusPlus = 10,
TK_MinusMinus = 11,
TK_And = 9,
@@ -74,41 +73,41 @@ public interface C99Parsersym {
TK_Minus = 8,
TK_Tilde = 17,
TK_Bang = 18,
- TK_Slash = 68,
- TK_Percent = 69,
- TK_RightShift = 63,
- TK_LeftShift = 64,
- TK_LT = 70,
- TK_GT = 71,
- TK_LE = 72,
- TK_GE = 73,
- TK_EQ = 75,
- TK_NE = 76,
- TK_Caret = 77,
- TK_Or = 78,
- TK_AndAnd = 79,
- TK_OrOr = 82,
- TK_Question = 83,
+ TK_Slash = 67,
+ TK_Percent = 68,
+ TK_RightShift = 62,
+ TK_LeftShift = 63,
+ TK_LT = 69,
+ TK_GT = 70,
+ TK_LE = 71,
+ TK_GE = 72,
+ TK_EQ = 74,
+ TK_NE = 75,
+ TK_Caret = 76,
+ TK_Or = 77,
+ TK_AndAnd = 78,
+ TK_OrOr = 81,
+ TK_Question = 82,
TK_Colon = 59,
- TK_DotDotDot = 65,
- TK_Assign = 62,
- TK_StarAssign = 84,
- TK_SlashAssign = 85,
- TK_PercentAssign = 86,
- TK_PlusAssign = 87,
- TK_MinusAssign = 88,
- TK_RightShiftAssign = 89,
- TK_LeftShiftAssign = 90,
- TK_AndAssign = 91,
- TK_CaretAssign = 92,
- TK_OrAssign = 93,
- TK_Comma = 55,
- TK_RightBracket = 66,
- TK_RightParen = 61,
+ TK_DotDotDot = 64,
+ TK_Assign = 61,
+ TK_StarAssign = 83,
+ TK_SlashAssign = 84,
+ TK_PercentAssign = 85,
+ TK_PlusAssign = 86,
+ TK_MinusAssign = 87,
+ TK_RightShiftAssign = 88,
+ TK_LeftShiftAssign = 89,
+ TK_AndAssign = 90,
+ TK_CaretAssign = 91,
+ TK_OrAssign = 92,
+ TK_Comma = 57,
+ TK_RightBracket = 65,
+ TK_RightParen = 58,
TK_RightBrace = 60,
- TK_SemiColon = 20,
- TK_ERROR_TOKEN = 25,
- TK_EOF_TOKEN = 74;
+ TK_SemiColon = 19,
+ TK_ERROR_TOKEN = 30,
+ TK_EOF_TOKEN = 73;
public final static String orderedTerminalSymbols[] = {
"",
@@ -130,30 +129,29 @@ public interface C99Parsersym {
"stringlit",
"Tilde",
"Bang",
- "TypedefName",
"SemiColon",
"const",
"restrict",
"volatile",
"static",
- "ERROR_TOKEN",
"auto",
"extern",
- "for",
"inline",
"register",
"typedef",
+ "LeftBracket",
+ "ERROR_TOKEN",
"while",
"break",
"case",
"continue",
"default",
"do",
+ "for",
"goto",
"if",
"return",
"switch",
- "LeftBracket",
"char",
"double",
"float",
@@ -166,13 +164,13 @@ public interface C99Parsersym {
"_Bool",
"_Complex",
"_Imaginary",
- "Comma",
"enum",
"struct",
"union",
+ "Comma",
+ "RightParen",
"Colon",
"RightBrace",
- "RightParen",
"Assign",
"RightShift",
"LeftShift",
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
new file mode 100644
index 0000000000..3a4e74ce56
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
@@ -0,0 +1,1244 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was generated by LPG
+
+package org.eclipse.cdt.internal.core.dom.lrparser.c99;
+
+import lpg.lpgjavaruntime.*;
+
+import java.util.*;
+import org.eclipse.cdt.core.dom.ast.*;
+import org.eclipse.cdt.core.dom.lrparser.IParser;
+import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
+import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
+
+import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
+import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
+
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
+import org.eclipse.cdt.core.dom.lrparser.action.c99.C99TypedefTrackerParserAction;
+
+public class C99SizeofExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
+{
+ private static ParseTable prs = new C99SizeofExpressionParserprs();
+ private BacktrackingParser btParser;
+
+ public BacktrackingParser getParser() { return btParser; }
+ private void setResult(Object object) { btParser.setSym1(object); }
+ public Object getRhsSym(int i) { return btParser.getSym(i); }
+
+ public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
+ public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
+
+ public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
+ public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }
+
+ public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
+ public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }
+
+ public int getLeftSpan() { return btParser.getFirstToken(); }
+ public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); }
+
+ public int getRightSpan() { return btParser.getLastToken(); }
+ public IToken getRightIToken() { return super.getIToken(getRightSpan()); }
+
+ public int getRhsErrorTokenIndex(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (err instanceof ErrorToken ? index : 0);
+ }
+ public ErrorToken getRhsErrorIToken(int i)
+ {
+ int index = btParser.getToken(i);
+ IToken err = super.getIToken(index);
+ return (ErrorToken) (err instanceof ErrorToken ? err : null);
+ }
+
+ public C99SizeofExpressionParser(LexStream lexStream)
+ {
+ super(lexStream);
+
+ try
+ {
+ super.remapTerminalSymbols(orderedTerminalSymbols(), C99SizeofExpressionParserprs.EOFT_SYMBOL);
+ }
+ catch(NullExportedSymbolsException e) {
+ }
+ catch(NullTerminalSymbolsException e) {
+ }
+ catch(UnimplementedTerminalsException e)
+ {
+ java.util.ArrayList unimplemented_symbols = e.getSymbols();
+ System.out.println("The Lexer will not scan the following token(s):");
+ for (int i = 0; i < unimplemented_symbols.size(); i++)
+ {
+ Integer id = (Integer) unimplemented_symbols.get(i);
+ System.out.println(" " + C99SizeofExpressionParsersym.orderedTerminalSymbols[id.intValue()]);
+ }
+ System.out.println();
+ }
+ catch(UndefinedEofSymbolException e)
+ {
+ throw new Error(new UndefinedEofSymbolException
+ ("The Lexer does not implement the Eof symbol " +
+ C99SizeofExpressionParsersym.orderedTerminalSymbols[C99SizeofExpressionParserprs.EOFT_SYMBOL]));
+ }
+ }
+
+ public String[] orderedTerminalSymbols() { return C99SizeofExpressionParsersym.orderedTerminalSymbols; }
+ public String getTokenKindName(int kind) { return C99SizeofExpressionParsersym.orderedTerminalSymbols[kind]; }
+ public int getEOFTokenKind() { return C99SizeofExpressionParserprs.EOFT_SYMBOL; }
+ public PrsStream getParseStream() { return (PrsStream) this; }
+
+ //
+ // Report error message for given error_token.
+ //
+ public final void reportErrorTokenMessage(int error_token, String msg)
+ {
+ int firsttok = super.getFirstErrorToken(error_token),
+ lasttok = super.getLastErrorToken(error_token);
+ String location = super.getFileName() + ':' +
+ (firsttok > lasttok
+ ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
+ : (super.getLine(error_token) + ":" +
+ super.getColumn(error_token) + ":" +
+ super.getEndLine(error_token) + ":" +
+ super.getEndColumn(error_token)))
+ + ": ";
+ super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
+ }
+
+ public Object parser()
+ {
+ return parser(null, 0);
+ }
+
+ public Object parser(Monitor monitor)
+ {
+ return parser(monitor, 0);
+ }
+
+ public Object parser(int error_repair_count)
+ {
+ return parser(null, error_repair_count);
+ }
+
+ public Object parser(Monitor monitor, int error_repair_count)
+ {
+ try
+ {
+ btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ }
+ catch (NotBacktrackParseTableException e)
+ {
+ throw new Error(new NotBacktrackParseTableException
+ ("Regenerate C99SizeofExpressionParserprs.java with -BACKTRACK option"));
+ }
+ catch (BadParseSymFileException e)
+ {
+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- C99SizeofExpressionParsersym.java"));
+ }
+
+ try
+ {
+ return (Object) btParser.parse(error_repair_count);
+ }
+ catch (BadParseException e)
+ {
+ reset(e.error_token); // point to error token
+ DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
+ diagnoseParser.diagnose(e.error_token);
+ }
+
+ return null;
+ }
+
+
+private C99BuildASTParserAction action;
+
+public C99SizeofExpressionParser() { // constructor
+}
+
+private void initActions(IASTTranslationUnit tu) {
+ action = new C99BuildASTParserAction ( C99ASTNodeFactory.DEFAULT_INSTANCE , this, tu);
+ action.setTokenMap( C99SizeofExpressionParsersym .orderedTerminalSymbols);
+}
+
+
+public void addToken(IToken token) {
+ token.setKind(mapKind(token.getKind())); // TODO does mapKind need to be called?
+ super.addToken(token);
+}
+
+
+public IASTCompletionNode parse(IASTTranslationUnit tu) {
+ // this has to be done, or... kaboom!
+ setStreamLength(getSize());
+ initActions(tu);
+
+ final int errorRepairCount = -1; // -1 means full error handling
+ parser(null, errorRepairCount); // do the actual parse
+ super.resetTokenStream(); // allow tokens to be garbage collected
+
+ // the completion node may be null
+ IASTCompletionNode compNode = action.getASTCompletionNode();
+
+ //action = null;
+ //parserAction = null;
+ return compNode;
+}
+
+// uncomment this method to use with backtracking parser
+public List getRuleTokens() {
+ return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
+}
+
+
+
+private ITokenMap tokenMap = null;
+
+public void setTokens(List<IToken> tokens) {
+ resetTokenStream();
+ addToken(new Token(null, 0, 0, 0)); // dummy token
+ for(IToken token : tokens) {
+ token.setKind(tokenMap.mapKind(token.getKind()));
+ addToken(token);
+ }
+ addToken(new Token(null, 0, 0, C99SizeofExpressionParsersym .TK_EOF_TOKEN));
+}
+
+public C99SizeofExpressionParser(String[] mapFrom) { // constructor
+ tokenMap = new TokenMap( C99SizeofExpressionParsersym .orderedTerminalSymbols, mapFrom);
+}
+
+
+public IASTExpression getParseResult() {
+ return (IASTExpression) action.getSecondaryParseResult();
+}
+
+ public void ruleAction(int ruleNumber)
+ {
+ switch (ruleNumber)
+ {
+
+ //
+ // Rule 1: <openscope-ast> ::= $Empty
+ //
+ case 1: { action. openASTScope(); break;
+ }
+
+ //
+ // Rule 10: literal ::= integer
+ //
+ case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
+ }
+
+ //
+ // Rule 11: literal ::= floating
+ //
+ case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
+ }
+
+ //
+ // Rule 12: literal ::= charconst
+ //
+ case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
+ }
+
+ //
+ // Rule 13: literal ::= stringlit
+ //
+ case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
+ }
+
+ //
+ // Rule 15: primary_expression ::= primary_expression_id
+ //
+ case 15: { action. consumeExpressionID(); break;
+ }
+
+ //
+ // Rule 16: primary_expression ::= ( expression )
+ //
+ case 16: { action. consumeExpressionBracketed(); break;
+ }
+
+ //
+ // Rule 20: postfix_expression ::= postfix_expression [ expression ]
+ //
+ case 20: { action. consumeExpressionArraySubscript(); break;
+ }
+
+ //
+ // Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
+ //
+ case 21: { action. consumeExpressionFunctionCall(); break;
+ }
+
+ //
+ // Rule 22: postfix_expression ::= postfix_expression . member_name
+ //
+ case 22: { action. consumeExpressionFieldReference(false); break;
+ }
+
+ //
+ // Rule 23: postfix_expression ::= postfix_expression -> member_name
+ //
+ case 23: { action. consumeExpressionFieldReference(true); break;
+ }
+
+ //
+ // Rule 24: postfix_expression ::= postfix_expression ++
+ //
+ case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
+ }
+
+ //
+ // Rule 25: postfix_expression ::= postfix_expression --
+ //
+ case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
+ }
+
+ //
+ // Rule 26: postfix_expression ::= ( type_name ) { <openscope-ast> initializer_list comma_opt }
+ //
+ case 26: { action. consumeExpressionTypeIdInitializer(); break;
+ }
+
+ //
+ // Rule 32: unary_expression ::= ++ unary_expression
+ //
+ case 32: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break;
+ }
+
+ //
+ // Rule 33: unary_expression ::= -- unary_expression
+ //
+ case 33: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break;
+ }
+
+ //
+ // Rule 34: unary_expression ::= & cast_expression
+ //
+ case 34: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break;
+ }
+
+ //
+ // Rule 35: unary_expression ::= * cast_expression
+ //
+ case 35: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break;
+ }
+
+ //
+ // Rule 36: unary_expression ::= + cast_expression
+ //
+ case 36: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 37: unary_expression ::= - cast_expression
+ //
+ case 37: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 38: unary_expression ::= ~ cast_expression
+ //
+ case 38: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break;
+ }
+
+ //
+ // Rule 39: unary_expression ::= ! cast_expression
+ //
+ case 39: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break;
+ }
+
+ //
+ // Rule 40: unary_expression ::= sizeof unary_expression
+ //
+ case 40: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break;
+ }
+
+ //
+ // Rule 42: cast_expression ::= ( type_name ) cast_expression
+ //
+ case 42: { action. consumeExpressionCast(IASTCastExpression.op_cast); break;
+ }
+
+ //
+ // Rule 44: multiplicative_expression ::= multiplicative_expression * cast_expression
+ //
+ case 44: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply); break;
+ }
+
+ //
+ // Rule 45: multiplicative_expression ::= multiplicative_expression / cast_expression
+ //
+ case 45: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide); break;
+ }
+
+ //
+ // Rule 46: multiplicative_expression ::= multiplicative_expression % cast_expression
+ //
+ case 46: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo); break;
+ }
+
+ //
+ // Rule 48: additive_expression ::= additive_expression + multiplicative_expression
+ //
+ case 48: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus); break;
+ }
+
+ //
+ // Rule 49: additive_expression ::= additive_expression - multiplicative_expression
+ //
+ case 49: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus); break;
+ }
+
+ //
+ // Rule 51: shift_expression ::= shift_expression << additive_expression
+ //
+ case 51: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft); break;
+ }
+
+ //
+ // Rule 52: shift_expression ::= shift_expression >> additive_expression
+ //
+ case 52: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight); break;
+ }
+
+ //
+ // Rule 54: relational_expression ::= relational_expression < shift_expression
+ //
+ case 54: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan); break;
+ }
+
+ //
+ // Rule 55: relational_expression ::= relational_expression > shift_expression
+ //
+ case 55: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan); break;
+ }
+
+ //
+ // Rule 56: relational_expression ::= relational_expression <= shift_expression
+ //
+ case 56: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual); break;
+ }
+
+ //
+ // Rule 57: relational_expression ::= relational_expression >= shift_expression
+ //
+ case 57: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual); break;
+ }
+
+ //
+ // Rule 59: equality_expression ::= equality_expression == relational_expression
+ //
+ case 59: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals); break;
+ }
+
+ //
+ // Rule 60: equality_expression ::= equality_expression != relational_expression
+ //
+ case 60: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals); break;
+ }
+
+ //
+ // Rule 62: AND_expression ::= AND_expression & equality_expression
+ //
+ case 62: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd); break;
+ }
+
+ //
+ // Rule 64: exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
+ //
+ case 64: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor); break;
+ }
+
+ //
+ // Rule 66: inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
+ //
+ case 66: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr); break;
+ }
+
+ //
+ // Rule 68: logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
+ //
+ case 68: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd); break;
+ }
+
+ //
+ // Rule 70: logical_OR_expression ::= logical_OR_expression || logical_AND_expression
+ //
+ case 70: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr); break;
+ }
+
+ //
+ // Rule 72: conditional_expression ::= logical_OR_expression ? expression : conditional_expression
+ //
+ case 72: { action. consumeExpressionConditional(); break;
+ }
+
+ //
+ // Rule 74: assignment_expression ::= unary_expression = assignment_expression
+ //
+ case 74: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
+ }
+
+ //
+ // Rule 75: assignment_expression ::= unary_expression *= assignment_expression
+ //
+ case 75: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign); break;
+ }
+
+ //
+ // Rule 76: assignment_expression ::= unary_expression /= assignment_expression
+ //
+ case 76: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign); break;
+ }
+
+ //
+ // Rule 77: assignment_expression ::= unary_expression %= assignment_expression
+ //
+ case 77: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign); break;
+ }
+
+ //
+ // Rule 78: assignment_expression ::= unary_expression += assignment_expression
+ //
+ case 78: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign); break;
+ }
+
+ //
+ // Rule 79: assignment_expression ::= unary_expression -= assignment_expression
+ //
+ case 79: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign); break;
+ }
+
+ //
+ // Rule 80: assignment_expression ::= unary_expression <<= assignment_expression
+ //
+ case 80: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign); break;
+ }
+
+ //
+ // Rule 81: assignment_expression ::= unary_expression >>= assignment_expression
+ //
+ case 81: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign); break;
+ }
+
+ //
+ // Rule 82: assignment_expression ::= unary_expression &= assignment_expression
+ //
+ case 82: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign); break;
+ }
+
+ //
+ // Rule 83: assignment_expression ::= unary_expression ^= assignment_expression
+ //
+ case 83: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign); break;
+ }
+
+ //
+ // Rule 84: assignment_expression ::= unary_expression |= assignment_expression
+ //
+ case 84: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign); break;
+ }
+
+ //
+ // Rule 87: expression_list ::= <openscope-ast> expression_list_actual
+ //
+ case 87: { action. consumeExpressionList(); break;
+ }
+
+ //
+ // Rule 89: expression_list_opt ::= $Empty
+ //
+ case 89: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 99: statement ::= ERROR_TOKEN
+ //
+ case 99: { action. consumeStatementProblem(); break;
+ }
+
+ //
+ // Rule 100: labeled_statement ::= identifier_or_typedefname : statement
+ //
+ case 100: { action. consumeStatementLabeled(); break;
+ }
+
+ //
+ // Rule 101: labeled_statement ::= case constant_expression :
+ //
+ case 101: { action. consumeStatementCase(); break;
+ }
+
+ //
+ // Rule 102: labeled_statement ::= default :
+ //
+ case 102: { action. consumeStatementDefault(); break;
+ }
+
+ //
+ // Rule 103: compound_statement ::= { }
+ //
+ case 103: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 104: compound_statement ::= { <openscope-ast> block_item_list }
+ //
+ case 104: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 108: block_item ::= declaration
+ //
+ case 108: { action. consumeStatementDeclaration(); break;
+ }
+
+ //
+ // Rule 109: expression_statement ::= ;
+ //
+ case 109: { action. consumeStatementNull(); break;
+ }
+
+ //
+ // Rule 110: expression_statement ::= expression_in_statement ;
+ //
+ case 110: { action. consumeStatementExpression(); break;
+ }
+
+ //
+ // Rule 111: selection_statement ::= if ( expression ) statement
+ //
+ case 111: { action. consumeStatementIf(false); break;
+ }
+
+ //
+ // Rule 112: selection_statement ::= if ( expression ) statement else statement
+ //
+ case 112: { action. consumeStatementIf(true); break;
+ }
+
+ //
+ // Rule 113: selection_statement ::= switch ( expression ) statement
+ //
+ case 113: { action. consumeStatementSwitch(); break;
+ }
+
+ //
+ // Rule 115: expression_opt ::= $Empty
+ //
+ case 115: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 116: iteration_statement ::= do statement while ( expression ) ;
+ //
+ case 116: { action. consumeStatementDoLoop(); break;
+ }
+
+ //
+ // Rule 117: iteration_statement ::= while ( expression ) statement
+ //
+ case 117: { action. consumeStatementWhileLoop(); break;
+ }
+
+ //
+ // Rule 118: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement
+ //
+ case 118: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 119: iteration_statement ::= for ( declaration expression_opt ; expression_opt ) statement
+ //
+ case 119: { action. consumeStatementForLoop(); break;
+ }
+
+ //
+ // Rule 120: jump_statement ::= goto identifier_or_typedefname ;
+ //
+ case 120: { action. consumeStatementGoto(); break;
+ }
+
+ //
+ // Rule 121: jump_statement ::= continue ;
+ //
+ case 121: { action. consumeStatementContinue(); break;
+ }
+
+ //
+ // Rule 122: jump_statement ::= break ;
+ //
+ case 122: { action. consumeStatementBreak(); break;
+ }
+
+ //
+ // Rule 123: jump_statement ::= return ;
+ //
+ case 123: { action. consumeStatementReturn(false); break;
+ }
+
+ //
+ // Rule 124: jump_statement ::= return expression ;
+ //
+ case 124: { action. consumeStatementReturn(true); break;
+ }
+
+ //
+ // Rule 125: declaration ::= declaration_specifiers ;
+ //
+ case 125: { action. consumeDeclarationSimple(false); break;
+ }
+
+ //
+ // Rule 126: declaration ::= declaration_specifiers <openscope-ast> init_declarator_list ;
+ //
+ case 126: { action. consumeDeclarationSimple(true); break;
+ }
+
+ //
+ // Rule 127: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers
+ //
+ case 127: { action. consumeDeclarationSpecifiersSimple(); break;
+ }
+
+ //
+ // Rule 128: declaration_specifiers ::= <openscope-ast> struct_or_union_declaration_specifiers
+ //
+ case 128: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 129: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers
+ //
+ case 129: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 130: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers
+ //
+ case 130: { action. consumeDeclarationSpecifiersStructUnionEnum(); break;
+ }
+
+ //
+ // Rule 131: declaration_specifiers ::= <openscope-ast> typdef_name_declaration_specifiers
+ //
+ case 131: { action. consumeDeclarationSpecifiersTypedefName(); break;
+ }
+
+ //
+ // Rule 156: init_declarator ::= complete_declarator = initializer
+ //
+ case 156: { action. consumeDeclaratorWithInitializer(true); break;
+ }
+
+ //
+ // Rule 158: storage_class_specifier ::= storage_class_specifier_token
+ //
+ case 158: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 164: simple_type_specifier ::= simple_type_specifier_token
+ //
+ case 164: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 177: typedef_name_in_declspec ::= Completion
+ //
+ case 177: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 178: typedef_name_in_declspec ::= identifier
+ //
+ case 178: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 181: struct_or_union_specifier ::= struct { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 181: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 182: struct_or_union_specifier ::= union { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 182: { action. consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 183: struct_or_union_specifier ::= struct identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 183: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 184: struct_or_union_specifier ::= union identifier_or_typedefname { <openscope-ast> struct_declaration_list_opt }
+ //
+ case 184: { action. consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 185: elaborated_specifier ::= struct identifier_or_typedefname
+ //
+ case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
+ }
+
+ //
+ // Rule 186: elaborated_specifier ::= union identifier_or_typedefname
+ //
+ case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
+ }
+
+ //
+ // Rule 187: elaborated_specifier ::= enum identifier_or_typedefname
+ //
+ case 187: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
+ }
+
+ //
+ // Rule 192: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
+ //
+ case 192: { action. consumeStructDeclaration(true); break;
+ }
+
+ //
+ // Rule 193: struct_declaration ::= specifier_qualifier_list ;
+ //
+ case 193: { action. consumeStructDeclaration(false); break;
+ }
+
+ //
+ // Rule 199: struct_declarator ::= : constant_expression
+ //
+ case 199: { action. consumeBitField(false); break;
+ }
+
+ //
+ // Rule 200: struct_declarator ::= declarator : constant_expression
+ //
+ case 200: { action. consumeBitField(true); break;
+ }
+
+ //
+ // Rule 201: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 201: { action. consumeTypeSpecifierEnumeration(false); break;
+ }
+
+ //
+ // Rule 202: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
+ //
+ case 202: { action. consumeTypeSpecifierEnumeration(true); break;
+ }
+
+ //
+ // Rule 207: enumerator ::= identifier_or_typedefname
+ //
+ case 207: { action. consumeEnumerator(false); break;
+ }
+
+ //
+ // Rule 208: enumerator ::= identifier_or_typedefname = constant_expression
+ //
+ case 208: { action. consumeEnumerator(true); break;
+ }
+
+ //
+ // Rule 209: type_qualifier ::= type_qualifier_token
+ //
+ case 209: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 213: function_specifier ::= inline
+ //
+ case 213: { action. consumeDeclSpecToken(); break;
+ }
+
+ //
+ // Rule 215: declarator ::= <openscope-ast> pointer_seq direct_declarator
+ //
+ case 215: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 220: basic_direct_declarator ::= declarator_id_name
+ //
+ case 220: { action. consumeDirectDeclaratorIdentifier(); break;
+ }
+
+ //
+ // Rule 221: basic_direct_declarator ::= ( declarator )
+ //
+ case 221: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 222: declarator_id_name ::= identifier
+ //
+ case 222: { action. consumeIdentifierName(); break;
+ }
+
+ //
+ // Rule 223: array_direct_declarator ::= basic_direct_declarator array_modifier
+ //
+ case 223: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 224: array_direct_declarator ::= array_direct_declarator array_modifier
+ //
+ case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 226: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 226: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 227: function_direct_declarator ::= basic_direct_declarator ( )
+ //
+ case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 229: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
+ //
+ case 229: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 230: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
+ //
+ case 230: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
+ }
+
+ //
+ // Rule 232: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
+ //
+ case 232: { action. consumeDeclaratorWithPointer(true); break;
+ }
+
+ //
+ // Rule 233: identifier_list ::= identifier
+ //
+ case 233: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 234: identifier_list ::= identifier_list , identifier
+ //
+ case 234: { action. consumeIdentifierKnR(); break;
+ }
+
+ //
+ // Rule 235: array_modifier ::= [ ]
+ //
+ case 235: { action. consumeDirectDeclaratorArrayModifier(false); break;
+ }
+
+ //
+ // Rule 236: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
+ //
+ case 236: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
+ }
+
+ //
+ // Rule 237: array_modifier ::= [ assignment_expression ]
+ //
+ case 237: { action. consumeDirectDeclaratorArrayModifier(true); break;
+ }
+
+ //
+ // Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
+ }
+
+ //
+ // Rule 239: array_modifier ::= [ static assignment_expression ]
+ //
+ case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
+ }
+
+ //
+ // Rule 240: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
+ //
+ case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
+ //
+ case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
+ }
+
+ //
+ // Rule 242: array_modifier ::= [ * ]
+ //
+ case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
+ }
+
+ //
+ // Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
+ //
+ case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
+ }
+
+ //
+ // Rule 245: pointer_seq ::= *
+ //
+ case 245: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 246: pointer_seq ::= pointer_seq *
+ //
+ case 246: { action. consumePointer(); break;
+ }
+
+ //
+ // Rule 247: pointer_seq ::= * <openscope-ast> type_qualifier_list
+ //
+ case 247: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 248: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
+ //
+ case 248: { action. consumePointerTypeQualifierList(); break;
+ }
+
+ //
+ // Rule 251: parameter_type_list ::= parameter_list
+ //
+ case 251: { action. consumeEmpty(); break;
+ }
+
+ //
+ // Rule 252: parameter_type_list ::= parameter_list , ...
+ //
+ case 252: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 253: parameter_type_list ::= ...
+ //
+ case 253: { action. consumePlaceHolder(); break;
+ }
+
+ //
+ // Rule 256: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
+ //
+ case 256: { action. consumeParameterDeclaration(); break;
+ }
+
+ //
+ // Rule 257: parameter_declaration ::= declaration_specifiers
+ //
+ case 257: { action. consumeParameterDeclarationWithoutDeclarator(); break;
+ }
+
+ //
+ // Rule 260: type_name ::= specifier_qualifier_list
+ //
+ case 260: { action. consumeTypeId(false); break;
+ }
+
+ //
+ // Rule 261: type_name ::= specifier_qualifier_list abstract_declarator
+ //
+ case 261: { action. consumeTypeId(true); break;
+ }
+
+ //
+ // Rule 263: abstract_declarator ::= <openscope-ast> pointer_seq
+ //
+ case 263: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
+ //
+ case 264: { action. consumeDeclaratorWithPointer(false); break;
+ }
+
+ //
+ // Rule 268: basic_direct_abstract_declarator ::= ( abstract_declarator )
+ //
+ case 268: { action. consumeDirectDeclaratorBracketed(); break;
+ }
+
+ //
+ // Rule 269: array_direct_abstract_declarator ::= array_modifier
+ //
+ case 269: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
+ }
+
+ //
+ // Rule 270: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
+ //
+ case 270: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 271: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
+ //
+ case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
+ }
+
+ //
+ // Rule 272: function_direct_abstract_declarator ::= ( )
+ //
+ case 272: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
+ }
+
+ //
+ // Rule 273: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
+ //
+ case 273: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
+ }
+
+ //
+ // Rule 274: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
+ //
+ case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
+ }
+
+ //
+ // Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
+ //
+ case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
+ }
+
+ //
+ // Rule 276: initializer ::= assignment_expression
+ //
+ case 276: { action. consumeInitializer(); break;
+ }
+
+ //
+ // Rule 277: initializer ::= { <openscope-ast> initializer_list comma_opt }
+ //
+ case 277: { action. consumeInitializerList(); break;
+ }
+
+ //
+ // Rule 282: designated_initializer ::= <openscope-ast> designation = initializer
+ //
+ case 282: { action. consumeInitializerDesignated(); break;
+ }
+
+ //
+ // Rule 286: designator_base ::= [ constant_expression ]
+ //
+ case 286: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 287: designator_base ::= . identifier_or_typedefname
+ //
+ case 287: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 288: designator ::= [ constant_expression ]
+ //
+ case 288: { action. consumeDesignatorArray(); break;
+ }
+
+ //
+ // Rule 289: designator ::= . identifier_or_typedefname
+ //
+ case 289: { action. consumeDesignatorField(); break;
+ }
+
+ //
+ // Rule 290: translation_unit ::= external_declaration_list
+ //
+ case 290: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 291: translation_unit ::= $Empty
+ //
+ case 291: { action. consumeTranslationUnit(); break;
+ }
+
+ //
+ // Rule 296: external_declaration ::= ;
+ //
+ case 296: { action. consumeDeclarationEmpty(); break;
+ }
+
+ //
+ // Rule 297: external_declaration ::= ERROR_TOKEN
+ //
+ case 297: { action. consumeDeclarationProblem(); break;
+ }
+
+ //
+ // Rule 300: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
+ //
+ case 300: { action. consumeFunctionDefinition(true); break;
+ }
+
+ //
+ // Rule 301: function_definition ::= <openscope-ast> function_declarator function_body
+ //
+ case 301: { action. consumeFunctionDefinition(false); break;
+ }
+
+ //
+ // Rule 302: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
+ //
+ case 302: { action. consumeFunctionDefinitionKnR(); break;
+ }
+
+ //
+ // Rule 303: function_body ::= { }
+ //
+ case 303: { action. consumeStatementCompoundStatement(false); break;
+ }
+
+ //
+ // Rule 304: function_body ::= { <openscope-ast> block_item_list }
+ //
+ case 304: { action. consumeStatementCompoundStatement(true); break;
+ }
+
+ //
+ // Rule 306: no_sizeof_type_name_start ::= ERROR_TOKEN
+ //
+ case 306: { action. consumeExpressionProblem(); break;
+ }
+
+
+ default:
+ break;
+ }
+ return;
+ }
+}
+
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParserprs.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParserprs.java
new file mode 100644
index 0000000000..93cdeb5af3
--- /dev/null
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParserprs.java
@@ -0,0 +1,1085 @@
+/*******************************************************************************
+* Copyright (c) 2006, 2008 IBM Corporation and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* IBM Corporation - initial API and implementation
+*********************************************************************************/
+
+// This file was gen