1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +02:00

better error detection

This commit is contained in:
Mike Kucera 2008-02-19 21:46:54 +00:00
parent c3dba4bb6b
commit 6c826b3842
26 changed files with 10948 additions and 10602 deletions

View file

@ -46,15 +46,15 @@ public class ParseHelper {
@Override @Override
public int visit( IASTName name ){ public int visit( IASTName name ){
System.out.println("Visit Name: '" + name.toString() + "'"); //System.out.println("Visit Name: '" + name.toString() + "'");
IBinding binding = name.resolveBinding(); IBinding binding = name.resolveBinding();
if (binding instanceof IProblemBinding) { if (binding instanceof IProblemBinding) {
numProblemBindings++; numProblemBindings++;
System.out.println("Problem Binding: " + name); //System.out.println("Problem Binding: " + name);
} }
if (binding == null) { if (binding == null) {
numNullBindings++; numNullBindings++;
System.out.println("Null Binding: " + name); //System.out.println("Null Binding: " + name);
} }
return PROCESS_CONTINUE; return PROCESS_CONTINUE;
} }

View file

@ -23,6 +23,17 @@
This property must be set to the full path to the LPG templates folder. This property must be set to the full path to the LPG templates folder.
</fail> </fail>
<property name="c99_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/c99"/>
<property name="cpp_location" value="../src/org/eclipse/cdt/internal/core/dom/lrparser/cpp"/>
<target name="clean_l_files">
<delete>
<fileset dir="${c99_location}" includes="**/*.l"/>
<fileset dir="${cpp_location}" includes="**/*.l"/>
</delete>
</target>
<target name="both" depends="cpp, c99"> <target name="both" depends="cpp, c99">
<description>Generates the C99 and C++ parsers</description> <description>Generates the C99 and C++ parsers</description>
@ -33,19 +44,19 @@
<target name="c99"> <target name="c99">
<description>Generate the C99 parser</description> <description>Generate the C99 parser</description>
<!-- Generate main parser --> <!-- Generate main parser -->
<antcall target="generate-c99"> <antcall target="generate_c99">
<param name="grammar_name" value="C99Parser"/> <param name="grammar_name" value="C99Parser"/>
</antcall> </antcall>
<!-- Generate parser for disambiguating declarations vs expression statements --> <!-- Generate parser for disambiguating declarations vs expression statements -->
<antcall target="generate-c99"> <antcall target="generate_c99">
<param name="grammar_name" value="C99ExpressionStatementParser"/> <param name="grammar_name" value="C99ExpressionStatementParser"/>
</antcall> </antcall>
<!-- Generate parser for disambiguating cast expressions vs binary expressions--> <!-- Generate parser for disambiguating cast expressions vs binary expressions-->
<antcall target="generate-c99"> <antcall target="generate_c99">
<param name="grammar_name" value="C99NoCastExpressionParser"/> <param name="grammar_name" value="C99NoCastExpressionParser"/>
</antcall> </antcall>
<!-- Generate parser for disambiguating sizeof expressions --> <!-- Generate parser for disambiguating sizeof expressions -->
<antcall target="generate-c99"> <antcall target="generate_c99">
<param name="grammar_name" value="C99SizeofExpressionParser"/> <param name="grammar_name" value="C99SizeofExpressionParser"/>
</antcall> </antcall>
</target> </target>
@ -53,33 +64,33 @@
<target name="cpp"> <target name="cpp">
<description>Generate the C++ parser</description> <description>Generate the C++ parser</description>
<antcall target="generate-cpp"> <antcall target="generate_cpp">
<param name="grammar_name" value="CPPParser"/> <param name="grammar_name" value="CPPParser"/>
</antcall> </antcall>
<!-- Generate parser for disambiguating declarations vs expression statements --> <!-- Generate parser for disambiguating declarations vs expression statements -->
<antcall target="generate-cpp"> <antcall target="generate_cpp">
<param name="grammar_name" value="CPPExpressionStatementParser"/> <param name="grammar_name" value="CPPExpressionStatementParser"/>
</antcall> </antcall>
<!-- Generate parser for disambiguating cast expressions vs binary expressions--> <!-- Generate parser for disambiguating cast expressions vs binary expressions-->
<antcall target="generate-cpp"> <antcall target="generate_cpp">
<param name="grammar_name" value="CPPNoCastExpressionParser"/> <param name="grammar_name" value="CPPNoCastExpressionParser"/>
</antcall> </antcall>
</target> </target>
<target name="generate-c99"> <target name="generate_c99">
<antcall target="generate"> <antcall target="generate">
<param name="grammar_dir" value="c99"/> <param name="grammar_dir" value="c99"/>
<param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/c99"/> <param name="output_dir" value="${c99_location}"/>
<param name="grammar_name" value="${grammar_name}"/> <param name="grammar_name" value="${grammar_name}"/>
</antcall> </antcall>
</target> </target>
<target name="generate-cpp"> <target name="generate_cpp">
<antcall target="generate"> <antcall target="generate">
<param name="grammar_dir" value="cpp"/> <param name="grammar_dir" value="cpp"/>
<param name="output_dir" value="org/eclipse/cdt/internal/core/dom/lrparser/cpp"/> <param name="output_dir" value="${cpp_location}"/>
<param name="grammar_name" value="${grammar_name}"/> <param name="grammar_name" value="${grammar_name}"/>
</antcall> </antcall>
</target> </target>
@ -97,7 +108,7 @@
<env key="LPG_TEMPLATE" path="${lpg_template}"/> <env key="LPG_TEMPLATE" path="${lpg_template}"/>
</exec> </exec>
<move overwrite="true" toDir="../src/${output_dir}"> <move overwrite="true" toDir="${output_dir}">
<fileset dir="."> <fileset dir=".">
<include name="${grammar_name}*.*"/> <include name="${grammar_name}*.*"/>
</fileset> </fileset>

View file

@ -639,6 +639,8 @@ struct_declaration
/. $Build consumeStructDeclaration(true); $EndBuild ./ /. $Build consumeStructDeclaration(true); $EndBuild ./
| specifier_qualifier_list ';' | specifier_qualifier_list ';'
/. $Build consumeStructDeclaration(false); $EndBuild ./ /. $Build consumeStructDeclaration(false); $EndBuild ./
| ERROR_TOKEN
/. $Build consumeDeclarationProblem(); $EndBuild ./
-- just reuse declaration_specifiers, makes grammar a bit more lenient but thats OK -- just reuse declaration_specifiers, makes grammar a bit more lenient but thats OK

View file

@ -350,15 +350,27 @@ $Rules
-- Basic Concepts -- Basic Concepts
------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------
-- TODO declaration errors need to be caught -- The extra external declaration rules are there just so that ERROR_TOKEN can be
-- TODO in C99 as well, nested declarations should be able to have errors -- caught at the top level.
translation_unit translation_unit
::= declaration_seq ::= external_declaration_list
/. $Build consumeTranslationUnit(); $EndBuild ./ /. $Build consumeTranslationUnit(); $EndBuild ./
| $empty | $empty
/. $Build consumeTranslationUnit(); $EndBuild ./ /. $Build consumeTranslationUnit(); $EndBuild ./
external_declaration_list
::= external_declaration
| external_declaration_list external_declaration
external_declaration
::= declaration
| ERROR_TOKEN
/. $Build consumeDeclarationProblem(); $EndBuild ./
--expression_as_translation_unit --expression_as_translation_unit
-- ::= expression -- ::= expression
-- /. $Build consumeExpressionAsTranslationUnit(); $EndBuild ./ -- /. $Build consumeExpressionAsTranslationUnit(); $EndBuild ./
@ -1505,15 +1517,15 @@ member_declaration
/. $Build consumeDeclarationSimple(true); $EndBuild ./ /. $Build consumeDeclarationSimple(true); $EndBuild ./
| declaration_specifiers_opt ';' | declaration_specifiers_opt ';'
/. $Build consumeDeclarationSimple(false); $EndBuild ./ /. $Build consumeDeclarationSimple(false); $EndBuild ./
| function_definition ';' -- done | function_definition ';'
| function_definition -- done | function_definition
| dcolon_opt nested_name_specifier template_opt unqualified_id_name ';' | dcolon_opt nested_name_specifier template_opt unqualified_id_name ';'
/. $Build consumeMemberDeclarationQualifiedId(); $EndBuild ./ /. $Build consumeMemberDeclarationQualifiedId(); $EndBuild ./
| using_declaration -- done | using_declaration
| template_declaration | template_declaration
| visibility_label -- done | visibility_label
| ERROR_TOKEN
/. $Build consumeDeclarationProblem(); $EndBuild ./
member_declaration_list member_declaration_list

View file

@ -557,9 +557,6 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
if(asC99Kind(parser.getLeftIToken()) == C99Parsersym.TK_EndOfCompletion) if(asC99Kind(parser.getLeftIToken()) == C99Parsersym.TK_EndOfCompletion)
return; return;
List<IToken> tokens = parser.getRuleTokens();
System.out.println("what: " + parser.getLeftIToken().getKind());
IASTDeclSpecifier declSpecifier = nodeFactory.newCSimpleDeclSpecifier(); IASTDeclSpecifier declSpecifier = nodeFactory.newCSimpleDeclSpecifier();
IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier); IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
setOffsetAndLength(declSpecifier); setOffsetAndLength(declSpecifier);

View file

@ -835,411 +835,417 @@ public C99ExpressionStatementParser(String[] mapFrom) { // constructor
} }
// //
// Rule 200: struct_declarator ::= : constant_expression // Rule 195: struct_declaration ::= ERROR_TOKEN
// //
case 200: { action. consumeBitField(false); break; case 195: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 201: struct_declarator ::= declarator : constant_expression // Rule 201: struct_declarator ::= : constant_expression
// //
case 201: { action. consumeBitField(true); break; case 201: { action. consumeBitField(false); break;
} }
// //
// Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt } // Rule 202: struct_declarator ::= declarator : constant_expression
// //
case 202: { action. consumeTypeSpecifierEnumeration(false); break; case 202: { action. consumeBitField(true); break;
} }
// //
// Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt } // Rule 203: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 203: { action. consumeTypeSpecifierEnumeration(true); break; case 203: { action. consumeTypeSpecifierEnumeration(false); break;
} }
// //
// Rule 208: enumerator ::= identifier_or_typedefname // Rule 204: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 208: { action. consumeEnumerator(false); break; case 204: { action. consumeTypeSpecifierEnumeration(true); break;
} }
// //
// Rule 209: enumerator ::= identifier_or_typedefname = constant_expression // Rule 209: enumerator ::= identifier_or_typedefname
// //
case 209: { action. consumeEnumerator(true); break; case 209: { action. consumeEnumerator(false); break;
} }
// //
// Rule 210: type_qualifier ::= type_qualifier_token // Rule 210: enumerator ::= identifier_or_typedefname = constant_expression
// //
case 210: { action. consumeDeclSpecToken(); break; case 210: { action. consumeEnumerator(true); break;
} }
// //
// Rule 214: function_specifier ::= inline // Rule 211: type_qualifier ::= type_qualifier_token
// //
case 214: { action. consumeDeclSpecToken(); break; case 211: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator // Rule 215: function_specifier ::= inline
// //
case 216: { action. consumeDeclaratorWithPointer(true); break; case 215: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 221: basic_direct_declarator ::= declarator_id_name // Rule 217: declarator ::= <openscope-ast> pointer_seq direct_declarator
// //
case 221: { action. consumeDirectDeclaratorIdentifier(); break; case 217: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 222: basic_direct_declarator ::= ( declarator ) // Rule 222: basic_direct_declarator ::= declarator_id_name
// //
case 222: { action. consumeDirectDeclaratorBracketed(); break; case 222: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 223: declarator_id_name ::= identifier // Rule 223: basic_direct_declarator ::= ( declarator )
// //
case 223: { action. consumeIdentifierName(); break; case 223: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier // Rule 224: declarator_id_name ::= identifier
// //
case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 224: { action. consumeIdentifierName(); break;
} }
// //
// Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier // Rule 225: array_direct_declarator ::= basic_direct_declarator array_modifier
// //
case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list ) // Rule 226: array_direct_declarator ::= array_direct_declarator array_modifier
// //
case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 228: function_direct_declarator ::= basic_direct_declarator ( ) // Rule 228: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
// //
case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator // Rule 229: function_direct_declarator ::= basic_direct_declarator ( )
// //
case 230: { action. consumeDeclaratorWithPointer(true); break; case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list ) // Rule 231: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
// //
case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break; case 231: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator // Rule 232: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
// //
case 233: { action. consumeDeclaratorWithPointer(true); break; case 232: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
} }
// //
// Rule 234: identifier_list ::= identifier // Rule 234: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
// //
case 234: { action. consumeIdentifierKnR(); break; case 234: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 235: identifier_list ::= identifier_list , identifier // Rule 235: identifier_list ::= identifier
// //
case 235: { action. consumeIdentifierKnR(); break; case 235: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 236: array_modifier ::= [ ] // Rule 236: identifier_list ::= identifier_list , identifier
// //
case 236: { action. consumeDirectDeclaratorArrayModifier(false); break; case 236: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ] // Rule 237: array_modifier ::= [ ]
// //
case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break; case 237: { action. consumeDirectDeclaratorArrayModifier(false); break;
} }
// //
// Rule 238: array_modifier ::= [ assignment_expression ] // Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
// //
case 238: { action. consumeDirectDeclaratorArrayModifier(true); break; case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
} }
// //
// Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 239: array_modifier ::= [ assignment_expression ]
// //
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break; case 239: { action. consumeDirectDeclaratorArrayModifier(true); break;
} }
// //
// Rule 240: array_modifier ::= [ static assignment_expression ] // Rule 240: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break; case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
} }
// //
// Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 241: array_modifier ::= [ static assignment_expression ]
// //
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
} }
// //
// Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ] // Rule 242: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 243: array_modifier ::= [ * ] // Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
// //
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break; case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ] // Rule 244: array_modifier ::= [ * ]
// //
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break; case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
} }
// //
// Rule 246: pointer_seq ::= * // Rule 245: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
// //
case 246: { action. consumePointer(); break; case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
} }
// //
// Rule 247: pointer_seq ::= pointer_seq * // Rule 247: pointer_seq ::= *
// //
case 247: { action. consumePointer(); break; case 247: { action. consumePointer(); break;
} }
// //
// Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list // Rule 248: pointer_seq ::= pointer_seq *
// //
case 248: { action. consumePointerTypeQualifierList(); break; case 248: { action. consumePointer(); break;
} }
// //
// Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list // Rule 249: pointer_seq ::= * <openscope-ast> type_qualifier_list
// //
case 249: { action. consumePointerTypeQualifierList(); break; case 249: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 252: parameter_type_list ::= parameter_list // Rule 250: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
// //
case 252: { action. consumeEmpty(); break; case 250: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 253: parameter_type_list ::= parameter_list , ... // Rule 253: parameter_type_list ::= parameter_list
// //
case 253: { action. consumePlaceHolder(); break; case 253: { action. consumeEmpty(); break;
} }
// //
// Rule 254: parameter_type_list ::= ... // Rule 254: parameter_type_list ::= parameter_list , ...
// //
case 254: { action. consumePlaceHolder(); break; case 254: { action. consumePlaceHolder(); break;
} }
// //
// Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator // Rule 255: parameter_type_list ::= ...
// //
case 257: { action. consumeParameterDeclaration(); break; case 255: { action. consumePlaceHolder(); break;
} }
// //
// Rule 258: parameter_declaration ::= declaration_specifiers // Rule 258: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
// //
case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break; case 258: { action. consumeParameterDeclaration(); break;
} }
// //
// Rule 261: type_name ::= specifier_qualifier_list // Rule 259: parameter_declaration ::= declaration_specifiers
// //
case 261: { action. consumeTypeId(false); break; case 259: { action. consumeParameterDeclarationWithoutDeclarator(); break;
} }
// //
// Rule 262: type_name ::= specifier_qualifier_list abstract_declarator // Rule 262: type_name ::= specifier_qualifier_list
// //
case 262: { action. consumeTypeId(true); break; case 262: { action. consumeTypeId(false); break;
} }
// //
// Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq // Rule 263: type_name ::= specifier_qualifier_list abstract_declarator
// //
case 264: { action. consumeDeclaratorWithPointer(false); break; case 263: { action. consumeTypeId(true); break;
} }
// //
// Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq
// //
case 265: { action. consumeDeclaratorWithPointer(false); break; case 265: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator ) // Rule 266: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
// //
case 269: { action. consumeDirectDeclaratorBracketed(); break; case 266: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 270: array_direct_abstract_declarator ::= array_modifier // Rule 270: basic_direct_abstract_declarator ::= ( abstract_declarator )
// //
case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break; case 270: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier // Rule 271: array_direct_abstract_declarator ::= array_modifier
// //
case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 271: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
} }
// //
// Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier // Rule 272: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
// //
case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 273: function_direct_abstract_declarator ::= ( ) // Rule 273: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
// //
case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break; case 273: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( ) // Rule 274: function_direct_abstract_declarator ::= ( )
// //
case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
} }
// //
// Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list ) // Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
// //
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break; case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list ) // Rule 276: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
// //
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 276: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
} }
// //
// Rule 277: initializer ::= assignment_expression // Rule 277: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
// //
case 277: { action. consumeInitializer(); break; case 277: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt } // Rule 278: initializer ::= assignment_expression
// //
case 278: { action. consumeInitializerList(); break; case 278: { action. consumeInitializer(); break;
} }
// //
// Rule 283: designated_initializer ::= <openscope-ast> designation = initializer // Rule 279: initializer ::= { <openscope-ast> initializer_list comma_opt }
// //
case 283: { action. consumeInitializerDesignated(); break; case 279: { action. consumeInitializerList(); break;
} }
// //
// Rule 287: designator_base ::= [ constant_expression ] // Rule 284: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 287: { action. consumeDesignatorArray(); break; case 284: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 288: designator_base ::= . identifier_or_typedefname // Rule 288: designator_base ::= [ constant_expression ]
// //
case 288: { action. consumeDesignatorField(); break; case 288: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 289: designator ::= [ constant_expression ] // Rule 289: designator_base ::= . identifier_or_typedefname
// //
case 289: { action. consumeDesignatorArray(); break; case 289: { action. consumeDesignatorField(); break;
} }
// //
// Rule 290: designator ::= . identifier_or_typedefname // Rule 290: designator ::= [ constant_expression ]
// //
case 290: { action. consumeDesignatorField(); break; case 290: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 291: translation_unit ::= external_declaration_list // Rule 291: designator ::= . identifier_or_typedefname
// //
case 291: { action. consumeTranslationUnit(); break; case 291: { action. consumeDesignatorField(); break;
} }
// //
// Rule 292: translation_unit ::= $Empty // Rule 292: translation_unit ::= external_declaration_list
// //
case 292: { action. consumeTranslationUnit(); break; case 292: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 297: external_declaration ::= ; // Rule 293: translation_unit ::= $Empty
// //
case 297: { action. consumeDeclarationEmpty(); break; case 293: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 298: external_declaration ::= ERROR_TOKEN // Rule 298: external_declaration ::= ;
// //
case 298: { action. consumeDeclarationProblem(); break; case 298: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 299: external_declaration ::= ERROR_TOKEN
// //
case 301: { action. consumeFunctionDefinition(true); break; case 299: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 302: function_definition ::= <openscope-ast> function_declarator function_body // Rule 302: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 302: { action. consumeFunctionDefinition(false); break; case 302: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 303: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 303: { action. consumeFunctionDefinitionKnR(); break; case 303: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 304: function_body ::= { } // Rule 304: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 304: { action. consumeStatementCompoundStatement(false); break; case 304: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 305: function_body ::= { <openscope-ast> block_item_list } // Rule 305: function_body ::= { }
// //
case 305: { action. consumeStatementCompoundStatement(true); break; case 305: { action. consumeStatementCompoundStatement(false); break;
} }
// //
// Rule 307: expression_parser_start ::= ERROR_TOKEN // Rule 306: function_body ::= { <openscope-ast> block_item_list }
// //
case 307: { action. consumeExpressionProblem(); break; case 306: { action. consumeStatementCompoundStatement(true); break;
}
//
// Rule 308: expression_parser_start ::= ERROR_TOKEN
//
case 308: { action. consumeExpressionProblem(); break;
} }

View file

@ -15,114 +15,120 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
public interface C99ExpressionStatementParsersym { public interface C99ExpressionStatementParsersym {
public final static int public final static int
TK_auto = 24, TK_auto = 14,
TK_break = 81, TK_break = 81,
TK_case = 82, TK_case = 82,
TK_char = 36, TK_char = 29,
TK_const = 8, TK_const = 6,
TK_continue = 83, TK_continue = 83,
TK_default = 84, TK_default = 84,
TK_do = 85, TK_do = 85,
TK_double = 37, TK_double = 30,
TK_else = 86, TK_else = 86,
TK_enum = 58, TK_enum = 42,
TK_extern = 25, TK_extern = 15,
TK_float = 38, TK_float = 31,
TK_for = 87, TK_for = 87,
TK_goto = 88, TK_goto = 88,
TK_if = 89, TK_if = 89,
TK_inline = 26, TK_inline = 16,
TK_int = 39, TK_int = 32,
TK_long = 40, TK_long = 33,
TK_register = 27, TK_register = 17,
TK_restrict = 9, TK_restrict = 7,
TK_return = 90, TK_return = 90,
TK_short = 41, TK_short = 34,
TK_signed = 42, TK_signed = 35,
TK_sizeof = 15, TK_sizeof = 21,
TK_static = 23, TK_static = 9,
TK_struct = 59, TK_struct = 43,
TK_switch = 91, TK_switch = 91,
TK_typedef = 28, TK_typedef = 18,
TK_union = 60, TK_union = 44,
TK_unsigned = 43, TK_unsigned = 36,
TK_void = 44, TK_void = 37,
TK_volatile = 10, TK_volatile = 8,
TK_while = 92, TK_while = 92,
TK__Bool = 45, TK__Bool = 38,
TK__Complex = 46, TK__Complex = 39,
TK__Imaginary = 47, TK__Imaginary = 40,
TK_integer = 16, TK_integer = 22,
TK_floating = 17, TK_floating = 23,
TK_charconst = 18, TK_charconst = 24,
TK_stringlit = 19, TK_stringlit = 25,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 4, TK_Completion = 3,
TK_EndOfCompletion = 5, TK_EndOfCompletion = 5,
TK_Invalid = 93, TK_Invalid = 93,
TK_LeftBracket = 11, TK_LeftBracket = 12,
TK_LeftParen = 2, TK_LeftParen = 2,
TK_LeftBrace = 22, TK_LeftBrace = 28,
TK_Dot = 48, TK_Dot = 52,
TK_Arrow = 66, TK_Arrow = 67,
TK_PlusPlus = 13, TK_PlusPlus = 19,
TK_MinusMinus = 14, TK_MinusMinus = 20,
TK_And = 12, TK_And = 13,
TK_Star = 3, TK_Star = 4,
TK_Plus = 6, TK_Plus = 10,
TK_Minus = 7, TK_Minus = 11,
TK_Tilde = 20, TK_Tilde = 26,
TK_Bang = 21, TK_Bang = 27,
TK_Slash = 49, TK_Slash = 53,
TK_Percent = 50, TK_Percent = 54,
TK_RightShift = 31, TK_RightShift = 48,
TK_LeftShift = 32, TK_LeftShift = 49,
TK_LT = 51, TK_LT = 55,
TK_GT = 52, TK_GT = 56,
TK_LE = 53, TK_LE = 57,
TK_GE = 54, TK_GE = 58,
TK_EQ = 61, TK_EQ = 62,
TK_NE = 62, TK_NE = 63,
TK_Caret = 63, TK_Caret = 64,
TK_Or = 64, TK_Or = 65,
TK_AndAnd = 65, TK_AndAnd = 66,
TK_OrOr = 67, TK_OrOr = 68,
TK_Question = 68, TK_Question = 69,
TK_Colon = 55, TK_Colon = 59,
TK_DotDotDot = 33, TK_DotDotDot = 50,
TK_Assign = 56, TK_Assign = 60,
TK_StarAssign = 69, TK_StarAssign = 70,
TK_SlashAssign = 70, TK_SlashAssign = 71,
TK_PercentAssign = 71, TK_PercentAssign = 72,
TK_PlusAssign = 72, TK_PlusAssign = 73,
TK_MinusAssign = 73, TK_MinusAssign = 74,
TK_RightShiftAssign = 74, TK_RightShiftAssign = 75,
TK_LeftShiftAssign = 75, TK_LeftShiftAssign = 76,
TK_AndAssign = 76, TK_AndAssign = 77,
TK_CaretAssign = 77, TK_CaretAssign = 78,
TK_OrAssign = 78, TK_OrAssign = 79,
TK_Comma = 30, TK_Comma = 45,
TK_RightBracket = 34, TK_RightBracket = 51,
TK_RightParen = 29, TK_RightParen = 41,
TK_RightBrace = 35, TK_RightBrace = 46,
TK_SemiColon = 57, TK_SemiColon = 61,
TK_ERROR_TOKEN = 79, TK_ERROR_TOKEN = 47,
TK_EOF_TOKEN = 80; TK_EOF_TOKEN = 80;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
"", "",
"identifier", "identifier",
"LeftParen", "LeftParen",
"Star",
"Completion", "Completion",
"Star",
"EndOfCompletion", "EndOfCompletion",
"Plus",
"Minus",
"const", "const",
"restrict", "restrict",
"volatile", "volatile",
"static",
"Plus",
"Minus",
"LeftBracket", "LeftBracket",
"And", "And",
"auto",
"extern",
"inline",
"register",
"typedef",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"sizeof", "sizeof",
@ -133,19 +139,6 @@ public interface C99ExpressionStatementParsersym {
"Tilde", "Tilde",
"Bang", "Bang",
"LeftBrace", "LeftBrace",
"static",
"auto",
"extern",
"inline",
"register",
"typedef",
"RightParen",
"Comma",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"RightBrace",
"char", "char",
"double", "double",
"float", "float",
@ -158,6 +151,17 @@ public interface C99ExpressionStatementParsersym {
"_Bool", "_Bool",
"_Complex", "_Complex",
"_Imaginary", "_Imaginary",
"RightParen",
"enum",
"struct",
"union",
"Comma",
"RightBrace",
"ERROR_TOKEN",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"Dot", "Dot",
"Slash", "Slash",
"Percent", "Percent",
@ -168,9 +172,6 @@ public interface C99ExpressionStatementParsersym {
"Colon", "Colon",
"Assign", "Assign",
"SemiColon", "SemiColon",
"enum",
"struct",
"union",
"EQ", "EQ",
"NE", "NE",
"Caret", "Caret",
@ -189,7 +190,6 @@ public interface C99ExpressionStatementParsersym {
"AndAssign", "AndAssign",
"CaretAssign", "CaretAssign",
"OrAssign", "OrAssign",
"ERROR_TOKEN",
"EOF_TOKEN", "EOF_TOKEN",
"break", "break",
"case", "case",

View file

@ -829,411 +829,417 @@ public C99NoCastExpressionParser(String[] mapFrom) { // constructor
} }
// //
// Rule 199: struct_declarator ::= : constant_expression // Rule 194: struct_declaration ::= ERROR_TOKEN
// //
case 199: { action. consumeBitField(false); break; case 194: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 200: struct_declarator ::= declarator : constant_expression // Rule 200: struct_declarator ::= : constant_expression
// //
case 200: { action. consumeBitField(true); break; case 200: { action. consumeBitField(false); break;
} }
// //
// Rule 201: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt } // Rule 201: struct_declarator ::= declarator : constant_expression
// //
case 201: { action. consumeTypeSpecifierEnumeration(false); break; case 201: { action. consumeBitField(true); break;
} }
// //
// Rule 202: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt } // Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 202: { action. consumeTypeSpecifierEnumeration(true); break; case 202: { action. consumeTypeSpecifierEnumeration(false); break;
} }
// //
// Rule 207: enumerator ::= identifier_or_typedefname // Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 207: { action. consumeEnumerator(false); break; case 203: { action. consumeTypeSpecifierEnumeration(true); break;
} }
// //
// Rule 208: enumerator ::= identifier_or_typedefname = constant_expression // Rule 208: enumerator ::= identifier_or_typedefname
// //
case 208: { action. consumeEnumerator(true); break; case 208: { action. consumeEnumerator(false); break;
} }
// //
// Rule 209: type_qualifier ::= type_qualifier_token // Rule 209: enumerator ::= identifier_or_typedefname = constant_expression
// //
case 209: { action. consumeDeclSpecToken(); break; case 209: { action. consumeEnumerator(true); break;
} }
// //
// Rule 213: function_specifier ::= inline // Rule 210: type_qualifier ::= type_qualifier_token
// //
case 213: { action. consumeDeclSpecToken(); break; case 210: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 215: declarator ::= <openscope-ast> pointer_seq direct_declarator // Rule 214: function_specifier ::= inline
// //
case 215: { action. consumeDeclaratorWithPointer(true); break; case 214: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 220: basic_direct_declarator ::= declarator_id_name // Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator
// //
case 220: { action. consumeDirectDeclaratorIdentifier(); break; case 216: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 221: basic_direct_declarator ::= ( declarator ) // Rule 221: basic_direct_declarator ::= declarator_id_name
// //
case 221: { action. consumeDirectDeclaratorBracketed(); break; case 221: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 222: declarator_id_name ::= identifier // Rule 222: basic_direct_declarator ::= ( declarator )
// //
case 222: { action. consumeIdentifierName(); break; case 222: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 223: array_direct_declarator ::= basic_direct_declarator array_modifier // Rule 223: declarator_id_name ::= identifier
// //
case 223: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 223: { action. consumeIdentifierName(); break;
} }
// //
// Rule 224: array_direct_declarator ::= array_direct_declarator array_modifier // Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier
// //
case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 226: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list ) // Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier
// //
case 226: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 227: function_direct_declarator ::= basic_direct_declarator ( ) // Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
// //
case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 229: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator // Rule 228: function_direct_declarator ::= basic_direct_declarator ( )
// //
case 229: { action. consumeDeclaratorWithPointer(true); break; case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 230: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list ) // Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
// //
case 230: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break; case 230: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 232: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator // Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
// //
case 232: { action. consumeDeclaratorWithPointer(true); break; case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
} }
// //
// Rule 233: identifier_list ::= identifier // Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
// //
case 233: { action. consumeIdentifierKnR(); break; case 233: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 234: identifier_list ::= identifier_list , identifier // Rule 234: identifier_list ::= identifier
// //
case 234: { action. consumeIdentifierKnR(); break; case 234: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 235: array_modifier ::= [ ] // Rule 235: identifier_list ::= identifier_list , identifier
// //
case 235: { action. consumeDirectDeclaratorArrayModifier(false); break; case 235: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 236: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ] // Rule 236: array_modifier ::= [ ]
// //
case 236: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break; case 236: { action. consumeDirectDeclaratorArrayModifier(false); break;
} }
// //
// Rule 237: array_modifier ::= [ assignment_expression ] // Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
// //
case 237: { action. consumeDirectDeclaratorArrayModifier(true); break; case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
} }
// //
// Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 238: array_modifier ::= [ assignment_expression ]
// //
case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break; case 238: { action. consumeDirectDeclaratorArrayModifier(true); break;
} }
// //
// Rule 239: array_modifier ::= [ static assignment_expression ] // Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break; case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
} }
// //
// Rule 240: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 240: array_modifier ::= [ static assignment_expression ]
// //
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
} }
// //
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ] // Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 242: array_modifier ::= [ * ] // Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
// //
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break; case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ] // Rule 243: array_modifier ::= [ * ]
// //
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break; case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
} }
// //
// Rule 245: pointer_seq ::= * // Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
// //
case 245: { action. consumePointer(); break; case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
} }
// //
// Rule 246: pointer_seq ::= pointer_seq * // Rule 246: pointer_seq ::= *
// //
case 246: { action. consumePointer(); break; case 246: { action. consumePointer(); break;
} }
// //
// Rule 247: pointer_seq ::= * <openscope-ast> type_qualifier_list // Rule 247: pointer_seq ::= pointer_seq *
// //
case 247: { action. consumePointerTypeQualifierList(); break; case 247: { action. consumePointer(); break;
} }
// //
// Rule 248: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list // Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list
// //
case 248: { action. consumePointerTypeQualifierList(); break; case 248: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 251: parameter_type_list ::= parameter_list // Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
// //
case 251: { action. consumeEmpty(); break; case 249: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 252: parameter_type_list ::= parameter_list , ... // Rule 252: parameter_type_list ::= parameter_list
// //
case 252: { action. consumePlaceHolder(); break; case 252: { action. consumeEmpty(); break;
} }
// //
// Rule 253: parameter_type_list ::= ... // Rule 253: parameter_type_list ::= parameter_list , ...
// //
case 253: { action. consumePlaceHolder(); break; case 253: { action. consumePlaceHolder(); break;
} }
// //
// Rule 256: parameter_declaration ::= declaration_specifiers complete_parameter_declarator // Rule 254: parameter_type_list ::= ...
// //
case 256: { action. consumeParameterDeclaration(); break; case 254: { action. consumePlaceHolder(); break;
} }
// //
// Rule 257: parameter_declaration ::= declaration_specifiers // Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
// //
case 257: { action. consumeParameterDeclarationWithoutDeclarator(); break; case 257: { action. consumeParameterDeclaration(); break;
} }
// //
// Rule 260: type_name ::= specifier_qualifier_list // Rule 258: parameter_declaration ::= declaration_specifiers
// //
case 260: { action. consumeTypeId(false); break; case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break;
} }
// //
// Rule 261: type_name ::= specifier_qualifier_list abstract_declarator // Rule 261: type_name ::= specifier_qualifier_list
// //
case 261: { action. consumeTypeId(true); break; case 261: { action. consumeTypeId(false); break;
} }
// //
// Rule 263: abstract_declarator ::= <openscope-ast> pointer_seq // Rule 262: type_name ::= specifier_qualifier_list abstract_declarator
// //
case 263: { action. consumeDeclaratorWithPointer(false); break; case 262: { action. consumeTypeId(true); break;
} }
// //
// Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq
// //
case 264: { action. consumeDeclaratorWithPointer(false); break; case 264: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 268: basic_direct_abstract_declarator ::= ( abstract_declarator ) // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
// //
case 268: { action. consumeDirectDeclaratorBracketed(); break; case 265: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 269: array_direct_abstract_declarator ::= array_modifier // Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator )
// //
case 269: { action. consumeDirectDeclaratorArrayDeclarator(false); break; case 269: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 270: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier // Rule 270: array_direct_abstract_declarator ::= array_modifier
// //
case 270: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
} }
// //
// Rule 271: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier // Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
// //
case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 272: function_direct_abstract_declarator ::= ( ) // Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
// //
case 272: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break; case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 273: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( ) // Rule 273: function_direct_abstract_declarator ::= ( )
// //
case 273: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
} }
// //
// Rule 274: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list ) // Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
// //
case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break; case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list ) // Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
// //
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
} }
// //
// Rule 276: initializer ::= assignment_expression // Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
// //
case 276: { action. consumeInitializer(); break; case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 277: initializer ::= { <openscope-ast> initializer_list comma_opt } // Rule 277: initializer ::= assignment_expression
// //
case 277: { action. consumeInitializerList(); break; case 277: { action. consumeInitializer(); break;
} }
// //
// Rule 282: designated_initializer ::= <openscope-ast> designation = initializer // Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt }
// //
case 282: { action. consumeInitializerDesignated(); break; case 278: { action. consumeInitializerList(); break;
} }
// //
// Rule 286: designator_base ::= [ constant_expression ] // Rule 283: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 286: { action. consumeDesignatorArray(); break; case 283: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 287: designator_base ::= . identifier_or_typedefname // Rule 287: designator_base ::= [ constant_expression ]
// //
case 287: { action. consumeDesignatorField(); break; case 287: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 288: designator ::= [ constant_expression ] // Rule 288: designator_base ::= . identifier_or_typedefname
// //
case 288: { action. consumeDesignatorArray(); break; case 288: { action. consumeDesignatorField(); break;
} }
// //
// Rule 289: designator ::= . identifier_or_typedefname // Rule 289: designator ::= [ constant_expression ]
// //
case 289: { action. consumeDesignatorField(); break; case 289: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 290: translation_unit ::= external_declaration_list // Rule 290: designator ::= . identifier_or_typedefname
// //
case 290: { action. consumeTranslationUnit(); break; case 290: { action. consumeDesignatorField(); break;
} }
// //
// Rule 291: translation_unit ::= $Empty // Rule 291: translation_unit ::= external_declaration_list
// //
case 291: { action. consumeTranslationUnit(); break; case 291: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 296: external_declaration ::= ; // Rule 292: translation_unit ::= $Empty
// //
case 296: { action. consumeDeclarationEmpty(); break; case 292: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 297: external_declaration ::= ERROR_TOKEN // Rule 297: external_declaration ::= ;
// //
case 297: { action. consumeDeclarationProblem(); break; case 297: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 300: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 298: external_declaration ::= ERROR_TOKEN
// //
case 300: { action. consumeFunctionDefinition(true); break; case 298: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 301: function_definition ::= <openscope-ast> function_declarator function_body // Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 301: { action. consumeFunctionDefinition(false); break; case 301: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 302: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 302: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 302: { action. consumeFunctionDefinitionKnR(); break; case 302: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 303: function_body ::= { } // Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 303: { action. consumeStatementCompoundStatement(false); break; case 303: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 304: function_body ::= { <openscope-ast> block_item_list } // Rule 304: function_body ::= { }
// //
case 304: { action. consumeStatementCompoundStatement(true); break; case 304: { action. consumeStatementCompoundStatement(false); break;
} }
// //
// Rule 306: no_cast_start ::= ERROR_TOKEN // Rule 305: function_body ::= { <openscope-ast> block_item_list }
// //
case 306: { action. consumeExpressionProblem(); break; case 305: { action. consumeStatementCompoundStatement(true); break;
}
//
// Rule 307: no_cast_start ::= ERROR_TOKEN
//
case 307: { action. consumeExpressionProblem(); break;
} }

View file

@ -15,118 +15,123 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
public interface C99NoCastExpressionParsersym { public interface C99NoCastExpressionParsersym {
public final static int public final static int
TK_auto = 24, TK_auto = 11,
TK_break = 81, TK_break = 81,
TK_case = 82, TK_case = 82,
TK_char = 36, TK_char = 29,
TK_const = 6, TK_const = 6,
TK_continue = 83, TK_continue = 83,
TK_default = 84, TK_default = 84,
TK_do = 85, TK_do = 85,
TK_double = 37, TK_double = 30,
TK_else = 86, TK_else = 86,
TK_enum = 57, TK_enum = 42,
TK_extern = 25, TK_extern = 12,
TK_float = 38, TK_float = 31,
TK_for = 87, TK_for = 87,
TK_goto = 88, TK_goto = 88,
TK_if = 89, TK_if = 89,
TK_inline = 26, TK_inline = 13,
TK_int = 39, TK_int = 32,
TK_long = 40, TK_long = 33,
TK_register = 27, TK_register = 14,
TK_restrict = 7, TK_restrict = 7,
TK_return = 90, TK_return = 90,
TK_short = 41, TK_short = 34,
TK_signed = 42, TK_signed = 35,
TK_sizeof = 15, TK_sizeof = 21,
TK_static = 16, TK_static = 9,
TK_struct = 58, TK_struct = 43,
TK_switch = 91, TK_switch = 91,
TK_typedef = 28, TK_typedef = 15,
TK_union = 59, TK_union = 44,
TK_unsigned = 43, TK_unsigned = 36,
TK_void = 44, TK_void = 37,
TK_volatile = 8, TK_volatile = 8,
TK_while = 92, TK_while = 92,
TK__Bool = 45, TK__Bool = 38,
TK__Complex = 46, TK__Complex = 39,
TK__Imaginary = 47, TK__Imaginary = 40,
TK_integer = 17, TK_integer = 22,
TK_floating = 18, TK_floating = 23,
TK_charconst = 19, TK_charconst = 24,
TK_stringlit = 20, TK_stringlit = 25,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 4, TK_Completion = 3,
TK_EndOfCompletion = 5, TK_EndOfCompletion = 5,
TK_Invalid = 93, TK_Invalid = 93,
TK_LeftBracket = 9, TK_LeftBracket = 10,
TK_LeftParen = 2, TK_LeftParen = 2,
TK_LeftBrace = 21, TK_LeftBrace = 26,
TK_Dot = 48, TK_Dot = 52,
TK_Arrow = 66, TK_Arrow = 67,
TK_PlusPlus = 13, TK_PlusPlus = 19,
TK_MinusMinus = 14, TK_MinusMinus = 20,
TK_And = 12, TK_And = 18,
TK_Star = 3, TK_Star = 4,
TK_Plus = 10, TK_Plus = 16,
TK_Minus = 11, TK_Minus = 17,
TK_Tilde = 22, TK_Tilde = 27,
TK_Bang = 23, TK_Bang = 28,
TK_Slash = 49, TK_Slash = 53,
TK_Percent = 50, TK_Percent = 54,
TK_RightShift = 31, TK_RightShift = 48,
TK_LeftShift = 32, TK_LeftShift = 49,
TK_LT = 51, TK_LT = 55,
TK_GT = 52, TK_GT = 56,
TK_LE = 53, TK_LE = 57,
TK_GE = 54, TK_GE = 58,
TK_EQ = 60, TK_EQ = 61,
TK_NE = 61, TK_NE = 62,
TK_Caret = 62, TK_Caret = 63,
TK_Or = 63, TK_Or = 64,
TK_AndAnd = 64, TK_AndAnd = 65,
TK_OrOr = 67, TK_OrOr = 68,
TK_Question = 68, TK_Question = 69,
TK_Colon = 55, TK_Colon = 59,
TK_DotDotDot = 33, TK_DotDotDot = 50,
TK_Assign = 56, TK_Assign = 60,
TK_StarAssign = 69, TK_StarAssign = 70,
TK_SlashAssign = 70, TK_SlashAssign = 71,
TK_PercentAssign = 71, TK_PercentAssign = 72,
TK_PlusAssign = 72, TK_PlusAssign = 73,
TK_MinusAssign = 73, TK_MinusAssign = 74,
TK_RightShiftAssign = 74, TK_RightShiftAssign = 75,
TK_LeftShiftAssign = 75, TK_LeftShiftAssign = 76,
TK_AndAssign = 76, TK_AndAssign = 77,
TK_CaretAssign = 77, TK_CaretAssign = 78,
TK_OrAssign = 78, TK_OrAssign = 79,
TK_Comma = 30, TK_Comma = 45,
TK_RightBracket = 34, TK_RightBracket = 51,
TK_RightParen = 29, TK_RightParen = 41,
TK_RightBrace = 35, TK_RightBrace = 46,
TK_SemiColon = 65, TK_SemiColon = 66,
TK_ERROR_TOKEN = 79, TK_ERROR_TOKEN = 47,
TK_EOF_TOKEN = 80; TK_EOF_TOKEN = 80;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
"", "",
"identifier", "identifier",
"LeftParen", "LeftParen",
"Star",
"Completion", "Completion",
"Star",
"EndOfCompletion", "EndOfCompletion",
"const", "const",
"restrict", "restrict",
"volatile", "volatile",
"static",
"LeftBracket", "LeftBracket",
"auto",
"extern",
"inline",
"register",
"typedef",
"Plus", "Plus",
"Minus", "Minus",
"And", "And",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"sizeof", "sizeof",
"static",
"integer", "integer",
"floating", "floating",
"charconst", "charconst",
@ -134,18 +139,6 @@ public interface C99NoCastExpressionParsersym {
"LeftBrace", "LeftBrace",
"Tilde", "Tilde",
"Bang", "Bang",
"auto",
"extern",
"inline",
"register",
"typedef",
"RightParen",
"Comma",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"RightBrace",
"char", "char",
"double", "double",
"float", "float",
@ -158,6 +151,17 @@ public interface C99NoCastExpressionParsersym {
"_Bool", "_Bool",
"_Complex", "_Complex",
"_Imaginary", "_Imaginary",
"RightParen",
"enum",
"struct",
"union",
"Comma",
"RightBrace",
"ERROR_TOKEN",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"Dot", "Dot",
"Slash", "Slash",
"Percent", "Percent",
@ -167,9 +171,6 @@ public interface C99NoCastExpressionParsersym {
"GE", "GE",
"Colon", "Colon",
"Assign", "Assign",
"enum",
"struct",
"union",
"EQ", "EQ",
"NE", "NE",
"Caret", "Caret",
@ -189,7 +190,6 @@ public interface C99NoCastExpressionParsersym {
"AndAssign", "AndAssign",
"CaretAssign", "CaretAssign",
"OrAssign", "OrAssign",
"ERROR_TOKEN",
"EOF_TOKEN", "EOF_TOKEN",
"break", "break",
"case", "case",

View file

@ -835,405 +835,411 @@ public C99Parser(String[] mapFrom) { // constructor
} }
// //
// Rule 200: struct_declarator ::= : constant_expression // Rule 195: struct_declaration ::= ERROR_TOKEN
// //
case 200: { action. consumeBitField(false); break; case 195: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 201: struct_declarator ::= declarator : constant_expression // Rule 201: struct_declarator ::= : constant_expression
// //
case 201: { action. consumeBitField(true); break; case 201: { action. consumeBitField(false); break;
} }
// //
// Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt } // Rule 202: struct_declarator ::= declarator : constant_expression
// //
case 202: { action. consumeTypeSpecifierEnumeration(false); break; case 202: { action. consumeBitField(true); break;
} }
// //
// Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt } // Rule 203: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 203: { action. consumeTypeSpecifierEnumeration(true); break; case 203: { action. consumeTypeSpecifierEnumeration(false); break;
} }
// //
// Rule 208: enumerator ::= identifier_or_typedefname // Rule 204: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 208: { action. consumeEnumerator(false); break; case 204: { action. consumeTypeSpecifierEnumeration(true); break;
} }
// //
// Rule 209: enumerator ::= identifier_or_typedefname = constant_expression // Rule 209: enumerator ::= identifier_or_typedefname
// //
case 209: { action. consumeEnumerator(true); break; case 209: { action. consumeEnumerator(false); break;
} }
// //
// Rule 210: type_qualifier ::= type_qualifier_token // Rule 210: enumerator ::= identifier_or_typedefname = constant_expression
// //
case 210: { action. consumeDeclSpecToken(); break; case 210: { action. consumeEnumerator(true); break;
} }
// //
// Rule 214: function_specifier ::= inline // Rule 211: type_qualifier ::= type_qualifier_token
// //
case 214: { action. consumeDeclSpecToken(); break; case 211: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator // Rule 215: function_specifier ::= inline
// //
case 216: { action. consumeDeclaratorWithPointer(true); break; case 215: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 221: basic_direct_declarator ::= declarator_id_name // Rule 217: declarator ::= <openscope-ast> pointer_seq direct_declarator
// //
case 221: { action. consumeDirectDeclaratorIdentifier(); break; case 217: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 222: basic_direct_declarator ::= ( declarator ) // Rule 222: basic_direct_declarator ::= declarator_id_name
// //
case 222: { action. consumeDirectDeclaratorBracketed(); break; case 222: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 223: declarator_id_name ::= identifier // Rule 223: basic_direct_declarator ::= ( declarator )
// //
case 223: { action. consumeIdentifierName(); break; case 223: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier // Rule 224: declarator_id_name ::= identifier
// //
case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 224: { action. consumeIdentifierName(); break;
} }
// //
// Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier // Rule 225: array_direct_declarator ::= basic_direct_declarator array_modifier
// //
case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list ) // Rule 226: array_direct_declarator ::= array_direct_declarator array_modifier
// //
case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 228: function_direct_declarator ::= basic_direct_declarator ( ) // Rule 228: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
// //
case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator // Rule 229: function_direct_declarator ::= basic_direct_declarator ( )
// //
case 230: { action. consumeDeclaratorWithPointer(true); break; case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list ) // Rule 231: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
// //
case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break; case 231: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator // Rule 232: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
// //
case 233: { action. consumeDeclaratorWithPointer(true); break; case 232: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
} }
// //
// Rule 234: identifier_list ::= identifier // Rule 234: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
// //
case 234: { action. consumeIdentifierKnR(); break; case 234: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 235: identifier_list ::= identifier_list , identifier // Rule 235: identifier_list ::= identifier
// //
case 235: { action. consumeIdentifierKnR(); break; case 235: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 236: array_modifier ::= [ ] // Rule 236: identifier_list ::= identifier_list , identifier
// //
case 236: { action. consumeDirectDeclaratorArrayModifier(false); break; case 236: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ] // Rule 237: array_modifier ::= [ ]
// //
case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break; case 237: { action. consumeDirectDeclaratorArrayModifier(false); break;
} }
// //
// Rule 238: array_modifier ::= [ assignment_expression ] // Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
// //
case 238: { action. consumeDirectDeclaratorArrayModifier(true); break; case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
} }
// //
// Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 239: array_modifier ::= [ assignment_expression ]
// //
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break; case 239: { action. consumeDirectDeclaratorArrayModifier(true); break;
} }
// //
// Rule 240: array_modifier ::= [ static assignment_expression ] // Rule 240: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break; case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
} }
// //
// Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 241: array_modifier ::= [ static assignment_expression ]
// //
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
} }
// //
// Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ] // Rule 242: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 243: array_modifier ::= [ * ] // Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
// //
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break; case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ] // Rule 244: array_modifier ::= [ * ]
// //
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break; case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
} }
// //
// Rule 246: pointer_seq ::= * // Rule 245: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
// //
case 246: { action. consumePointer(); break; case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
} }
// //
// Rule 247: pointer_seq ::= pointer_seq * // Rule 247: pointer_seq ::= *
// //
case 247: { action. consumePointer(); break; case 247: { action. consumePointer(); break;
} }
// //
// Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list // Rule 248: pointer_seq ::= pointer_seq *
// //
case 248: { action. consumePointerTypeQualifierList(); break; case 248: { action. consumePointer(); break;
} }
// //
// Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list // Rule 249: pointer_seq ::= * <openscope-ast> type_qualifier_list
// //
case 249: { action. consumePointerTypeQualifierList(); break; case 249: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 252: parameter_type_list ::= parameter_list // Rule 250: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
// //
case 252: { action. consumeEmpty(); break; case 250: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 253: parameter_type_list ::= parameter_list , ... // Rule 253: parameter_type_list ::= parameter_list
// //
case 253: { action. consumePlaceHolder(); break; case 253: { action. consumeEmpty(); break;
} }
// //
// Rule 254: parameter_type_list ::= ... // Rule 254: parameter_type_list ::= parameter_list , ...
// //
case 254: { action. consumePlaceHolder(); break; case 254: { action. consumePlaceHolder(); break;
} }
// //
// Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator // Rule 255: parameter_type_list ::= ...
// //
case 257: { action. consumeParameterDeclaration(); break; case 255: { action. consumePlaceHolder(); break;
} }
// //
// Rule 258: parameter_declaration ::= declaration_specifiers // Rule 258: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
// //
case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break; case 258: { action. consumeParameterDeclaration(); break;
} }
// //
// Rule 261: type_name ::= specifier_qualifier_list // Rule 259: parameter_declaration ::= declaration_specifiers
// //
case 261: { action. consumeTypeId(false); break; case 259: { action. consumeParameterDeclarationWithoutDeclarator(); break;
} }
// //
// Rule 262: type_name ::= specifier_qualifier_list abstract_declarator // Rule 262: type_name ::= specifier_qualifier_list
// //
case 262: { action. consumeTypeId(true); break; case 262: { action. consumeTypeId(false); break;
} }
// //
// Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq // Rule 263: type_name ::= specifier_qualifier_list abstract_declarator
// //
case 264: { action. consumeDeclaratorWithPointer(false); break; case 263: { action. consumeTypeId(true); break;
} }
// //
// Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq
// //
case 265: { action. consumeDeclaratorWithPointer(false); break; case 265: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator ) // Rule 266: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
// //
case 269: { action. consumeDirectDeclaratorBracketed(); break; case 266: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 270: array_direct_abstract_declarator ::= array_modifier // Rule 270: basic_direct_abstract_declarator ::= ( abstract_declarator )
// //
case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break; case 270: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier // Rule 271: array_direct_abstract_declarator ::= array_modifier
// //
case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 271: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
} }
// //
// Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier // Rule 272: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
// //
case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 273: function_direct_abstract_declarator ::= ( ) // Rule 273: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
// //
case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break; case 273: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( ) // Rule 274: function_direct_abstract_declarator ::= ( )
// //
case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
} }
// //
// Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list ) // Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
// //
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break; case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list ) // Rule 276: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
// //
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 276: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
} }
// //
// Rule 277: initializer ::= assignment_expression // Rule 277: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
// //
case 277: { action. consumeInitializer(); break; case 277: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt } // Rule 278: initializer ::= assignment_expression
// //
case 278: { action. consumeInitializerList(); break; case 278: { action. consumeInitializer(); break;
} }
// //
// Rule 283: designated_initializer ::= <openscope-ast> designation = initializer // Rule 279: initializer ::= { <openscope-ast> initializer_list comma_opt }
// //
case 283: { action. consumeInitializerDesignated(); break; case 279: { action. consumeInitializerList(); break;
} }
// //
// Rule 287: designator_base ::= [ constant_expression ] // Rule 284: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 287: { action. consumeDesignatorArray(); break; case 284: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 288: designator_base ::= . identifier_or_typedefname // Rule 288: designator_base ::= [ constant_expression ]
// //
case 288: { action. consumeDesignatorField(); break; case 288: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 289: designator ::= [ constant_expression ] // Rule 289: designator_base ::= . identifier_or_typedefname
// //
case 289: { action. consumeDesignatorArray(); break; case 289: { action. consumeDesignatorField(); break;
} }
// //
// Rule 290: designator ::= . identifier_or_typedefname // Rule 290: designator ::= [ constant_expression ]
// //
case 290: { action. consumeDesignatorField(); break; case 290: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 291: translation_unit ::= external_declaration_list // Rule 291: designator ::= . identifier_or_typedefname
// //
case 291: { action. consumeTranslationUnit(); break; case 291: { action. consumeDesignatorField(); break;
} }
// //
// Rule 292: translation_unit ::= $Empty // Rule 292: translation_unit ::= external_declaration_list
// //
case 292: { action. consumeTranslationUnit(); break; case 292: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 297: external_declaration ::= ; // Rule 293: translation_unit ::= $Empty
// //
case 297: { action. consumeDeclarationEmpty(); break; case 293: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 298: external_declaration ::= ERROR_TOKEN // Rule 298: external_declaration ::= ;
// //
case 298: { action. consumeDeclarationProblem(); break; case 298: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 299: external_declaration ::= ERROR_TOKEN
// //
case 301: { action. consumeFunctionDefinition(true); break; case 299: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 302: function_definition ::= <openscope-ast> function_declarator function_body // Rule 302: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 302: { action. consumeFunctionDefinition(false); break; case 302: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 303: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 303: { action. consumeFunctionDefinitionKnR(); break; case 303: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 304: function_body ::= { } // Rule 304: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 304: { action. consumeStatementCompoundStatement(false); break; case 304: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 305: function_body ::= { <openscope-ast> block_item_list } // Rule 305: function_body ::= { }
// //
case 305: { action. consumeStatementCompoundStatement(true); break; case 305: { action. consumeStatementCompoundStatement(false); break;
}
//
// Rule 306: function_body ::= { <openscope-ast> block_item_list }
//
case 306: { action. consumeStatementCompoundStatement(true); break;
} }

View file

@ -16,63 +16,63 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
public interface C99Parsersym { public interface C99Parsersym {
public final static int public final static int
TK_auto = 24, TK_auto = 24,
TK_break = 32, TK_break = 47,
TK_case = 33, TK_case = 48,
TK_char = 42, TK_char = 30,
TK_const = 20, TK_const = 7,
TK_continue = 34, TK_continue = 49,
TK_default = 35, TK_default = 50,
TK_do = 36, TK_do = 51,
TK_double = 43, TK_double = 31,
TK_else = 79, TK_else = 79,
TK_enum = 54, TK_enum = 42,
TK_extern = 25, TK_extern = 25,
TK_float = 44, TK_float = 32,
TK_for = 37, TK_for = 52,
TK_goto = 38, TK_goto = 53,
TK_if = 39, TK_if = 54,
TK_inline = 26, TK_inline = 26,
TK_int = 45, TK_int = 33,
TK_long = 46, TK_long = 34,
TK_register = 27, TK_register = 27,
TK_restrict = 21, TK_restrict = 8,
TK_return = 40, TK_return = 55,
TK_short = 47, TK_short = 35,
TK_signed = 48, TK_signed = 36,
TK_sizeof = 12, TK_sizeof = 15,
TK_static = 23, TK_static = 22,
TK_struct = 55, TK_struct = 43,
TK_switch = 41, TK_switch = 56,
TK_typedef = 28, TK_typedef = 28,
TK_union = 56, TK_union = 44,
TK_unsigned = 49, TK_unsigned = 37,
TK_void = 50, TK_void = 38,
TK_volatile = 22, TK_volatile = 9,
TK_while = 31, TK_while = 46,
TK__Bool = 51, TK__Bool = 39,
TK__Complex = 52, TK__Complex = 40,
TK__Imaginary = 53, TK__Imaginary = 41,
TK_integer = 13, TK_integer = 16,
TK_floating = 14, TK_floating = 17,
TK_charconst = 15, TK_charconst = 18,
TK_stringlit = 16, TK_stringlit = 19,
TK_identifier = 2, TK_identifier = 1,
TK_Completion = 5, TK_Completion = 4,
TK_EndOfCompletion = 3, TK_EndOfCompletion = 3,
TK_Invalid = 93, TK_Invalid = 93,
TK_LeftBracket = 29, TK_LeftBracket = 45,
TK_LeftParen = 1, TK_LeftParen = 2,
TK_LeftBrace = 6, TK_LeftBrace = 6,
TK_Dot = 66, TK_Dot = 66,
TK_Arrow = 80, TK_Arrow = 80,
TK_PlusPlus = 10, TK_PlusPlus = 13,
TK_MinusMinus = 11, TK_MinusMinus = 14,
TK_And = 9, TK_And = 12,
TK_Star = 4, TK_Star = 5,
TK_Plus = 7, TK_Plus = 10,
TK_Minus = 8, TK_Minus = 11,
TK_Tilde = 17, TK_Tilde = 20,
TK_Bang = 18, TK_Bang = 21,
TK_Slash = 67, TK_Slash = 67,
TK_Percent = 68, TK_Percent = 68,
TK_RightShift = 62, TK_RightShift = 62,
@ -88,7 +88,7 @@ public interface C99Parsersym {
TK_AndAnd = 78, TK_AndAnd = 78,
TK_OrOr = 81, TK_OrOr = 81,
TK_Question = 82, TK_Question = 82,
TK_Colon = 59, TK_Colon = 60,
TK_DotDotDot = 64, TK_DotDotDot = 64,
TK_Assign = 61, TK_Assign = 61,
TK_StarAssign = 83, TK_StarAssign = 83,
@ -101,22 +101,25 @@ public interface C99Parsersym {
TK_AndAssign = 90, TK_AndAssign = 90,
TK_CaretAssign = 91, TK_CaretAssign = 91,
TK_OrAssign = 92, TK_OrAssign = 92,
TK_Comma = 57, TK_Comma = 58,
TK_RightBracket = 65, TK_RightBracket = 65,
TK_RightParen = 58, TK_RightParen = 59,
TK_RightBrace = 60, TK_RightBrace = 57,
TK_SemiColon = 19, TK_SemiColon = 23,
TK_ERROR_TOKEN = 30, TK_ERROR_TOKEN = 29,
TK_EOF_TOKEN = 73; TK_EOF_TOKEN = 73;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
"", "",
"LeftParen",
"identifier", "identifier",
"LeftParen",
"EndOfCompletion", "EndOfCompletion",
"Star",
"Completion", "Completion",
"Star",
"LeftBrace", "LeftBrace",
"const",
"restrict",
"volatile",
"Plus", "Plus",
"Minus", "Minus",
"And", "And",
@ -129,29 +132,14 @@ public interface C99Parsersym {
"stringlit", "stringlit",
"Tilde", "Tilde",
"Bang", "Bang",
"SemiColon",
"const",
"restrict",
"volatile",
"static", "static",
"SemiColon",
"auto", "auto",
"extern", "extern",
"inline", "inline",
"register", "register",
"typedef", "typedef",
"LeftBracket",
"ERROR_TOKEN", "ERROR_TOKEN",
"while",
"break",
"case",
"continue",
"default",
"do",
"for",
"goto",
"if",
"return",
"switch",
"char", "char",
"double", "double",
"float", "float",
@ -167,10 +155,22 @@ public interface C99Parsersym {
"enum", "enum",
"struct", "struct",
"union", "union",
"LeftBracket",
"while",
"break",
"case",
"continue",
"default",
"do",
"for",
"goto",
"if",
"return",
"switch",
"RightBrace",
"Comma", "Comma",
"RightParen", "RightParen",
"Colon", "Colon",
"RightBrace",
"Assign", "Assign",
"RightShift", "RightShift",
"LeftShift", "LeftShift",

View file

@ -829,411 +829,417 @@ public C99SizeofExpressionParser(String[] mapFrom) { // constructor
} }
// //
// Rule 199: struct_declarator ::= : constant_expression // Rule 194: struct_declaration ::= ERROR_TOKEN
// //
case 199: { action. consumeBitField(false); break; case 194: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 200: struct_declarator ::= declarator : constant_expression // Rule 200: struct_declarator ::= : constant_expression
// //
case 200: { action. consumeBitField(true); break; case 200: { action. consumeBitField(false); break;
} }
// //
// Rule 201: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt } // Rule 201: struct_declarator ::= declarator : constant_expression
// //
case 201: { action. consumeTypeSpecifierEnumeration(false); break; case 201: { action. consumeBitField(true); break;
} }
// //
// Rule 202: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt } // Rule 202: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 202: { action. consumeTypeSpecifierEnumeration(true); break; case 202: { action. consumeTypeSpecifierEnumeration(false); break;
} }
// //
// Rule 207: enumerator ::= identifier_or_typedefname // Rule 203: enum_specifier ::= enum identifier_or_typedefname { <openscope-ast> enumerator_list_opt comma_opt }
// //
case 207: { action. consumeEnumerator(false); break; case 203: { action. consumeTypeSpecifierEnumeration(true); break;
} }
// //
// Rule 208: enumerator ::= identifier_or_typedefname = constant_expression // Rule 208: enumerator ::= identifier_or_typedefname
// //
case 208: { action. consumeEnumerator(true); break; case 208: { action. consumeEnumerator(false); break;
} }
// //
// Rule 209: type_qualifier ::= type_qualifier_token // Rule 209: enumerator ::= identifier_or_typedefname = constant_expression
// //
case 209: { action. consumeDeclSpecToken(); break; case 209: { action. consumeEnumerator(true); break;
} }
// //
// Rule 213: function_specifier ::= inline // Rule 210: type_qualifier ::= type_qualifier_token
// //
case 213: { action. consumeDeclSpecToken(); break; case 210: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 215: declarator ::= <openscope-ast> pointer_seq direct_declarator // Rule 214: function_specifier ::= inline
// //
case 215: { action. consumeDeclaratorWithPointer(true); break; case 214: { action. consumeDeclSpecToken(); break;
} }
// //
// Rule 220: basic_direct_declarator ::= declarator_id_name // Rule 216: declarator ::= <openscope-ast> pointer_seq direct_declarator
// //
case 220: { action. consumeDirectDeclaratorIdentifier(); break; case 216: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 221: basic_direct_declarator ::= ( declarator ) // Rule 221: basic_direct_declarator ::= declarator_id_name
// //
case 221: { action. consumeDirectDeclaratorBracketed(); break; case 221: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 222: declarator_id_name ::= identifier // Rule 222: basic_direct_declarator ::= ( declarator )
// //
case 222: { action. consumeIdentifierName(); break; case 222: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 223: array_direct_declarator ::= basic_direct_declarator array_modifier // Rule 223: declarator_id_name ::= identifier
// //
case 223: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 223: { action. consumeIdentifierName(); break;
} }
// //
// Rule 224: array_direct_declarator ::= array_direct_declarator array_modifier // Rule 224: array_direct_declarator ::= basic_direct_declarator array_modifier
// //
case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 224: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 226: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list ) // Rule 225: array_direct_declarator ::= array_direct_declarator array_modifier
// //
case 226: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 227: function_direct_declarator ::= basic_direct_declarator ( ) // Rule 227: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
// //
case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 227: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 229: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator // Rule 228: function_direct_declarator ::= basic_direct_declarator ( )
// //
case 229: { action. consumeDeclaratorWithPointer(true); break; case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 230: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list ) // Rule 230: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
// //
case 230: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break; case 230: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 232: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator // Rule 231: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
// //
case 232: { action. consumeDeclaratorWithPointer(true); break; case 231: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
} }
// //
// Rule 233: identifier_list ::= identifier // Rule 233: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
// //
case 233: { action. consumeIdentifierKnR(); break; case 233: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 234: identifier_list ::= identifier_list , identifier // Rule 234: identifier_list ::= identifier
// //
case 234: { action. consumeIdentifierKnR(); break; case 234: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 235: array_modifier ::= [ ] // Rule 235: identifier_list ::= identifier_list , identifier
// //
case 235: { action. consumeDirectDeclaratorArrayModifier(false); break; case 235: { action. consumeIdentifierKnR(); break;
} }
// //
// Rule 236: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ] // Rule 236: array_modifier ::= [ ]
// //
case 236: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break; case 236: { action. consumeDirectDeclaratorArrayModifier(false); break;
} }
// //
// Rule 237: array_modifier ::= [ assignment_expression ] // Rule 237: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
// //
case 237: { action. consumeDirectDeclaratorArrayModifier(true); break; case 237: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
} }
// //
// Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 238: array_modifier ::= [ assignment_expression ]
// //
case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break; case 238: { action. consumeDirectDeclaratorArrayModifier(true); break;
} }
// //
// Rule 239: array_modifier ::= [ static assignment_expression ] // Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break; case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
} }
// //
// Rule 240: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ] // Rule 240: array_modifier ::= [ static assignment_expression ]
// //
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
} }
// //
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ] // Rule 241: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
// //
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break; case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 242: array_modifier ::= [ * ] // Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
// //
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break; case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
} }
// //
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ] // Rule 243: array_modifier ::= [ * ]
// //
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break; case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
} }
// //
// Rule 245: pointer_seq ::= * // Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
// //
case 245: { action. consumePointer(); break; case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
} }
// //
// Rule 246: pointer_seq ::= pointer_seq * // Rule 246: pointer_seq ::= *
// //
case 246: { action. consumePointer(); break; case 246: { action. consumePointer(); break;
} }
// //
// Rule 247: pointer_seq ::= * <openscope-ast> type_qualifier_list // Rule 247: pointer_seq ::= pointer_seq *
// //
case 247: { action. consumePointerTypeQualifierList(); break; case 247: { action. consumePointer(); break;
} }
// //
// Rule 248: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list // Rule 248: pointer_seq ::= * <openscope-ast> type_qualifier_list
// //
case 248: { action. consumePointerTypeQualifierList(); break; case 248: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 251: parameter_type_list ::= parameter_list // Rule 249: pointer_seq ::= pointer_seq * <openscope-ast> type_qualifier_list
// //
case 251: { action. consumeEmpty(); break; case 249: { action. consumePointerTypeQualifierList(); break;
} }
// //
// Rule 252: parameter_type_list ::= parameter_list , ... // Rule 252: parameter_type_list ::= parameter_list
// //
case 252: { action. consumePlaceHolder(); break; case 252: { action. consumeEmpty(); break;
} }
// //
// Rule 253: parameter_type_list ::= ... // Rule 253: parameter_type_list ::= parameter_list , ...
// //
case 253: { action. consumePlaceHolder(); break; case 253: { action. consumePlaceHolder(); break;
} }
// //
// Rule 256: parameter_declaration ::= declaration_specifiers complete_parameter_declarator // Rule 254: parameter_type_list ::= ...
// //
case 256: { action. consumeParameterDeclaration(); break; case 254: { action. consumePlaceHolder(); break;
} }
// //
// Rule 257: parameter_declaration ::= declaration_specifiers // Rule 257: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
// //
case 257: { action. consumeParameterDeclarationWithoutDeclarator(); break; case 257: { action. consumeParameterDeclaration(); break;
} }
// //
// Rule 260: type_name ::= specifier_qualifier_list // Rule 258: parameter_declaration ::= declaration_specifiers
// //
case 260: { action. consumeTypeId(false); break; case 258: { action. consumeParameterDeclarationWithoutDeclarator(); break;
} }
// //
// Rule 261: type_name ::= specifier_qualifier_list abstract_declarator // Rule 261: type_name ::= specifier_qualifier_list
// //
case 261: { action. consumeTypeId(true); break; case 261: { action. consumeTypeId(false); break;
} }
// //
// Rule 263: abstract_declarator ::= <openscope-ast> pointer_seq // Rule 262: type_name ::= specifier_qualifier_list abstract_declarator
// //
case 263: { action. consumeDeclaratorWithPointer(false); break; case 262: { action. consumeTypeId(true); break;
} }
// //
// Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator // Rule 264: abstract_declarator ::= <openscope-ast> pointer_seq
// //
case 264: { action. consumeDeclaratorWithPointer(false); break; case 264: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 268: basic_direct_abstract_declarator ::= ( abstract_declarator ) // Rule 265: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
// //
case 268: { action. consumeDirectDeclaratorBracketed(); break; case 265: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 269: array_direct_abstract_declarator ::= array_modifier // Rule 269: basic_direct_abstract_declarator ::= ( abstract_declarator )
// //
case 269: { action. consumeDirectDeclaratorArrayDeclarator(false); break; case 269: { action. consumeDirectDeclaratorBracketed(); break;
} }
// //
// Rule 270: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier // Rule 270: array_direct_abstract_declarator ::= array_modifier
// //
case 270: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 270: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
} }
// //
// Rule 271: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier // Rule 271: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
// //
case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break; case 271: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 272: function_direct_abstract_declarator ::= ( ) // Rule 272: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
// //
case 272: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break; case 272: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
} }
// //
// Rule 273: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( ) // Rule 273: function_direct_abstract_declarator ::= ( )
// //
case 273: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break; case 273: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
} }
// //
// Rule 274: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list ) // Rule 274: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
// //
case 274: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break; case 274: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
} }
// //
// Rule 275: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list ) // Rule 275: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
// //
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break; case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
} }
// //
// Rule 276: initializer ::= assignment_expression // Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
// //
case 276: { action. consumeInitializer(); break; case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
} }
// //
// Rule 277: initializer ::= { <openscope-ast> initializer_list comma_opt } // Rule 277: initializer ::= assignment_expression
// //
case 277: { action. consumeInitializerList(); break; case 277: { action. consumeInitializer(); break;
} }
// //
// Rule 282: designated_initializer ::= <openscope-ast> designation = initializer // Rule 278: initializer ::= { <openscope-ast> initializer_list comma_opt }
// //
case 282: { action. consumeInitializerDesignated(); break; case 278: { action. consumeInitializerList(); break;
} }
// //
// Rule 286: designator_base ::= [ constant_expression ] // Rule 283: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 286: { action. consumeDesignatorArray(); break; case 283: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 287: designator_base ::= . identifier_or_typedefname // Rule 287: designator_base ::= [ constant_expression ]
// //
case 287: { action. consumeDesignatorField(); break; case 287: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 288: designator ::= [ constant_expression ] // Rule 288: designator_base ::= . identifier_or_typedefname
// //
case 288: { action. consumeDesignatorArray(); break; case 288: { action. consumeDesignatorField(); break;
} }
// //
// Rule 289: designator ::= . identifier_or_typedefname // Rule 289: designator ::= [ constant_expression ]
// //
case 289: { action. consumeDesignatorField(); break; case 289: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 290: translation_unit ::= external_declaration_list // Rule 290: designator ::= . identifier_or_typedefname
// //
case 290: { action. consumeTranslationUnit(); break; case 290: { action. consumeDesignatorField(); break;
} }
// //
// Rule 291: translation_unit ::= $Empty // Rule 291: translation_unit ::= external_declaration_list
// //
case 291: { action. consumeTranslationUnit(); break; case 291: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 296: external_declaration ::= ; // Rule 292: translation_unit ::= $Empty
// //
case 296: { action. consumeDeclarationEmpty(); break; case 292: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 297: external_declaration ::= ERROR_TOKEN // Rule 297: external_declaration ::= ;
// //
case 297: { action. consumeDeclarationProblem(); break; case 297: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 300: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 298: external_declaration ::= ERROR_TOKEN
// //
case 300: { action. consumeFunctionDefinition(true); break; case 298: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 301: function_definition ::= <openscope-ast> function_declarator function_body // Rule 301: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 301: { action. consumeFunctionDefinition(false); break; case 301: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 302: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 302: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 302: { action. consumeFunctionDefinitionKnR(); break; case 302: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 303: function_body ::= { } // Rule 303: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 303: { action. consumeStatementCompoundStatement(false); break; case 303: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 304: function_body ::= { <openscope-ast> block_item_list } // Rule 304: function_body ::= { }
// //
case 304: { action. consumeStatementCompoundStatement(true); break; case 304: { action. consumeStatementCompoundStatement(false); break;
} }
// //
// Rule 306: no_sizeof_type_name_start ::= ERROR_TOKEN // Rule 305: function_body ::= { <openscope-ast> block_item_list }
// //
case 306: { action. consumeExpressionProblem(); break; case 305: { action. consumeStatementCompoundStatement(true); break;
}
//
// Rule 307: no_sizeof_type_name_start ::= ERROR_TOKEN
//
case 307: { action. consumeExpressionProblem(); break;
} }

View file

@ -15,113 +15,119 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
public interface C99SizeofExpressionParsersym { public interface C99SizeofExpressionParsersym {
public final static int public final static int
TK_auto = 24, TK_auto = 13,
TK_break = 81, TK_break = 81,
TK_case = 82, TK_case = 82,
TK_char = 36, TK_char = 29,
TK_const = 6, TK_const = 6,
TK_continue = 83, TK_continue = 83,
TK_default = 84, TK_default = 84,
TK_do = 85, TK_do = 85,
TK_double = 37, TK_double = 30,
TK_else = 86, TK_else = 86,
TK_enum = 57, TK_enum = 42,
TK_extern = 25, TK_extern = 14,
TK_float = 38, TK_float = 31,
TK_for = 87, TK_for = 87,
TK_goto = 88, TK_goto = 88,
TK_if = 89, TK_if = 89,
TK_inline = 26, TK_inline = 15,
TK_int = 39, TK_int = 32,
TK_long = 40, TK_long = 33,
TK_register = 27, TK_register = 16,
TK_restrict = 7, TK_restrict = 7,
TK_return = 90, TK_return = 90,
TK_short = 41, TK_short = 34,
TK_signed = 42, TK_signed = 35,
TK_sizeof = 15, TK_sizeof = 21,
TK_static = 22, TK_static = 9,
TK_struct = 58, TK_struct = 43,
TK_switch = 91, TK_switch = 91,
TK_typedef = 28, TK_typedef = 17,
TK_union = 59, TK_union = 44,
TK_unsigned = 43, TK_unsigned = 36,
TK_void = 44, TK_void = 37,
TK_volatile = 8, TK_volatile = 8,
TK_while = 92, TK_while = 92,
TK__Bool = 45, TK__Bool = 38,
TK__Complex = 46, TK__Complex = 39,
TK__Imaginary = 47, TK__Imaginary = 40,
TK_integer = 16, TK_integer = 22,
TK_floating = 17, TK_floating = 23,
TK_charconst = 18, TK_charconst = 24,
TK_stringlit = 19, TK_stringlit = 25,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 4, TK_Completion = 3,
TK_EndOfCompletion = 5, TK_EndOfCompletion = 5,
TK_Invalid = 93, TK_Invalid = 93,
TK_LeftBracket = 9, TK_LeftBracket = 10,
TK_LeftParen = 2, TK_LeftParen = 2,
TK_LeftBrace = 23, TK_LeftBrace = 28,
TK_Dot = 48, TK_Dot = 52,
TK_Arrow = 66, TK_Arrow = 67,
TK_PlusPlus = 13, TK_PlusPlus = 19,
TK_MinusMinus = 14, TK_MinusMinus = 20,
TK_And = 12, TK_And = 18,
TK_Star = 3, TK_Star = 4,
TK_Plus = 10, TK_Plus = 11,
TK_Minus = 11, TK_Minus = 12,
TK_Tilde = 20, TK_Tilde = 26,
TK_Bang = 21, TK_Bang = 27,
TK_Slash = 49, TK_Slash = 53,
TK_Percent = 50, TK_Percent = 54,
TK_RightShift = 31, TK_RightShift = 48,
TK_LeftShift = 32, TK_LeftShift = 49,
TK_LT = 51, TK_LT = 55,
TK_GT = 52, TK_GT = 56,
TK_LE = 53, TK_LE = 57,
TK_GE = 54, TK_GE = 58,
TK_EQ = 60, TK_EQ = 61,
TK_NE = 61, TK_NE = 62,
TK_Caret = 62, TK_Caret = 63,
TK_Or = 63, TK_Or = 64,
TK_AndAnd = 64, TK_AndAnd = 65,
TK_OrOr = 67, TK_OrOr = 68,
TK_Question = 68, TK_Question = 69,
TK_Colon = 55, TK_Colon = 59,
TK_DotDotDot = 33, TK_DotDotDot = 50,
TK_Assign = 56, TK_Assign = 60,
TK_StarAssign = 69, TK_StarAssign = 70,
TK_SlashAssign = 70, TK_SlashAssign = 71,
TK_PercentAssign = 71, TK_PercentAssign = 72,
TK_PlusAssign = 72, TK_PlusAssign = 73,
TK_MinusAssign = 73, TK_MinusAssign = 74,
TK_RightShiftAssign = 74, TK_RightShiftAssign = 75,
TK_LeftShiftAssign = 75, TK_LeftShiftAssign = 76,
TK_AndAssign = 76, TK_AndAssign = 77,
TK_CaretAssign = 77, TK_CaretAssign = 78,
TK_OrAssign = 78, TK_OrAssign = 79,
TK_Comma = 30, TK_Comma = 45,
TK_RightBracket = 34, TK_RightBracket = 51,
TK_RightParen = 29, TK_RightParen = 41,
TK_RightBrace = 35, TK_RightBrace = 46,
TK_SemiColon = 65, TK_SemiColon = 66,
TK_ERROR_TOKEN = 79, TK_ERROR_TOKEN = 47,
TK_EOF_TOKEN = 80; TK_EOF_TOKEN = 80;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
"", "",
"identifier", "identifier",
"LeftParen", "LeftParen",
"Star",
"Completion", "Completion",
"Star",
"EndOfCompletion", "EndOfCompletion",
"const", "const",
"restrict", "restrict",
"volatile", "volatile",
"static",
"LeftBracket", "LeftBracket",
"Plus", "Plus",
"Minus", "Minus",
"auto",
"extern",
"inline",
"register",
"typedef",
"And", "And",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
@ -132,20 +138,7 @@ public interface C99SizeofExpressionParsersym {
"stringlit", "stringlit",
"Tilde", "Tilde",
"Bang", "Bang",
"static",
"LeftBrace", "LeftBrace",
"auto",
"extern",
"inline",
"register",
"typedef",
"RightParen",
"Comma",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"RightBrace",
"char", "char",
"double", "double",
"float", "float",
@ -158,6 +151,17 @@ public interface C99SizeofExpressionParsersym {
"_Bool", "_Bool",
"_Complex", "_Complex",
"_Imaginary", "_Imaginary",
"RightParen",
"enum",
"struct",
"union",
"Comma",
"RightBrace",
"ERROR_TOKEN",
"RightShift",
"LeftShift",
"DotDotDot",
"RightBracket",
"Dot", "Dot",
"Slash", "Slash",
"Percent", "Percent",
@ -167,9 +171,6 @@ public interface C99SizeofExpressionParsersym {
"GE", "GE",
"Colon", "Colon",
"Assign", "Assign",
"enum",
"struct",
"union",
"EQ", "EQ",
"NE", "NE",
"Caret", "Caret",
@ -189,7 +190,6 @@ public interface C99SizeofExpressionParsersym {
"AndAssign", "AndAssign",
"CaretAssign", "CaretAssign",
"OrAssign", "OrAssign",
"ERROR_TOKEN",
"EOF_TOKEN", "EOF_TOKEN",
"break", "break",
"case", "case",

View file

@ -16,14 +16,14 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPExpressionStatementParsersym { public interface CPPExpressionStatementParsersym {
public final static int public final static int
TK_asm = 67, TK_asm = 67,
TK_auto = 49, TK_auto = 48,
TK_bool = 13, TK_bool = 13,
TK_break = 76, TK_break = 76,
TK_case = 77, TK_case = 77,
TK_catch = 115, TK_catch = 115,
TK_char = 14, TK_char = 14,
TK_class = 57, TK_class = 57,
TK_const = 47, TK_const = 46,
TK_const_cast = 26, TK_const_cast = 26,
TK_continue = 78, TK_continue = 78,
TK_default = 79, TK_default = 79,
@ -32,50 +32,50 @@ public interface CPPExpressionStatementParsersym {
TK_double = 15, TK_double = 15,
TK_dynamic_cast = 27, TK_dynamic_cast = 27,
TK_else = 120, TK_else = 120,
TK_enum = 62, TK_enum = 58,
TK_explicit = 50, TK_explicit = 49,
TK_export = 73, TK_export = 73,
TK_extern = 42, TK_extern = 42,
TK_false = 28, TK_false = 28,
TK_float = 16, TK_float = 16,
TK_for = 81, TK_for = 81,
TK_friend = 51, TK_friend = 50,
TK_goto = 82, TK_goto = 82,
TK_if = 83, TK_if = 83,
TK_inline = 52, TK_inline = 51,
TK_int = 17, TK_int = 17,
TK_long = 18, TK_long = 18,
TK_mutable = 53, TK_mutable = 52,
TK_namespace = 63, TK_namespace = 65,
TK_new = 41, TK_new = 41,
TK_operator = 6, TK_operator = 6,
TK_private = 116, TK_private = 116,
TK_protected = 117, TK_protected = 117,
TK_public = 118, TK_public = 118,
TK_register = 54, TK_register = 53,
TK_reinterpret_cast = 29, TK_reinterpret_cast = 29,
TK_return = 84, TK_return = 84,
TK_short = 19, TK_short = 19,
TK_signed = 20, TK_signed = 20,
TK_sizeof = 30, TK_sizeof = 30,
TK_static = 55, TK_static = 54,
TK_static_cast = 31, TK_static_cast = 31,
TK_struct = 64, TK_struct = 59,
TK_switch = 85, TK_switch = 85,
TK_template = 45, TK_template = 55,
TK_this = 32, TK_this = 32,
TK_throw = 39, TK_throw = 39,
TK_try = 74, TK_try = 74,
TK_true = 33, TK_true = 33,
TK_typedef = 56, TK_typedef = 56,
TK_typeid = 34, TK_typeid = 34,
TK_typename = 10, TK_typename = 8,
TK_union = 65, TK_union = 60,
TK_unsigned = 21, TK_unsigned = 21,
TK_using = 60, TK_using = 63,
TK_virtual = 46, TK_virtual = 45,
TK_void = 22, TK_void = 22,
TK_volatile = 48, TK_volatile = 47,
TK_wchar_t = 23, TK_wchar_t = 23,
TK_while = 75, TK_while = 75,
TK_integer = 35, TK_integer = 35,
@ -86,9 +86,9 @@ public interface CPPExpressionStatementParsersym {
TK_Completion = 121, TK_Completion = 121,
TK_EndOfCompletion = 122, TK_EndOfCompletion = 122,
TK_Invalid = 123, TK_Invalid = 123,
TK_LeftBracket = 58, TK_LeftBracket = 61,
TK_LeftParen = 2, TK_LeftParen = 2,
TK_LeftBrace = 59, TK_LeftBrace = 62,
TK_Dot = 114, TK_Dot = 114,
TK_DotStar = 94, TK_DotStar = 94,
TK_Arrow = 101, TK_Arrow = 101,
@ -97,15 +97,15 @@ public interface CPPExpressionStatementParsersym {
TK_MinusMinus = 12, TK_MinusMinus = 12,
TK_And = 7, TK_And = 7,
TK_Star = 5, TK_Star = 5,
TK_Plus = 8, TK_Plus = 9,
TK_Minus = 9, TK_Minus = 10,
TK_Tilde = 4, TK_Tilde = 4,
TK_Bang = 25, TK_Bang = 25,
TK_Slash = 89, TK_Slash = 89,
TK_Percent = 90, TK_Percent = 90,
TK_RightShift = 86, TK_RightShift = 86,
TK_LeftShift = 87, TK_LeftShift = 87,
TK_LT = 61, TK_LT = 64,
TK_GT = 66, TK_GT = 66,
TK_LE = 91, TK_LE = 91,
TK_GE = 92, TK_GE = 92,
@ -148,9 +148,9 @@ public interface CPPExpressionStatementParsersym {
"Star", "Star",
"operator", "operator",
"And", "And",
"typename",
"Plus", "Plus",
"Minus", "Minus",
"typename",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"bool", "bool",
@ -185,7 +185,6 @@ public interface CPPExpressionStatementParsersym {
"extern", "extern",
"SemiColon", "SemiColon",
"ERROR_TOKEN", "ERROR_TOKEN",
"template",
"virtual", "virtual",
"const", "const",
"volatile", "volatile",
@ -196,16 +195,17 @@ public interface CPPExpressionStatementParsersym {
"mutable", "mutable",
"register", "register",
"static", "static",
"template",
"typedef", "typedef",
"class", "class",
"enum",
"struct",
"union",
"LeftBracket", "LeftBracket",
"LeftBrace", "LeftBrace",
"using", "using",
"LT", "LT",
"enum",
"namespace", "namespace",
"struct",
"union",
"GT", "GT",
"asm", "asm",
"Comma", "Comma",

View file

@ -15,7 +15,7 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPNoCastExpressionParsersym { public interface CPPNoCastExpressionParsersym {
public final static int public final static int
TK_asm = 64, TK_asm = 67,
TK_auto = 49, TK_auto = 49,
TK_bool = 13, TK_bool = 13,
TK_break = 76, TK_break = 76,
@ -23,7 +23,7 @@ public interface CPPNoCastExpressionParsersym {
TK_catch = 116, TK_catch = 116,
TK_char = 14, TK_char = 14,
TK_class = 57, TK_class = 57,
TK_const = 47, TK_const = 46,
TK_const_cast = 26, TK_const_cast = 26,
TK_continue = 78, TK_continue = 78,
TK_default = 79, TK_default = 79,
@ -32,10 +32,10 @@ public interface CPPNoCastExpressionParsersym {
TK_double = 15, TK_double = 15,
TK_dynamic_cast = 27, TK_dynamic_cast = 27,
TK_else = 120, TK_else = 120,
TK_enum = 65, TK_enum = 60,
TK_explicit = 50, TK_explicit = 50,
TK_export = 73, TK_export = 73,
TK_extern = 43, TK_extern = 42,
TK_false = 28, TK_false = 28,
TK_float = 16, TK_float = 16,
TK_for = 81, TK_for = 81,
@ -46,7 +46,7 @@ public interface CPPNoCastExpressionParsersym {
TK_int = 17, TK_int = 17,
TK_long = 18, TK_long = 18,
TK_mutable = 53, TK_mutable = 53,
TK_namespace = 62, TK_namespace = 65,
TK_new = 41, TK_new = 41,
TK_operator = 6, TK_operator = 6,
TK_private = 117, TK_private = 117,
@ -60,20 +60,20 @@ public interface CPPNoCastExpressionParsersym {
TK_sizeof = 30, TK_sizeof = 30,
TK_static = 55, TK_static = 55,
TK_static_cast = 31, TK_static_cast = 31,
TK_struct = 66, TK_struct = 61,
TK_switch = 85, TK_switch = 85,
TK_template = 45, TK_template = 47,
TK_this = 32, TK_this = 32,
TK_throw = 39, TK_throw = 39,
TK_try = 74, TK_try = 74,
TK_true = 33, TK_true = 33,
TK_typedef = 56, TK_typedef = 56,
TK_typeid = 34, TK_typeid = 34,
TK_typename = 10, TK_typename = 8,
TK_union = 67, TK_union = 62,
TK_unsigned = 21, TK_unsigned = 21,
TK_using = 60, TK_using = 63,
TK_virtual = 46, TK_virtual = 45,
TK_void = 22, TK_void = 22,
TK_volatile = 48, TK_volatile = 48,
TK_wchar_t = 23, TK_wchar_t = 23,
@ -97,16 +97,16 @@ public interface CPPNoCastExpressionParsersym {
TK_MinusMinus = 12, TK_MinusMinus = 12,
TK_And = 7, TK_And = 7,
TK_Star = 5, TK_Star = 5,
TK_Plus = 8, TK_Plus = 9,
TK_Minus = 9, TK_Minus = 10,
TK_Tilde = 4, TK_Tilde = 4,
TK_Bang = 25, TK_Bang = 25,
TK_Slash = 89, TK_Slash = 89,
TK_Percent = 90, TK_Percent = 90,
TK_RightShift = 86, TK_RightShift = 86,
TK_LeftShift = 87, TK_LeftShift = 87,
TK_LT = 61, TK_LT = 64,
TK_GT = 63, TK_GT = 66,
TK_LE = 91, TK_LE = 91,
TK_GE = 92, TK_GE = 92,
TK_EQ = 95, TK_EQ = 95,
@ -135,7 +135,7 @@ public interface CPPNoCastExpressionParsersym {
TK_RightBracket = 113, TK_RightBracket = 113,
TK_RightParen = 72, TK_RightParen = 72,
TK_RightBrace = 71, TK_RightBrace = 71,
TK_SemiColon = 42, TK_SemiColon = 43,
TK_ERROR_TOKEN = 44, TK_ERROR_TOKEN = 44,
TK_EOF_TOKEN = 114; TK_EOF_TOKEN = 114;
@ -148,9 +148,9 @@ public interface CPPNoCastExpressionParsersym {
"Star", "Star",
"operator", "operator",
"And", "And",
"typename",
"Plus", "Plus",
"Minus", "Minus",
"typename",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"bool", "bool",
@ -182,12 +182,12 @@ public interface CPPNoCastExpressionParsersym {
"throw", "throw",
"delete", "delete",
"new", "new",
"SemiColon",
"extern", "extern",
"SemiColon",
"ERROR_TOKEN", "ERROR_TOKEN",
"template",
"virtual", "virtual",
"const", "const",
"template",
"volatile", "volatile",
"auto", "auto",
"explicit", "explicit",
@ -200,14 +200,14 @@ public interface CPPNoCastExpressionParsersym {
"class", "class",
"LeftBracket", "LeftBracket",
"LeftBrace", "LeftBrace",
"enum",
"struct",
"union",
"using", "using",
"LT", "LT",
"namespace", "namespace",
"GT", "GT",
"asm", "asm",
"enum",
"struct",
"union",
"Comma", "Comma",
"Assign", "Assign",
"Colon", "Colon",

View file

@ -15,68 +15,68 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPParsersym { public interface CPPParsersym {
public final static int public final static int
TK_asm = 62, TK_asm = 65,
TK_auto = 49, TK_auto = 48,
TK_bool = 13, TK_bool = 11,
TK_break = 76, TK_break = 76,
TK_case = 77, TK_case = 77,
TK_catch = 115, TK_catch = 115,
TK_char = 14, TK_char = 12,
TK_class = 57, TK_class = 57,
TK_const = 47, TK_const = 46,
TK_const_cast = 26, TK_const_cast = 26,
TK_continue = 78, TK_continue = 78,
TK_default = 79, TK_default = 79,
TK_delete = 40, TK_delete = 41,
TK_do = 80, TK_do = 80,
TK_double = 15, TK_double = 13,
TK_dynamic_cast = 27, TK_dynamic_cast = 27,
TK_else = 120, TK_else = 120,
TK_enum = 64, TK_enum = 58,
TK_explicit = 50, TK_explicit = 49,
TK_export = 72, TK_export = 72,
TK_extern = 41, TK_extern = 40,
TK_false = 28, TK_false = 28,
TK_float = 16, TK_float = 14,
TK_for = 81, TK_for = 81,
TK_friend = 51, TK_friend = 50,
TK_goto = 82, TK_goto = 82,
TK_if = 83, TK_if = 83,
TK_inline = 52, TK_inline = 51,
TK_int = 17, TK_int = 15,
TK_long = 18, TK_long = 16,
TK_mutable = 53, TK_mutable = 52,
TK_namespace = 59, TK_namespace = 62,
TK_new = 42, TK_new = 42,
TK_operator = 6, TK_operator = 6,
TK_private = 116, TK_private = 116,
TK_protected = 117, TK_protected = 117,
TK_public = 118, TK_public = 118,
TK_register = 54, TK_register = 53,
TK_reinterpret_cast = 29, TK_reinterpret_cast = 29,
TK_return = 84, TK_return = 84,
TK_short = 19, TK_short = 17,
TK_signed = 20, TK_signed = 18,
TK_sizeof = 30, TK_sizeof = 30,
TK_static = 55, TK_static = 54,
TK_static_cast = 31, TK_static_cast = 31,
TK_struct = 65, TK_struct = 59,
TK_switch = 85, TK_switch = 85,
TK_template = 44, TK_template = 55,
TK_this = 32, TK_this = 32,
TK_throw = 39, TK_throw = 39,
TK_try = 74, TK_try = 74,
TK_true = 33, TK_true = 33,
TK_typedef = 56, TK_typedef = 56,
TK_typeid = 34, TK_typeid = 34,
TK_typename = 10, TK_typename = 8,
TK_union = 66, TK_union = 60,
TK_unsigned = 21, TK_unsigned = 19,
TK_using = 58, TK_using = 61,
TK_virtual = 46, TK_virtual = 45,
TK_void = 22, TK_void = 20,
TK_volatile = 48, TK_volatile = 47,
TK_wchar_t = 23, TK_wchar_t = 21,
TK_while = 75, TK_while = 75,
TK_integer = 35, TK_integer = 35,
TK_floating = 36, TK_floating = 36,
@ -86,26 +86,26 @@ public interface CPPParsersym {
TK_Completion = 121, TK_Completion = 121,
TK_EndOfCompletion = 122, TK_EndOfCompletion = 122,
TK_Invalid = 123, TK_Invalid = 123,
TK_LeftBracket = 60, TK_LeftBracket = 63,
TK_LeftParen = 2, TK_LeftParen = 2,
TK_LeftBrace = 61, TK_LeftBrace = 64,
TK_Dot = 114, TK_Dot = 114,
TK_DotStar = 94, TK_DotStar = 94,
TK_Arrow = 101, TK_Arrow = 101,
TK_ArrowStar = 88, TK_ArrowStar = 88,
TK_PlusPlus = 11, TK_PlusPlus = 22,
TK_MinusMinus = 12, TK_MinusMinus = 23,
TK_And = 7, TK_And = 7,
TK_Star = 5, TK_Star = 5,
TK_Plus = 8, TK_Plus = 9,
TK_Minus = 9, TK_Minus = 10,
TK_Tilde = 4, TK_Tilde = 4,
TK_Bang = 25, TK_Bang = 25,
TK_Slash = 89, TK_Slash = 89,
TK_Percent = 90, TK_Percent = 90,
TK_RightShift = 86, TK_RightShift = 86,
TK_LeftShift = 87, TK_LeftShift = 87,
TK_LT = 63, TK_LT = 66,
TK_GT = 67, TK_GT = 67,
TK_LE = 91, TK_LE = 91,
TK_GE = 92, TK_GE = 92,
@ -136,7 +136,7 @@ public interface CPPParsersym {
TK_RightParen = 73, TK_RightParen = 73,
TK_RightBrace = 71, TK_RightBrace = 71,
TK_SemiColon = 43, TK_SemiColon = 43,
TK_ERROR_TOKEN = 45, TK_ERROR_TOKEN = 44,
TK_EOF_TOKEN = 119; TK_EOF_TOKEN = 119;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
@ -148,11 +148,9 @@ public interface CPPParsersym {
"Star", "Star",
"operator", "operator",
"And", "And",
"typename",
"Plus", "Plus",
"Minus", "Minus",
"typename",
"PlusPlus",
"MinusMinus",
"bool", "bool",
"char", "char",
"double", "double",
@ -164,6 +162,8 @@ public interface CPPParsersym {
"unsigned", "unsigned",
"void", "void",
"wchar_t", "wchar_t",
"PlusPlus",
"MinusMinus",
"stringlit", "stringlit",
"Bang", "Bang",
"const_cast", "const_cast",
@ -180,11 +180,10 @@ public interface CPPParsersym {
"charconst", "charconst",
"zero", "zero",
"throw", "throw",
"delete",
"extern", "extern",
"delete",
"new", "new",
"SemiColon", "SemiColon",
"template",
"ERROR_TOKEN", "ERROR_TOKEN",
"virtual", "virtual",
"const", "const",
@ -196,17 +195,18 @@ public interface CPPParsersym {
"mutable", "mutable",
"register", "register",
"static", "static",
"template",
"typedef", "typedef",
"class", "class",
"enum",
"struct",
"union",
"using", "using",
"namespace", "namespace",
"LeftBracket", "LeftBracket",
"LeftBrace", "LeftBrace",
"asm", "asm",
"LT", "LT",
"enum",
"struct",
"union",
"GT", "GT",
"Comma", "Comma",
"Assign", "Assign",