1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

support for GNU extension type id initiailzers in C++

This commit is contained in:
Mike Kucera 2009-02-09 16:09:51 +00:00
parent d511f13dee
commit fc9b4516b3
16 changed files with 7760 additions and 7709 deletions

View file

@ -193,7 +193,7 @@ postfix_expression
/. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); $EndBuild ./ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); $EndBuild ./
| postfix_expression '--' | postfix_expression '--'
/. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); $EndBuild ./ /. $Build consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); $EndBuild ./
| '(' type_id ')' '{' <openscope-ast> initializer_list comma_opt '}' | '(' type_id ')' initializer_list
/. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./ /. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./
@ -891,7 +891,11 @@ function_direct_abstract_declarator
initializer initializer
::= assignment_expression ::= assignment_expression
/. $Build consumeInitializer(); $EndBuild ./ /. $Build consumeInitializer(); $EndBuild ./
| start_initializer_list '{' <openscope-ast> initializer_list comma_opt '}' end_initializer_list | initializer_list
initializer_list
::= start_initializer_list '{' <openscope-ast> initializer_seq comma_opt '}' end_initializer_list
/. $Build consumeInitializerList(); $EndBuild ./ /. $Build consumeInitializerList(); $EndBuild ./
| '{' <openscope-ast> '}' | '{' <openscope-ast> '}'
/. $Build consumeInitializerList(); $EndBuild ./ /. $Build consumeInitializerList(); $EndBuild ./
@ -906,11 +910,11 @@ end_initializer_list
/. $Build initializerListEnd(); $EndBuild ./ /. $Build initializerListEnd(); $EndBuild ./
initializer_list initializer_seq
::= initializer ::= initializer
| designated_initializer | designated_initializer
| initializer_list ',' initializer | initializer_seq ',' initializer
| initializer_list ',' designated_initializer | initializer_seq ',' designated_initializer
designated_initializer designated_initializer

View file

@ -1293,9 +1293,13 @@ initializer
initializer_clause initializer_clause
::= assignment_expression ::= assignment_expression
/. $Build consumeInitializer(); $EndBuild ./ /. $Build consumeInitializer(); $EndBuild ./
| start_initializer_list '{' <openscope-ast> initializer_list ',' '}' end_initializer_list | initializer_list
initializer_list
::= start_initializer_list '{' <openscope-ast> initializer_seq ',' '}' end_initializer_list
/. $Build consumeInitializerList(); $EndBuild ./ /. $Build consumeInitializerList(); $EndBuild ./
| start_initializer_list '{' <openscope-ast> initializer_list '}' end_initializer_list | start_initializer_list '{' <openscope-ast> initializer_seq '}' end_initializer_list
/. $Build consumeInitializerList(); $EndBuild ./ /. $Build consumeInitializerList(); $EndBuild ./
| '{' <openscope-ast> '}' | '{' <openscope-ast> '}'
/. $Build consumeInitializerList(); $EndBuild ./ /. $Build consumeInitializerList(); $EndBuild ./
@ -1309,9 +1313,9 @@ end_initializer_list
::= $empty ::= $empty
/. $Build initializerListEnd(); $EndBuild ./ /. $Build initializerListEnd(); $EndBuild ./
initializer_list initializer_seq
::= initializer_clause ::= initializer_clause
| initializer_list ',' initializer_clause | initializer_seq ',' initializer_clause

View file

@ -121,4 +121,9 @@ explicit_instantiation
/. $Build consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); $EndBuild ./ /. $Build consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); $EndBuild ./
postfix_expression
::= '(' type_id ')' initializer_list
/. $Build consumeExpressionTypeIdInitializer(); $EndBuild ./
$End $End

View file

@ -11,10 +11,7 @@
package org.eclipse.cdt.core.dom.lrparser.action.c99; package org.eclipse.cdt.core.dom.lrparser.action.c99;
import static org.eclipse.cdt.core.dom.lrparser.action.ParserUtil.endOffset; import static org.eclipse.cdt.core.dom.lrparser.action.ParserUtil.*;
import static org.eclipse.cdt.core.dom.lrparser.action.ParserUtil.length;
import static org.eclipse.cdt.core.dom.lrparser.action.ParserUtil.matchTokens;
import static org.eclipse.cdt.core.dom.lrparser.action.ParserUtil.offset;
import static org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym.*; import static org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym.*;
import java.util.Collections; import java.util.Collections;
@ -62,9 +59,9 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
import org.eclipse.cdt.core.dom.ast.c.ICNodeFactory; import org.eclipse.cdt.core.dom.ast.c.ICNodeFactory;
import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator;
import org.eclipse.cdt.core.dom.lrparser.action.BuildASTParserAction; import org.eclipse.cdt.core.dom.lrparser.action.BuildASTParserAction;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenStream;
import org.eclipse.cdt.core.dom.lrparser.action.ISecondaryParserFactory; import org.eclipse.cdt.core.dom.lrparser.action.ISecondaryParserFactory;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap; import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenStream;
import org.eclipse.cdt.core.dom.lrparser.action.ParserUtil; import org.eclipse.cdt.core.dom.lrparser.action.ParserUtil;
import org.eclipse.cdt.core.dom.lrparser.action.ScopedStack; import org.eclipse.cdt.core.dom.lrparser.action.ScopedStack;
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap; import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
@ -145,11 +142,9 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
/** /**
* postfix_expression ::= '(' type_name ')' '{' <openscope> initializer_list '}' * postfix_expression ::= '(' type_id ')' initializer_list
* postfix_expression ::= '(' type_name ')' '{' <openscope> initializer_list ',' '}'
*/ */
public void consumeExpressionTypeIdInitializer() { public void consumeExpressionTypeIdInitializer() {
consumeInitializerList(); // closes the scope
IASTInitializerList list = (IASTInitializerList) astStack.pop(); IASTInitializerList list = (IASTInitializerList) astStack.pop();
IASTTypeId typeId = (IASTTypeId) astStack.pop(); IASTTypeId typeId = (IASTTypeId) astStack.pop();
ICASTTypeIdInitializerExpression expr = nodeFactory.newTypeIdInitializerExpression(typeId, list); ICASTTypeIdInitializerExpression expr = nodeFactory.newTypeIdInitializerExpression(typeId, list);
@ -157,30 +152,6 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
astStack.push(expr); astStack.push(expr);
} }
// TODO why is this here?
// /**
// * Lots of rules, no need to list them.
// * @param operator From IASTUnaryExpression
// */
// public void consumeExpressionSizeofTypeId() {
// if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
//
// IASTTypeId typeId = (IASTTypeId) astStack.pop();
// IASTTypeIdExpression expr = nodeFactory.newTypeIdExpression(IASTTypeIdExpression.op_sizeof, typeId);
// setOffsetAndLength(expr);
//
// // try parsing as an expression to resolve ambiguities
// C99SizeofExpressionParser secondaryParser = new C99SizeofExpressionParser(C99Parsersym.orderedTerminalSymbols);
// IASTNode alternateExpr = runSecondaryParser(secondaryParser);
//
// if(alternateExpr == null || alternateExpr instanceof IASTProblemExpression)
// astStack.push(expr);
// else
// astStack.push(nodeFactory.newAmbiguousExpression(expr, (IASTExpression)alternateExpr));
//
// if(TRACE_AST_STACK) System.out.println(astStack);
// }
/** /**
* Applies a specifier to a decl spec node. * Applies a specifier to a decl spec node.

View file

@ -18,7 +18,10 @@ import lpg.lpgjavaruntime.IToken;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration; import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTInitializerList;
import org.eclipse.cdt.core.dom.ast.IASTPointer; import org.eclipse.cdt.core.dom.ast.IASTPointer;
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
import org.eclipse.cdt.core.dom.ast.IASTTypeIdInitializerExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTPointerToMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTPointerToMember;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNodeFactory; import org.eclipse.cdt.core.dom.ast.cpp.ICPPNodeFactory;
@ -183,4 +186,14 @@ public class GPPBuildASTParserAction extends CPPBuildASTParserAction {
} }
/**
* postfix_expression ::= '(' type_id ')' initializer_list
*/
public void consumeExpressionTypeIdInitializer() {
IASTInitializerList list = (IASTInitializerList) astStack.pop();
IASTTypeId typeId = (IASTTypeId) astStack.pop();
IASTTypeIdInitializerExpression expr = nodeFactory.newTypeIdInitializerExpression(typeId, list);
setOffsetAndLength(expr);
astStack.push(expr);
}
} }

View file

@ -329,7 +329,7 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 28: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt } // Rule 28: postfix_expression ::= ( type_id ) initializer_list
// //
case 28: { action. consumeExpressionTypeIdInitializer(); break; case 28: { action. consumeExpressionTypeIdInitializer(); break;
} }
@ -1151,219 +1151,219 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 282: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list // Rule 283: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq comma_opt } end_initializer_list
//
case 282: { action. consumeInitializerList(); break;
}
//
// Rule 283: initializer ::= { <openscope-ast> }
// //
case 283: { action. consumeInitializerList(); break; case 283: { action. consumeInitializerList(); break;
} }
// //
// Rule 284: start_initializer_list ::= $Empty // Rule 284: initializer_list ::= { <openscope-ast> }
// //
case 284: { action. initializerListStart(); break; case 284: { action. consumeInitializerList(); break;
} }
// //
// Rule 285: end_initializer_list ::= $Empty // Rule 285: start_initializer_list ::= $Empty
// //
case 285: { action. initializerListEnd(); break; case 285: { action. initializerListStart(); break;
} }
// //
// Rule 290: designated_initializer ::= <openscope-ast> designation = initializer // Rule 286: end_initializer_list ::= $Empty
// //
case 290: { action. consumeInitializerDesignated(); break; case 286: { action. initializerListEnd(); break;
} }
// //
// Rule 294: designator_base ::= [ constant_expression ] // Rule 291: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 294: { action. consumeDesignatorArray(); break; case 291: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 295: designator_base ::= . identifier_token // Rule 295: designator_base ::= [ constant_expression ]
// //
case 295: { action. consumeDesignatorField(); break; case 295: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 296: designator ::= [ constant_expression ] // Rule 296: designator_base ::= . identifier_token
// //
case 296: { action. consumeDesignatorArray(); break; case 296: { action. consumeDesignatorField(); break;
} }
// //
// Rule 297: designator ::= . identifier_token // Rule 297: designator ::= [ constant_expression ]
// //
case 297: { action. consumeDesignatorField(); break; case 297: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 298: translation_unit ::= external_declaration_list // Rule 298: designator ::= . identifier_token
// //
case 298: { action. consumeTranslationUnit(); break; case 298: { action. consumeDesignatorField(); break;
} }
// //
// Rule 299: translation_unit ::= $Empty // Rule 299: translation_unit ::= external_declaration_list
// //
case 299: { action. consumeTranslationUnit(); break; case 299: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 304: external_declaration ::= ; // Rule 300: translation_unit ::= $Empty
// //
case 304: { action. consumeDeclarationEmpty(); break; case 300: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 305: external_declaration ::= ERROR_TOKEN // Rule 305: external_declaration ::= ;
// //
case 305: { action. consumeDeclarationProblem(); break; case 305: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 308: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 306: external_declaration ::= ERROR_TOKEN
// //
case 308: { action. consumeFunctionDefinition(true); break; case 306: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 309: function_definition ::= <openscope-ast> function_declarator function_body // Rule 309: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 309: { action. consumeFunctionDefinition(false); break; case 309: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 310: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 310: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 310: { action. consumeFunctionDefinitionKnR(); break; case 310: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 311: function_body ::= { } // Rule 311: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 311: { action. consumeStatementCompoundStatement(false); break; case 311: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 312: function_body ::= { <openscope-ast> block_item_list } // Rule 312: function_body ::= { }
// //
case 312: { action. consumeStatementCompoundStatement(true); break; case 312: { action. consumeStatementCompoundStatement(false); break;
} }
// //
// Rule 329: attribute_parameter ::= assignment_expression // Rule 313: function_body ::= { <openscope-ast> block_item_list }
// //
case 329: { action. consumeIgnore(); break; case 313: { action. consumeStatementCompoundStatement(true); break;
} }
// //
// Rule 339: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ; // Rule 330: attribute_parameter ::= assignment_expression
// //
case 339: { gnuAction.consumeDeclarationASM(); break; case 330: { action. consumeIgnore(); break;
} }
// //
// Rule 350: unary_expression ::= __alignof__ unary_expression // Rule 340: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
// //
case 350: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break; case 340: { gnuAction.consumeDeclarationASM(); break;
} }
// //
// Rule 351: unary_expression ::= __alignof__ ( type_id ) // Rule 351: unary_expression ::= __alignof__ unary_expression
// //
case 351: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break; case 351: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
} }
// //
// Rule 352: unary_expression ::= typeof unary_expression // Rule 352: unary_expression ::= __alignof__ ( type_id )
// //
case 352: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 352: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break;
} }
// //
// Rule 353: unary_expression ::= typeof ( type_id ) // Rule 353: unary_expression ::= typeof unary_expression
// //
case 353: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 353: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 354: relational_expression ::= relational_expression >? shift_expression // Rule 354: unary_expression ::= typeof ( type_id )
// //
case 354: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break; case 354: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 355: relational_expression ::= relational_expression <? shift_expression // Rule 355: relational_expression ::= relational_expression >? shift_expression
// //
case 355: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break; case 355: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break;
} }
// //
// Rule 356: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression // Rule 356: relational_expression ::= relational_expression <? shift_expression
// //
case 356: { action. consumeExpressionConditional(); break; case 356: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break;
} }
// //
// Rule 357: primary_expression ::= ( compound_statement ) // Rule 357: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression
// //
case 357: { gnuAction.consumeCompoundStatementExpression(); break; case 357: { action. consumeExpressionConditional(); break;
} }
// //
// Rule 358: labeled_statement ::= case case_range_expression : statement // Rule 358: primary_expression ::= ( compound_statement )
// //
case 358: { action. consumeStatementCase(); break; case 358: { gnuAction.consumeCompoundStatementExpression(); break;
} }
// //
// Rule 359: case_range_expression ::= constant_expression ... constant_expression // Rule 359: labeled_statement ::= case case_range_expression : statement
// //
case 359: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break; case 359: { action. consumeStatementCase(); break;
} }
// //
// Rule 363: typeof_type_specifier ::= typeof unary_expression // Rule 360: case_range_expression ::= constant_expression ... constant_expression
// //
case 363: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 360: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
} }
// //
// Rule 364: typeof_type_specifier ::= typeof ( type_id ) // Rule 364: typeof_type_specifier ::= typeof unary_expression
// //
case 364: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 364: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 365: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers // Rule 365: typeof_type_specifier ::= typeof ( type_id )
// //
case 365: { action. consumeDeclarationSpecifiersTypeof(); break; case 365: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 381: field_name_designator ::= identifier_token : // Rule 366: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
// //
case 381: { action. consumeDesignatorFieldGCC(); break; case 366: { action. consumeDeclarationSpecifiersTypeof(); break;
} }
// //
// Rule 382: array_range_designator ::= [ constant_expression ... constant_expression ] // Rule 382: field_name_designator ::= identifier_token :
// //
case 382: { action. consumeDesignatorArrayRange(); break; case 382: { action. consumeDesignatorFieldGCC(); break;
} }
// //
// Rule 383: designated_initializer ::= <openscope-ast> field_name_designator initializer // Rule 383: array_range_designator ::= [ constant_expression ... constant_expression ]
// //
case 383: { action. consumeInitializerDesignated(); break; case 383: { action. consumeDesignatorArrayRange(); break;
}
//
// Rule 384: designated_initializer ::= <openscope-ast> field_name_designator initializer
//
case 384: { action. consumeInitializerDesignated(); break;
} }

View file

@ -352,7 +352,7 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 28: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt } // Rule 28: postfix_expression ::= ( type_id ) initializer_list
// //
case 28: { action. consumeExpressionTypeIdInitializer(); break; case 28: { action. consumeExpressionTypeIdInitializer(); break;
} }
@ -1168,213 +1168,213 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 281: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list // Rule 282: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq comma_opt } end_initializer_list
//
case 281: { action. consumeInitializerList(); break;
}
//
// Rule 282: initializer ::= { <openscope-ast> }
// //
case 282: { action. consumeInitializerList(); break; case 282: { action. consumeInitializerList(); break;
} }
// //
// Rule 283: start_initializer_list ::= $Empty // Rule 283: initializer_list ::= { <openscope-ast> }
// //
case 283: { action. initializerListStart(); break; case 283: { action. consumeInitializerList(); break;
} }
// //
// Rule 284: end_initializer_list ::= $Empty // Rule 284: start_initializer_list ::= $Empty
// //
case 284: { action. initializerListEnd(); break; case 284: { action. initializerListStart(); break;
} }
// //
// Rule 289: designated_initializer ::= <openscope-ast> designation = initializer // Rule 285: end_initializer_list ::= $Empty
// //
case 289: { action. consumeInitializerDesignated(); break; case 285: { action. initializerListEnd(); break;
} }
// //
// Rule 293: designator_base ::= [ constant_expression ] // Rule 290: designated_initializer ::= <openscope-ast> designation = initializer
// //
case 293: { action. consumeDesignatorArray(); break; case 290: { action. consumeInitializerDesignated(); break;
} }
// //
// Rule 294: designator_base ::= . identifier_token // Rule 294: designator_base ::= [ constant_expression ]
// //
case 294: { action. consumeDesignatorField(); break; case 294: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 295: designator ::= [ constant_expression ] // Rule 295: designator_base ::= . identifier_token
// //
case 295: { action. consumeDesignatorArray(); break; case 295: { action. consumeDesignatorField(); break;
} }
// //
// Rule 296: designator ::= . identifier_token // Rule 296: designator ::= [ constant_expression ]
// //
case 296: { action. consumeDesignatorField(); break; case 296: { action. consumeDesignatorArray(); break;
} }
// //
// Rule 297: translation_unit ::= external_declaration_list // Rule 297: designator ::= . identifier_token
// //
case 297: { action. consumeTranslationUnit(); break; case 297: { action. consumeDesignatorField(); break;
} }
// //
// Rule 298: translation_unit ::= $Empty // Rule 298: translation_unit ::= external_declaration_list
// //
case 298: { action. consumeTranslationUnit(); break; case 298: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 303: external_declaration ::= ; // Rule 299: translation_unit ::= $Empty
// //
case 303: { action. consumeDeclarationEmpty(); break; case 299: { action. consumeTranslationUnit(); break;
} }
// //
// Rule 304: external_declaration ::= ERROR_TOKEN // Rule 304: external_declaration ::= ;
// //
case 304: { action. consumeDeclarationProblem(); break; case 304: { action. consumeDeclarationEmpty(); break;
} }
// //
// Rule 307: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body // Rule 305: external_declaration ::= ERROR_TOKEN
// //
case 307: { action. consumeFunctionDefinition(true); break; case 305: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 308: function_definition ::= <openscope-ast> function_declarator function_body // Rule 308: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
// //
case 308: { action. consumeFunctionDefinition(false); break; case 308: { action. consumeFunctionDefinition(true); break;
} }
// //
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement // Rule 309: function_definition ::= <openscope-ast> function_declarator function_body
// //
case 309: { action. consumeFunctionDefinitionKnR(); break; case 309: { action. consumeFunctionDefinition(false); break;
} }
// //
// Rule 310: function_body ::= { } // Rule 310: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
// //
case 310: { action. consumeStatementCompoundStatement(false); break; case 310: { action. consumeFunctionDefinitionKnR(); break;
} }
// //
// Rule 311: function_body ::= { <openscope-ast> block_item_list } // Rule 311: function_body ::= { }
// //
case 311: { action. consumeStatementCompoundStatement(true); break; case 311: { action. consumeStatementCompoundStatement(false); break;
} }
// //
// Rule 328: attribute_parameter ::= assignment_expression // Rule 312: function_body ::= { <openscope-ast> block_item_list }
// //
case 328: { action. consumeIgnore(); break; case 312: { action. consumeStatementCompoundStatement(true); break;
} }
// //
// Rule 338: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ; // Rule 329: attribute_parameter ::= assignment_expression
// //
case 338: { gnuAction.consumeDeclarationASM(); break; case 329: { action. consumeIgnore(); break;
} }
// //
// Rule 349: unary_expression ::= __alignof__ unary_expression // Rule 339: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
// //
case 349: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break; case 339: { gnuAction.consumeDeclarationASM(); break;
} }
// //
// Rule 350: unary_expression ::= typeof unary_expression // Rule 350: unary_expression ::= __alignof__ unary_expression
// //
case 350: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 350: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
} }
// //
// Rule 351: relational_expression ::= relational_expression >? shift_expression // Rule 351: unary_expression ::= typeof unary_expression
// //
case 351: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break; case 351: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 352: relational_expression ::= relational_expression <? shift_expression // Rule 352: relational_expression ::= relational_expression >? shift_expression
// //
case 352: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break; case 352: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break;
} }
// //
// Rule 353: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression // Rule 353: relational_expression ::= relational_expression <? shift_expression
// //
case 353: { action. consumeExpressionConditional(); break; case 353: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break;
} }
// //
// Rule 354: primary_expression ::= ( compound_statement ) // Rule 354: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression
// //
case 354: { gnuAction.consumeCompoundStatementExpression(); break; case 354: { action. consumeExpressionConditional(); break;
} }
// //
// Rule 355: labeled_statement ::= case case_range_expression : statement // Rule 355: primary_expression ::= ( compound_statement )
// //
case 355: { action. consumeStatementCase(); break; case 355: { gnuAction.consumeCompoundStatementExpression(); break;
} }
// //
// Rule 356: case_range_expression ::= constant_expression ... constant_expression // Rule 356: labeled_statement ::= case case_range_expression : statement
// //
case 356: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break; case 356: { action. consumeStatementCase(); break;
} }
// //
// Rule 360: typeof_type_specifier ::= typeof unary_expression // Rule 357: case_range_expression ::= constant_expression ... constant_expression
// //
case 360: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 357: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
} }
// //
// Rule 361: typeof_type_specifier ::= typeof ( type_id ) // Rule 361: typeof_type_specifier ::= typeof unary_expression
// //
case 361: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 361: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 362: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers // Rule 362: typeof_type_specifier ::= typeof ( type_id )
// //
case 362: { action. consumeDeclarationSpecifiersTypeof(); break; case 362: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 378: field_name_designator ::= identifier_token : // Rule 363: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
// //
case 378: { action. consumeDesignatorFieldGCC(); break; case 363: { action. consumeDeclarationSpecifiersTypeof(); break;
} }
// //
// Rule 379: array_range_designator ::= [ constant_expression ... constant_expression ] // Rule 379: field_name_designator ::= identifier_token :
// //
case 379: { action. consumeDesignatorArrayRange(); break; case 379: { action. consumeDesignatorFieldGCC(); break;
} }
// //
// Rule 380: designated_initializer ::= <openscope-ast> field_name_designator initializer // Rule 380: array_range_designator ::= [ constant_expression ... constant_expression ]
// //
case 380: { action. consumeInitializerDesignated(); break; case 380: { action. consumeDesignatorArrayRange(); break;
} }
// //
// Rule 382: no_sizeof_type_name_start ::= ERROR_TOKEN // Rule 381: designated_initializer ::= <openscope-ast> field_name_designator initializer
// //
case 382: { action. consumeEmpty(); break; case 381: { action. consumeInitializerDesignated(); break;
}
//
// Rule 383: no_sizeof_type_name_start ::= ERROR_TOKEN
//
case 383: { action. consumeEmpty(); break;
} }

View file

@ -57,7 +57,7 @@ public interface GCCSizeofExpressionParsersym {
TK_charconst = 19, TK_charconst = 19,
TK_stringlit = 13, TK_stringlit = 13,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 4, TK_Completion = 5,
TK_EndOfCompletion = 3, TK_EndOfCompletion = 3,
TK_Invalid = 100, TK_Invalid = 100,
TK_LeftBracket = 30, TK_LeftBracket = 30,
@ -68,7 +68,7 @@ public interface GCCSizeofExpressionParsersym {
TK_PlusPlus = 14, TK_PlusPlus = 14,
TK_MinusMinus = 15, TK_MinusMinus = 15,
TK_And = 11, TK_And = 11,
TK_Star = 5, TK_Star = 6,
TK_Plus = 9, TK_Plus = 9,
TK_Minus = 10, TK_Minus = 10,
TK_Tilde = 21, TK_Tilde = 21,
@ -112,7 +112,7 @@ public interface GCCSizeofExpressionParsersym {
TK___declspec = 8, TK___declspec = 8,
TK_MAX = 78, TK_MAX = 78,
TK_MIN = 79, TK_MIN = 79,
TK_asm = 6, TK_asm = 4,
TK_ERROR_TOKEN = 29, TK_ERROR_TOKEN = 29,
TK_EOF_TOKEN = 99; TK_EOF_TOKEN = 99;
@ -121,9 +121,9 @@ public interface GCCSizeofExpressionParsersym {
"identifier", "identifier",
"LeftParen", "LeftParen",
"EndOfCompletion", "EndOfCompletion",
"asm",
"Completion", "Completion",
"Star", "Star",
"asm",
"__attribute__", "__attribute__",
"__declspec", "__declspec",
"Plus", "Plus",

View file

@ -1603,495 +1603,501 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 378: initializer_clause ::= start_initializer_list { <openscope-ast> initializer_list , } end_initializer_list // Rule 379: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq , } end_initializer_list
//
case 378: { action. consumeInitializerList(); break;
}
//
// Rule 379: initializer_clause ::= start_initializer_list { <openscope-ast> initializer_list } end_initializer_list
// //
case 379: { action. consumeInitializerList(); break; case 379: { action. consumeInitializerList(); break;
} }
// //
// Rule 380: initializer_clause ::= { <openscope-ast> } // Rule 380: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq } end_initializer_list
// //
case 380: { action. consumeInitializerList(); break; case 380: { action. consumeInitializerList(); break;
} }
// //
// Rule 381: start_initializer_list ::= $Empty // Rule 381: initializer_list ::= { <openscope-ast> }
// //
case 381: { action. initializerListStart(); break; case 381: { action. consumeInitializerList(); break;
} }
// //
// Rule 382: end_initializer_list ::= $Empty // Rule 382: start_initializer_list ::= $Empty
// //
case 382: { action. initializerListEnd(); break; case 382: { action. initializerListStart(); break;
} }
// //
// Rule 387: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt } // Rule 383: end_initializer_list ::= $Empty
// //
case 387: { action. consumeClassSpecifier(); break; case 383: { action. initializerListEnd(); break;
} }
// //
// Rule 388: class_head ::= class_keyword composite_specifier_hook identifier_name_opt class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 388: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
// //
case 388: { action. consumeClassHead(false); break; case 388: { action. consumeClassSpecifier(); break;
} }
// //
// Rule 389: class_head ::= class_keyword composite_specifier_hook template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 389: class_head ::= class_keyword composite_specifier_hook identifier_name_opt class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 389: { action. consumeClassHead(false); break; case 389: { action. consumeClassHead(false); break;
} }
// //
// Rule 390: class_head ::= class_keyword composite_specifier_hook nested_name_specifier identifier_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 390: class_head ::= class_keyword composite_specifier_hook template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 390: { action. consumeClassHead(true); break; case 390: { action. consumeClassHead(false); break;
} }
// //
// Rule 391: class_head ::= class_keyword composite_specifier_hook nested_name_specifier template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 391: class_head ::= class_keyword composite_specifier_hook nested_name_specifier identifier_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 391: { action. consumeClassHead(true); break; case 391: { action. consumeClassHead(true); break;
} }
// //
// Rule 395: identifier_name_opt ::= $Empty // Rule 392: class_head ::= class_keyword composite_specifier_hook nested_name_specifier template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 395: { action. consumeEmpty(); break; case 392: { action. consumeClassHead(true); break;
} }
// //
// Rule 399: visibility_label ::= access_specifier_keyword : // Rule 396: identifier_name_opt ::= $Empty
// //
case 399: { action. consumeVisibilityLabel(); break; case 396: { action. consumeEmpty(); break;
} }
// //
// Rule 400: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ; // Rule 400: visibility_label ::= access_specifier_keyword :
// //
case 400: { action. consumeDeclarationSimple(true); break; case 400: { action. consumeVisibilityLabel(); break;
} }
// //
// Rule 401: member_declaration ::= declaration_specifiers_opt ; // Rule 401: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
// //
case 401: { action. consumeDeclarationSimple(false); break; case 401: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 404: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ; // Rule 402: member_declaration ::= declaration_specifiers_opt ;
// //
case 404: { action. consumeMemberDeclarationQualifiedId(); break; case 402: { action. consumeDeclarationSimple(false); break;
} }
// //
// Rule 410: member_declaration ::= ERROR_TOKEN // Rule 405: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
// //
case 410: { action. consumeDeclarationProblem(); break; case 405: { action. consumeMemberDeclarationQualifiedId(); break;
} }
// //
// Rule 419: member_declarator ::= declarator constant_initializer // Rule 411: member_declaration ::= ERROR_TOKEN
// //
case 419: { action. consumeMemberDeclaratorWithInitializer(); break; case 411: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 420: member_declarator ::= bit_field_declarator : constant_expression // Rule 420: member_declarator ::= declarator constant_initializer
// //
case 420: { action. consumeBitField(true); break; case 420: { action. consumeMemberDeclaratorWithInitializer(); break;
} }
// //
// Rule 421: member_declarator ::= : constant_expression // Rule 421: member_declarator ::= bit_field_declarator : constant_expression
// //
case 421: { action. consumeBitField(false); break; case 421: { action. consumeBitField(true); break;
} }
// //
// Rule 422: bit_field_declarator ::= identifier_name // Rule 422: member_declarator ::= : constant_expression
// //
case 422: { action. consumeDirectDeclaratorIdentifier(); break; case 422: { action. consumeBitField(false); break;
} }
// //
// Rule 423: constant_initializer ::= = constant_expression // Rule 423: bit_field_declarator ::= identifier_name
// //
case 423: { action. consumeInitializer(); break; case 423: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 429: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name // Rule 424: constant_initializer ::= = constant_expression
// //
case 429: { action. consumeBaseSpecifier(false, false); break; case 424: { action. consumeInitializer(); break;
} }
// //
// Rule 430: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name // Rule 430: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
// //
case 430: { action. consumeBaseSpecifier(true, true); break; case 430: { action. consumeBaseSpecifier(false, false); break;
} }
// //
// Rule 431: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name // Rule 431: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
// //
case 431: { action. consumeBaseSpecifier(true, true); break; case 431: { action. consumeBaseSpecifier(true, true); break;
} }
// //
// Rule 432: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name // Rule 432: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
// //
case 432: { action. consumeBaseSpecifier(true, false); break; case 432: { action. consumeBaseSpecifier(true, true); break;
} }
// //
// Rule 433: access_specifier_keyword ::= private // Rule 433: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
// //
case 433: { action. consumeToken(); break; case 433: { action. consumeBaseSpecifier(true, false); break;
} }
// //
// Rule 434: access_specifier_keyword ::= protected // Rule 434: access_specifier_keyword ::= private
// //
case 434: { action. consumeToken(); break; case 434: { action. consumeToken(); break;
} }
// //
// Rule 435: access_specifier_keyword ::= public // Rule 435: access_specifier_keyword ::= protected
// //
case 435: { action. consumeToken(); break; case 435: { action. consumeToken(); break;
} }
// //
// Rule 437: access_specifier_keyword_opt ::= $Empty // Rule 436: access_specifier_keyword ::= public
// //
case 437: { action. consumeEmpty(); break; case 436: { action. consumeToken(); break;
} }
// //
// Rule 439: conversion_function_id_name ::= conversion_function_id < <openscope-ast> template_argument_list_opt > // Rule 438: access_specifier_keyword_opt ::= $Empty
// //
case 439: { action. consumeTemplateId(); break; case 438: { action. consumeEmpty(); break;
} }
// //
// Rule 440: conversion_function_id ::= operator conversion_type_id // Rule 440: conversion_function_id_name ::= conversion_function_id < <openscope-ast> template_argument_list_opt >
// //
case 440: { action. consumeConversionName(); break; case 440: { action. consumeTemplateId(); break;
} }
// //
// Rule 441: conversion_type_id ::= type_specifier_seq conversion_declarator // Rule 441: conversion_function_id ::= operator conversion_type_id
// //
case 441: { action. consumeTypeId(true); break; case 441: { action. consumeConversionName(); break;
} }
// //
// Rule 442: conversion_type_id ::= type_specifier_seq // Rule 442: conversion_type_id ::= type_specifier_seq conversion_declarator
// //
case 442: { action. consumeTypeId(false); break; case 442: { action. consumeTypeId(true); break;
} }
// //
// Rule 443: conversion_declarator ::= <openscope-ast> ptr_operator_seq // Rule 443: conversion_type_id ::= type_specifier_seq
// //
case 443: { action. consumeDeclaratorWithPointer(false); break; case 443: { action. consumeTypeId(false); break;
} }
// //
// Rule 449: mem_initializer ::= mem_initializer_name ( expression_list_opt ) // Rule 444: conversion_declarator ::= <openscope-ast> ptr_operator_seq
// //
case 449: { action. consumeConstructorChainInitializer(); break; case 444: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 450: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name // Rule 450: mem_initializer ::= mem_initializer_name ( expression_list_opt )
// //
case 450: { action. consumeQualifiedId(false); break; case 450: { action. consumeConstructorChainInitializer(); break;
} }
// //
// Rule 453: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt > // Rule 451: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
// //
case 453: { action. consumeTemplateId(); break; case 451: { action. consumeQualifiedId(false); break;
} }
// //
// Rule 454: operator_id_name ::= operator overloadable_operator // Rule 454: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
// //
case 454: { action. consumeOperatorName(); break; case 454: { action. consumeTemplateId(); break;
} }
// //
// Rule 497: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration // Rule 455: operator_id_name ::= operator overloadable_operator
// //
case 497: { action. consumeTemplateDeclaration(); break; case 455: { action. consumeOperatorName(); break;
} }
// //
// Rule 498: export_opt ::= export // Rule 498: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
// //
case 498: { action. consumePlaceHolder(); break; case 498: { action. consumeTemplateDeclaration(); break;
} }
// //
// Rule 499: export_opt ::= $Empty // Rule 499: export_opt ::= export
// //
case 499: { action. consumeEmpty(); break; case 499: { action. consumePlaceHolder(); break;
} }
// //
// Rule 503: template_parameter ::= parameter_declaration // Rule 500: export_opt ::= $Empty
// //
case 503: { action. consumeTemplateParamterDeclaration(); break; case 500: { action. consumeEmpty(); break;
} }
// //
// Rule 504: type_parameter ::= class identifier_name_opt // Rule 504: template_parameter ::= parameter_declaration
// //
case 504: { action. consumeSimpleTypeTemplateParameter(false); break; case 504: { action. consumeTemplateParamterDeclaration(); break;
} }
// //
// Rule 505: type_parameter ::= class identifier_name_opt = type_id // Rule 505: type_parameter ::= class identifier_name_opt
// //
case 505: { action. consumeSimpleTypeTemplateParameter(true); break; case 505: { action. consumeSimpleTypeTemplateParameter(false); break;
} }
// //
// Rule 506: type_parameter ::= typename identifier_name_opt // Rule 506: type_parameter ::= class identifier_name_opt = type_id
// //
case 506: { action. consumeSimpleTypeTemplateParameter(false); break; case 506: { action. consumeSimpleTypeTemplateParameter(true); break;
} }
// //
// Rule 507: type_parameter ::= typename identifier_name_opt = type_id // Rule 507: type_parameter ::= typename identifier_name_opt
// //
case 507: { action. consumeSimpleTypeTemplateParameter(true); break; case 507: { action. consumeSimpleTypeTemplateParameter(false); break;
} }
// //
// Rule 508: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt // Rule 508: type_parameter ::= typename identifier_name_opt = type_id
// //
case 508: { action. consumeTemplatedTypeTemplateParameter(false); break; case 508: { action. consumeSimpleTypeTemplateParameter(true); break;
} }
// //
// Rule 509: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression // Rule 509: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
// //
case 509: { action. consumeTemplatedTypeTemplateParameter(true); break; case 509: { action. consumeTemplatedTypeTemplateParameter(false); break;
} }
// //
// Rule 510: template_id_name ::= identifier_name < <openscope-ast> template_argument_list_opt > // Rule 510: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
// //
case 510: { action. consumeTemplateId(); break; case 510: { action. consumeTemplatedTypeTemplateParameter(true); break;
} }
// //
// Rule 515: template_argument ::= assignment_expression // Rule 511: template_id_name ::= identifier_name < <openscope-ast> template_argument_list_opt >
// //
case 515: { action. consumeTemplateArgumentExpression(); break; case 511: { action. consumeTemplateId(); break;
} }
// //
// Rule 516: template_argument ::= type_id // Rule 516: template_argument ::= assignment_expression
// //
case 516: { action. consumeTemplateArgumentTypeId(); break; case 516: { action. consumeTemplateArgumentExpression(); break;
} }
// //
// Rule 517: explicit_instantiation ::= template declaration // Rule 517: template_argument ::= type_id
// //
case 517: { action. consumeTemplateExplicitInstantiation(); break; case 517: { action. consumeTemplateArgumentTypeId(); break;
} }
// //
// Rule 518: explicit_specialization ::= template < > declaration // Rule 518: explicit_instantiation ::= template declaration
// //
case 518: { action. consumeTemplateExplicitSpecialization(); break; case 518: { action. consumeTemplateExplicitInstantiation(); break;
} }
// //
// Rule 519: try_block ::= try compound_statement <openscope-ast> handler_seq // Rule 519: explicit_specialization ::= template < > declaration
// //
case 519: { action. consumeStatementTryBlock(); break; case 519: { action. consumeTemplateExplicitSpecialization(); break;
} }
// //
// Rule 522: handler ::= catch ( exception_declaration ) compound_statement // Rule 520: try_block ::= try compound_statement <openscope-ast> handler_seq
// //
case 522: { action. consumeStatementCatchHandler(false); break; case 520: { action. consumeStatementTryBlock(); break;
} }
// //
// Rule 523: handler ::= catch ( ... ) compound_statement // Rule 523: handler ::= catch ( exception_declaration ) compound_statement
// //
case 523: { action. consumeStatementCatchHandler(true); break; case 523: { action. consumeStatementCatchHandler(false); break;
} }
// //
// Rule 524: exception_declaration ::= type_specifier_seq <openscope-ast> declarator // Rule 524: handler ::= catch ( ... ) compound_statement
// //
case 524: { action. consumeDeclarationSimple(true); break; case 524: { action. consumeStatementCatchHandler(true); break;
} }
// //
// Rule 525: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator // Rule 525: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
// //
case 525: { action. consumeDeclarationSimple(true); break; case 525: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 526: exception_declaration ::= type_specifier_seq // Rule 526: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
// //
case 526: { action. consumeDeclarationSimple(false); break; case 526: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 528: exception_specification ::= throw ( ) // Rule 527: exception_declaration ::= type_specifier_seq
// //
case 528: { action. consumePlaceHolder(); break; case 527: { action. consumeDeclarationSimple(false); break;
} }
// //
// Rule 549: attribute_parameter ::= assignment_expression // Rule 529: exception_specification ::= throw ( )
// //
case 549: { action. consumeIgnore(); break; case 529: { action. consumePlaceHolder(); break;
} }
// //
// Rule 559: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ; // Rule 550: attribute_parameter ::= assignment_expression
// //
case 559: { gnuAction.consumeDeclarationASM(); break; case 550: { action. consumeIgnore(); break;
} }
// //
// Rule 570: unary_expression ::= __alignof__ unary_expression // Rule 560: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
// //
case 570: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break; case 560: { gnuAction.consumeDeclarationASM(); break;
} }
// //
// Rule 571: unary_expression ::= __alignof__ ( type_id ) // Rule 571: unary_expression ::= __alignof__ unary_expression
// //
case 571: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break; case 571: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
} }
// //
// Rule 572: unary_expression ::= typeof unary_expression // Rule 572: unary_expression ::= __alignof__ ( type_id )
// //
case 572: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 572: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break;
} }
// //
// Rule 573: unary_expression ::= typeof ( type_id ) // Rule 573: unary_expression ::= typeof unary_expression
// //
case 573: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 573: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 574: relational_expression ::= relational_expression >? shift_expression // Rule 574: unary_expression ::= typeof ( type_id )
// //
case 574: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break; case 574: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 575: relational_expression ::= relational_expression <? shift_expression // Rule 575: relational_expression ::= relational_expression >? shift_expression
// //
case 575: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break; case 575: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break;
} }
// //
// Rule 576: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression // Rule 576: relational_expression ::= relational_expression <? shift_expression
// //
case 576: { action. consumeExpressionConditional(); break; case 576: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break;
} }
// //
// Rule 577: primary_expression ::= ( compound_statement ) // Rule 577: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression
// //
case 577: { gnuAction.consumeCompoundStatementExpression(); break; case 577: { action. consumeExpressionConditional(); break;
} }
// //
// Rule 578: labeled_statement ::= case case_range_expression : statement // Rule 578: primary_expression ::= ( compound_statement )
// //
case 578: { action. consumeStatementCase(); break; case 578: { gnuAction.consumeCompoundStatementExpression(); break;
} }
// //
// Rule 579: case_range_expression ::= constant_expression ... constant_expression // Rule 579: labeled_statement ::= case case_range_expression : statement
// //
case 579: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break; case 579: { action. consumeStatementCase(); break;
} }
// //
// Rule 583: typeof_type_specifier ::= typeof unary_expression // Rule 580: case_range_expression ::= constant_expression ... constant_expression
// //
case 583: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 580: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
} }
// //
// Rule 584: typeof_type_specifier ::= typeof ( type_id ) // Rule 584: typeof_type_specifier ::= typeof unary_expression
// //
case 584: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 584: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 585: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers // Rule 585: typeof_type_specifier ::= typeof ( type_id )
// //
case 585: { action. consumeDeclarationSpecifiersTypeof(); break; case 585: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 598: declarator ::= <openscope-ast> ptr_operator_seq attribute_or_decl_specifier_seq direct_declarator // Rule 586: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
// //
case 598: { action. consumeDeclaratorWithPointer(true); break; case 586: { action. consumeDeclarationSpecifiersTypeof(); break;
} }
// //
// Rule 601: simple_type_specifier ::= _Complex // Rule 599: declarator ::= <openscope-ast> ptr_operator_seq attribute_or_decl_specifier_seq direct_declarator
// //
case 601: { action. consumeToken(); break; case 599: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 602: simple_type_specifier ::= _Imaginary // Rule 602: simple_type_specifier ::= _Complex
// //
case 602: { action. consumeToken(); break; case 602: { action. consumeToken(); break;
} }
// //
// Rule 603: cv_qualifier ::= restrict // Rule 603: simple_type_specifier ::= _Imaginary
// //
case 603: { action. consumeToken(); break; case 603: { action. consumeToken(); break;
} }
// //
// Rule 604: explicit_instantiation ::= extern template declaration // Rule 604: cv_qualifier ::= restrict
// //
case 604: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_extern); break; case 604: { action. consumeToken(); break;
} }
// //
// Rule 605: explicit_instantiation ::= static template declaration // Rule 605: explicit_instantiation ::= extern template declaration
// //
case 605: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_static); break; case 605: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_extern); break;
} }
// //
// Rule 606: explicit_instantiation ::= inline template declaration // Rule 606: explicit_instantiation ::= static template declaration
// //
case 606: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); break; case 606: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_static); break;
}
//
// Rule 607: explicit_instantiation ::= inline template declaration
//
case 607: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); break;
}
//
// Rule 608: postfix_expression ::= ( type_id ) initializer_list
//
case 608: { action. consumeExpressionTypeIdInitializer(); break;
} }

View file

@ -25,7 +25,7 @@ public interface GPPParsersym {
TK_case = 84, TK_case = 84,
TK_catch = 127, TK_catch = 127,
TK_char = 17, TK_char = 17,
TK_class = 48, TK_class = 49,
TK_const = 28, TK_const = 28,
TK_const_cast = 50, TK_const_cast = 50,
TK_continue = 85, TK_continue = 85,
@ -65,9 +65,9 @@ public interface GPPParsersym {
TK_static_cast = 55, TK_static_cast = 55,
TK_struct = 64, TK_struct = 64,
TK_switch = 93, TK_switch = 93,
TK_template = 44, TK_template = 45,
TK_this = 56, TK_this = 56,
TK_throw = 70, TK_throw = 71,
TK_try = 79, TK_try = 79,
TK_true = 57, TK_true = 57,
TK_typedef = 40, TK_typedef = 40,
@ -75,7 +75,7 @@ public interface GPPParsersym {
TK_typename = 13, TK_typename = 13,
TK_union = 65, TK_union = 65,
TK_unsigned = 24, TK_unsigned = 24,
TK_using = 67, TK_using = 68,
TK_virtual = 31, TK_virtual = 31,
TK_void = 25, TK_void = 25,
TK_volatile = 29, TK_volatile = 29,
@ -84,12 +84,12 @@ public interface GPPParsersym {
TK_integer = 59, TK_integer = 59,
TK_floating = 60, TK_floating = 60,
TK_charconst = 61, TK_charconst = 61,
TK_stringlit = 45, TK_stringlit = 44,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 2, TK_Completion = 2,
TK_EndOfCompletion = 11, TK_EndOfCompletion = 10,
TK_Invalid = 131, TK_Invalid = 131,
TK_LeftBracket = 71, TK_LeftBracket = 72,
TK_LeftParen = 3, TK_LeftParen = 3,
TK_Dot = 128, TK_Dot = 128,
TK_DotStar = 98, TK_DotStar = 98,
@ -98,16 +98,16 @@ public interface GPPParsersym {
TK_PlusPlus = 46, TK_PlusPlus = 46,
TK_MinusMinus = 47, TK_MinusMinus = 47,
TK_And = 12, TK_And = 12,
TK_Star = 10, TK_Star = 11,
TK_Plus = 42, TK_Plus = 42,
TK_Minus = 43, TK_Minus = 43,
TK_Tilde = 8, TK_Tilde = 8,
TK_Bang = 49, TK_Bang = 48,
TK_Slash = 99, TK_Slash = 99,
TK_Percent = 100, TK_Percent = 100,
TK_RightShift = 94, TK_RightShift = 94,
TK_LeftShift = 95, TK_LeftShift = 95,
TK_LT = 69, TK_LT = 70,
TK_GT = 78, TK_GT = 78,
TK_LE = 101, TK_LE = 101,
TK_GE = 102, TK_GE = 102,
@ -134,17 +134,17 @@ public interface GPPParsersym {
TK_OrAssign = 125, TK_OrAssign = 125,
TK_Comma = 77, TK_Comma = 77,
TK_RightBracket = 126, TK_RightBracket = 126,
TK_RightParen = 72, TK_RightParen = 73,
TK_RightBrace = 81, TK_RightBrace = 81,
TK_SemiColon = 41, TK_SemiColon = 41,
TK_LeftBrace = 73, TK_LeftBrace = 67,
TK_typeof = 27, TK_typeof = 27,
TK___alignof__ = 62, TK___alignof__ = 62,
TK___attribute__ = 6, TK___attribute__ = 6,
TK___declspec = 7, TK___declspec = 7,
TK_MAX = 109, TK_MAX = 109,
TK_MIN = 110, TK_MIN = 110,
TK_ERROR_TOKEN = 68, TK_ERROR_TOKEN = 69,
TK_EOF_TOKEN = 129; TK_EOF_TOKEN = 129;
public final static String orderedTerminalSymbols[] = { public final static String orderedTerminalSymbols[] = {
@ -158,8 +158,8 @@ public interface GPPParsersym {
"__declspec", "__declspec",
"Tilde", "Tilde",
"operator", "operator",
"Star",
"EndOfCompletion", "EndOfCompletion",
"Star",
"And", "And",
"typename", "typename",
"_Complex", "_Complex",
@ -192,12 +192,12 @@ public interface GPPParsersym {
"SemiColon", "SemiColon",
"Plus", "Plus",
"Minus", "Minus",
"template",
"stringlit", "stringlit",
"template",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"class",
"Bang", "Bang",
"class",
"const_cast", "const_cast",
"dynamic_cast", "dynamic_cast",
"false", "false",
@ -215,13 +215,13 @@ public interface GPPParsersym {
"struct", "struct",
"union", "union",
"namespace", "namespace",
"LeftBrace",
"using", "using",
"ERROR_TOKEN", "ERROR_TOKEN",
"LT", "LT",
"throw", "throw",
"LeftBracket", "LeftBracket",
"RightParen", "RightParen",
"LeftBrace",
"Colon", "Colon",
"delete", "delete",
"new", "new",

View file

@ -1614,489 +1614,495 @@ private GNUBuildASTParserAction gnuAction;
} }
// //
// Rule 376: initializer_clause ::= start_initializer_list { <openscope-ast> initializer_list , } end_initializer_list // Rule 377: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq , } end_initializer_list
//
case 376: { action. consumeInitializerList(); break;
}
//
// Rule 377: initializer_clause ::= start_initializer_list { <openscope-ast> initializer_list } end_initializer_list
// //
case 377: { action. consumeInitializerList(); break; case 377: { action. consumeInitializerList(); break;
} }
// //
// Rule 378: initializer_clause ::= { <openscope-ast> } // Rule 378: initializer_list ::= start_initializer_list { <openscope-ast> initializer_seq } end_initializer_list
// //
case 378: { action. consumeInitializerList(); break; case 378: { action. consumeInitializerList(); break;
} }
// //
// Rule 379: start_initializer_list ::= $Empty // Rule 379: initializer_list ::= { <openscope-ast> }
// //
case 379: { action. initializerListStart(); break; case 379: { action. consumeInitializerList(); break;
} }
// //
// Rule 380: end_initializer_list ::= $Empty // Rule 380: start_initializer_list ::= $Empty
// //
case 380: { action. initializerListEnd(); break; case 380: { action. initializerListStart(); break;
} }
// //
// Rule 385: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt } // Rule 381: end_initializer_list ::= $Empty
// //
case 385: { action. consumeClassSpecifier(); break; case 381: { action. initializerListEnd(); break;
} }
// //
// Rule 386: class_head ::= class_keyword composite_specifier_hook identifier_name_opt class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 386: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
// //
case 386: { action. consumeClassHead(false); break; case 386: { action. consumeClassSpecifier(); break;
} }
// //
// Rule 387: class_head ::= class_keyword composite_specifier_hook template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 387: class_head ::= class_keyword composite_specifier_hook identifier_name_opt class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 387: { action. consumeClassHead(false); break; case 387: { action. consumeClassHead(false); break;
} }
// //
// Rule 388: class_head ::= class_keyword composite_specifier_hook nested_name_specifier identifier_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 388: class_head ::= class_keyword composite_specifier_hook template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 388: { action. consumeClassHead(true); break; case 388: { action. consumeClassHead(false); break;
} }
// //
// Rule 389: class_head ::= class_keyword composite_specifier_hook nested_name_specifier template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt // Rule 389: class_head ::= class_keyword composite_specifier_hook nested_name_specifier identifier_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 389: { action. consumeClassHead(true); break; case 389: { action. consumeClassHead(true); break;
} }
// //
// Rule 393: identifier_name_opt ::= $Empty // Rule 390: class_head ::= class_keyword composite_specifier_hook nested_name_specifier template_id_name class_name_suffix_hook <openscope-ast> base_clause_opt
// //
case 393: { action. consumeEmpty(); break; case 390: { action. consumeClassHead(true); break;
} }
// //
// Rule 397: visibility_label ::= access_specifier_keyword : // Rule 394: identifier_name_opt ::= $Empty
// //
case 397: { action. consumeVisibilityLabel(); break; case 394: { action. consumeEmpty(); break;
} }
// //
// Rule 398: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ; // Rule 398: visibility_label ::= access_specifier_keyword :
// //
case 398: { action. consumeDeclarationSimple(true); break; case 398: { action. consumeVisibilityLabel(); break;
} }
// //
// Rule 399: member_declaration ::= declaration_specifiers_opt ; // Rule 399: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
// //
case 399: { action. consumeDeclarationSimple(false); break; case 399: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 402: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ; // Rule 400: member_declaration ::= declaration_specifiers_opt ;
// //
case 402: { action. consumeMemberDeclarationQualifiedId(); break; case 400: { action. consumeDeclarationSimple(false); break;
} }
// //
// Rule 408: member_declaration ::= ERROR_TOKEN // Rule 403: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
// //
case 408: { action. consumeDeclarationProblem(); break; case 403: { action. consumeMemberDeclarationQualifiedId(); break;
} }
// //
// Rule 417: member_declarator ::= declarator constant_initializer // Rule 409: member_declaration ::= ERROR_TOKEN
// //
case 417: { action. consumeMemberDeclaratorWithInitializer(); break; case 409: { action. consumeDeclarationProblem(); break;
} }
// //
// Rule 418: member_declarator ::= bit_field_declarator : constant_expression // Rule 418: member_declarator ::= declarator constant_initializer
// //
case 418: { action. consumeBitField(true); break; case 418: { action. consumeMemberDeclaratorWithInitializer(); break;
} }
// //
// Rule 419: member_declarator ::= : constant_expression // Rule 419: member_declarator ::= bit_field_declarator : constant_expression
// //
case 419: { action. consumeBitField(false); break; case 419: { action. consumeBitField(true); break;
} }
// //
// Rule 420: bit_field_declarator ::= identifier_name // Rule 420: member_declarator ::= : constant_expression
// //
case 420: { action. consumeDirectDeclaratorIdentifier(); break; case 420: { action. consumeBitField(false); break;
} }
// //
// Rule 421: constant_initializer ::= = constant_expression // Rule 421: bit_field_declarator ::= identifier_name
// //
case 421: { action. consumeInitializer(); break; case 421: { action. consumeDirectDeclaratorIdentifier(); break;
} }
// //
// Rule 427: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name // Rule 422: constant_initializer ::= = constant_expression
// //
case 427: { action. consumeBaseSpecifier(false, false); break; case 422: { action. consumeInitializer(); break;
} }
// //
// Rule 428: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name // Rule 428: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
// //
case 428: { action. consumeBaseSpecifier(true, true); break; case 428: { action. consumeBaseSpecifier(false, false); break;
} }
// //
// Rule 429: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name // Rule 429: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
// //
case 429: { action. consumeBaseSpecifier(true, true); break; case 429: { action. consumeBaseSpecifier(true, true); break;
} }
// //
// Rule 430: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name // Rule 430: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
// //
case 430: { action. consumeBaseSpecifier(true, false); break; case 430: { action. consumeBaseSpecifier(true, true); break;
} }
// //
// Rule 431: access_specifier_keyword ::= private // Rule 431: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
// //
case 431: { action. consumeToken(); break; case 431: { action. consumeBaseSpecifier(true, false); break;
} }
// //
// Rule 432: access_specifier_keyword ::= protected // Rule 432: access_specifier_keyword ::= private
// //
case 432: { action. consumeToken(); break; case 432: { action. consumeToken(); break;
} }
// //
// Rule 433: access_specifier_keyword ::= public // Rule 433: access_specifier_keyword ::= protected
// //
case 433: { action. consumeToken(); break; case 433: { action. consumeToken(); break;
} }
// //
// Rule 435: access_specifier_keyword_opt ::= $Empty // Rule 434: access_specifier_keyword ::= public
// //
case 435: { action. consumeEmpty(); break; case 434: { action. consumeToken(); break;
} }
// //
// Rule 437: conversion_function_id_name ::= conversion_function_id < <openscope-ast> template_argument_list_opt > // Rule 436: access_specifier_keyword_opt ::= $Empty
// //
case 437: { action. consumeTemplateId(); break; case 436: { action. consumeEmpty(); break;
} }
// //
// Rule 438: conversion_function_id ::= operator conversion_type_id // Rule 438: conversion_function_id_name ::= conversion_function_id < <openscope-ast> template_argument_list_opt >
// //
case 438: { action. consumeConversionName(); break; case 438: { action. consumeTemplateId(); break;
} }
// //
// Rule 439: conversion_type_id ::= type_specifier_seq conversion_declarator // Rule 439: conversion_function_id ::= operator conversion_type_id
// //
case 439: { action. consumeTypeId(true); break; case 439: { action. consumeConversionName(); break;
} }
// //
// Rule 440: conversion_type_id ::= type_specifier_seq // Rule 440: conversion_type_id ::= type_specifier_seq conversion_declarator
// //
case 440: { action. consumeTypeId(false); break; case 440: { action. consumeTypeId(true); break;
} }
// //
// Rule 441: conversion_declarator ::= <openscope-ast> ptr_operator_seq // Rule 441: conversion_type_id ::= type_specifier_seq
// //
case 441: { action. consumeDeclaratorWithPointer(false); break; case 441: { action. consumeTypeId(false); break;
} }
// //
// Rule 447: mem_initializer ::= mem_initializer_name ( expression_list_opt ) // Rule 442: conversion_declarator ::= <openscope-ast> ptr_operator_seq
// //
case 447: { action. consumeConstructorChainInitializer(); break; case 442: { action. consumeDeclaratorWithPointer(false); break;
} }
// //
// Rule 448: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name // Rule 448: mem_initializer ::= mem_initializer_name ( expression_list_opt )
// //
case 448: { action. consumeQualifiedId(false); break; case 448: { action. consumeConstructorChainInitializer(); break;
} }
// //
// Rule 451: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt > // Rule 449: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
// //
case 451: { action. consumeTemplateId(); break; case 449: { action. consumeQualifiedId(false); break;
} }
// //
// Rule 452: operator_id_name ::= operator overloadable_operator // Rule 452: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
// //
case 452: { action. consumeOperatorName(); break; case 452: { action. consumeTemplateId(); break;
} }
// //
// Rule 495: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration // Rule 453: operator_id_name ::= operator overloadable_operator
// //
case 495: { action. consumeTemplateDeclaration(); break; case 453: { action. consumeOperatorName(); break;
} }
// //
// Rule 496: export_opt ::= export // Rule 496: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
// //
case 496: { action. consumePlaceHolder(); break; case 496: { action. consumeTemplateDeclaration(); break;
} }
// //
// Rule 497: export_opt ::= $Empty // Rule 497: export_opt ::= export
// //
case 497: { action. consumeEmpty(); break; case 497: { action. consumePlaceHolder(); break;
} }
// //
// Rule 501: template_parameter ::= parameter_declaration // Rule 498: export_opt ::= $Empty
// //
case 501: { action. consumeTemplateParamterDeclaration(); break; case 498: { action. consumeEmpty(); break;
} }
// //
// Rule 502: type_parameter ::= class identifier_name_opt // Rule 502: template_parameter ::= parameter_declaration
// //
case 502: { action. consumeSimpleTypeTemplateParameter(false); break; case 502: { action. consumeTemplateParamterDeclaration(); break;
} }
// //
// Rule 503: type_parameter ::= class identifier_name_opt = type_id // Rule 503: type_parameter ::= class identifier_name_opt
// //
case 503: { action. consumeSimpleTypeTemplateParameter(true); break; case 503: { action. consumeSimpleTypeTemplateParameter(false); break;
} }
// //
// Rule 504: type_parameter ::= typename identifier_name_opt // Rule 504: type_parameter ::= class identifier_name_opt = type_id
// //
case 504: { action. consumeSimpleTypeTemplateParameter(false); break; case 504: { action. consumeSimpleTypeTemplateParameter(true); break;
} }
// //
// Rule 505: type_parameter ::= typename identifier_name_opt = type_id // Rule 505: type_parameter ::= typename identifier_name_opt
// //
case 505: { action. consumeSimpleTypeTemplateParameter(true); break; case 505: { action. consumeSimpleTypeTemplateParameter(false); break;
} }
// //
// Rule 506: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt // Rule 506: type_parameter ::= typename identifier_name_opt = type_id
// //
case 506: { action. consumeTemplatedTypeTemplateParameter(false); break; case 506: { action. consumeSimpleTypeTemplateParameter(true); break;
} }
// //
// Rule 507: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression // Rule 507: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
// //
case 507: { action. consumeTemplatedTypeTemplateParameter(true); break; case 507: { action. consumeTemplatedTypeTemplateParameter(false); break;
} }
// //
// Rule 508: template_id_name ::= identifier_name < <openscope-ast> template_argument_list_opt > // Rule 508: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
// //
case 508: { action. consumeTemplateId(); break; case 508: { action. consumeTemplatedTypeTemplateParameter(true); break;
} }
// //
// Rule 513: template_argument ::= assignment_expression // Rule 509: template_id_name ::= identifier_name < <openscope-ast> template_argument_list_opt >
// //
case 513: { action. consumeTemplateArgumentExpression(); break; case 509: { action. consumeTemplateId(); break;
} }
// //
// Rule 514: template_argument ::= type_id // Rule 514: template_argument ::= assignment_expression
// //
case 514: { action. consumeTemplateArgumentTypeId(); break; case 514: { action. consumeTemplateArgumentExpression(); break;
} }
// //
// Rule 515: explicit_instantiation ::= template declaration // Rule 515: template_argument ::= type_id
// //
case 515: { action. consumeTemplateExplicitInstantiation(); break; case 515: { action. consumeTemplateArgumentTypeId(); break;
} }
// //
// Rule 516: explicit_specialization ::= template < > declaration // Rule 516: explicit_instantiation ::= template declaration
// //
case 516: { action. consumeTemplateExplicitSpecialization(); break; case 516: { action. consumeTemplateExplicitInstantiation(); break;
} }
// //
// Rule 517: try_block ::= try compound_statement <openscope-ast> handler_seq // Rule 517: explicit_specialization ::= template < > declaration
// //
case 517: { action. consumeStatementTryBlock(); break; case 517: { action. consumeTemplateExplicitSpecialization(); break;
} }
// //
// Rule 520: handler ::= catch ( exception_declaration ) compound_statement // Rule 518: try_block ::= try compound_statement <openscope-ast> handler_seq
// //
case 520: { action. consumeStatementCatchHandler(false); break; case 518: { action. consumeStatementTryBlock(); break;
} }
// //
// Rule 521: handler ::= catch ( ... ) compound_statement // Rule 521: handler ::= catch ( exception_declaration ) compound_statement
// //
case 521: { action. consumeStatementCatchHandler(true); break; case 521: { action. consumeStatementCatchHandler(false); break;
} }
// //
// Rule 522: exception_declaration ::= type_specifier_seq <openscope-ast> declarator // Rule 522: handler ::= catch ( ... ) compound_statement
// //
case 522: { action. consumeDeclarationSimple(true); break; case 522: { action. consumeStatementCatchHandler(true); break;
} }
// //
// Rule 523: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator // Rule 523: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
// //
case 523: { action. consumeDeclarationSimple(true); break; case 523: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 524: exception_declaration ::= type_specifier_seq // Rule 524: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
// //
case 524: { action. consumeDeclarationSimple(false); break; case 524: { action. consumeDeclarationSimple(true); break;
} }
// //
// Rule 526: exception_specification ::= throw ( ) // Rule 525: exception_declaration ::= type_specifier_seq
// //
case 526: { action. consumePlaceHolder(); break; case 525: { action. consumeDeclarationSimple(false); break;
} }
// //
// Rule 547: attribute_parameter ::= assignment_expression // Rule 527: exception_specification ::= throw ( )
// //
case 547: { action. consumeIgnore(); break; case 527: { action. consumePlaceHolder(); break;
} }
// //
// Rule 557: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ; // Rule 548: attribute_parameter ::= assignment_expression
// //
case 557: { gnuAction.consumeDeclarationASM(); break; case 548: { action. consumeIgnore(); break;
} }
// //
// Rule 568: unary_expression ::= __alignof__ unary_expression // Rule 558: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
// //
case 568: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break; case 558: { gnuAction.consumeDeclarationASM(); break;
} }
// //
// Rule 569: unary_expression ::= typeof unary_expression // Rule 569: unary_expression ::= __alignof__ unary_expression
// //
case 569: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 569: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
} }
// //
// Rule 570: relational_expression ::= relational_expression >? shift_expression // Rule 570: unary_expression ::= typeof unary_expression
// //
case 570: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break; case 570: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 571: relational_expression ::= relational_expression <? shift_expression // Rule 571: relational_expression ::= relational_expression >? shift_expression
// //
case 571: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break; case 571: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_max); break;
} }
// //
// Rule 572: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression // Rule 572: relational_expression ::= relational_expression <? shift_expression
// //
case 572: { action. consumeExpressionConditional(); break; case 572: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_min); break;
} }
// //
// Rule 573: primary_expression ::= ( compound_statement ) // Rule 573: conditional_expression ::= logical_or_expression ? <empty> : assignment_expression
// //
case 573: { gnuAction.consumeCompoundStatementExpression(); break; case 573: { action. consumeExpressionConditional(); break;
} }
// //
// Rule 574: labeled_statement ::= case case_range_expression : statement // Rule 574: primary_expression ::= ( compound_statement )
// //
case 574: { action. consumeStatementCase(); break; case 574: { gnuAction.consumeCompoundStatementExpression(); break;
} }
// //
// Rule 575: case_range_expression ::= constant_expression ... constant_expression // Rule 575: labeled_statement ::= case case_range_expression : statement
// //
case 575: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break; case 575: { action. consumeStatementCase(); break;
} }
// //
// Rule 579: typeof_type_specifier ::= typeof unary_expression // Rule 576: case_range_expression ::= constant_expression ... constant_expression
// //
case 579: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break; case 576: { action. consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign); break;
} }
// //
// Rule 580: typeof_type_specifier ::= typeof ( type_id ) // Rule 580: typeof_type_specifier ::= typeof unary_expression
// //
case 580: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break; case 580: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
} }
// //
// Rule 581: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers // Rule 581: typeof_type_specifier ::= typeof ( type_id )
// //
case 581: { action. consumeDeclarationSpecifiersTypeof(); break; case 581: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
} }
// //
// Rule 594: declarator ::= <openscope-ast> ptr_operator_seq attribute_or_decl_specifier_seq direct_declarator // Rule 582: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
// //
case 594: { action. consumeDeclaratorWithPointer(true); break; case 582: { action. consumeDeclarationSpecifiersTypeof(); break;
} }
// //
// Rule 597: simple_type_specifier ::= _Complex // Rule 595: declarator ::= <openscope-ast> ptr_operator_seq attribute_or_decl_specifier_seq direct_declarator
// //
case 597: { action. consumeToken(); break; case 595: { action. consumeDeclaratorWithPointer(true); break;
} }
// //
// Rule 598: simple_type_specifier ::= _Imaginary // Rule 598: simple_type_specifier ::= _Complex
// //
case 598: { action. consumeToken(); break; case 598: { action. consumeToken(); break;
} }
// //
// Rule 599: cv_qualifier ::= restrict // Rule 599: simple_type_specifier ::= _Imaginary
// //
case 599: { action. consumeToken(); break; case 599: { action. consumeToken(); break;
} }
// //
// Rule 600: explicit_instantiation ::= extern template declaration // Rule 600: cv_qualifier ::= restrict
// //
case 600: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_extern); break; case 600: { action. consumeToken(); break;
} }
// //
// Rule 601: explicit_instantiation ::= static template declaration // Rule 601: explicit_instantiation ::= extern template declaration
// //
case 601: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_static); break; case 601: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_extern); break;
} }
// //
// Rule 602: explicit_instantiation ::= inline template declaration // Rule 602: explicit_instantiation ::= static template declaration
// //
case 602: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); break; case 602: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_static); break;
} }
// //
// Rule 604: no_sizeof_type_id_start ::= ERROR_TOKEN // Rule 603: explicit_instantiation ::= inline template declaration
// //
case 604: { action. consumeEmpty(); break; case 603: { action. consumeTemplateExplicitInstantiationGCC(IGPPASTExplicitTemplateInstantiation.ti_inline); break;
}
//
// Rule 604: postfix_expression ::= ( type_id ) initializer_list
//
case 604: { action. consumeExpressionTypeIdInitializer(); break;
}
//
// Rule 606: no_sizeof_type_id_start ::= ERROR_TOKEN
//
case 606: { action. consumeEmpty(); break;
} }

View file

@ -25,21 +25,21 @@ public interface GPPSizeofExpressionParsersym {
TK_case = 84, TK_case = 84,
TK_catch = 127, TK_catch = 127,
TK_char = 17, TK_char = 17,
TK_class = 49, TK_class = 62,
TK_const = 28, TK_const = 28,
TK_const_cast = 50, TK_const_cast = 49,
TK_continue = 85, TK_continue = 85,
TK_default = 86, TK_default = 86,
TK_delete = 72, TK_delete = 73,
TK_do = 87, TK_do = 87,
TK_double = 18, TK_double = 18,
TK_dynamic_cast = 51, TK_dynamic_cast = 50,
TK_else = 130, TK_else = 130,
TK_enum = 63, TK_enum = 63,
TK_explicit = 33, TK_explicit = 33,
TK_export = 93, TK_export = 93,
TK_extern = 34, TK_extern = 34,
TK_false = 52, TK_false = 51,
TK_float = 19, TK_float = 19,
TK_for = 88, TK_for = 88,
TK_friend = 35, TK_friend = 35,
@ -50,28 +50,28 @@ public interface GPPSizeofExpressionParsersym {
TK_long = 21, TK_long = 21,
TK_mutable = 37, TK_mutable = 37,
TK_namespace = 66, TK_namespace = 66,
TK_new = 73, TK_new = 74,
TK_operator = 9, TK_operator = 9,
TK_private = 111, TK_private = 111,
TK_protected = 112, TK_protected = 112,
TK_public = 113, TK_public = 113,
TK_register = 38, TK_register = 38,
TK_reinterpret_cast = 53, TK_reinterpret_cast = 52,
TK_return = 91, TK_return = 91,
TK_short = 22, TK_short = 22,
TK_signed = 23, TK_signed = 23,
TK_sizeof = 54, TK_sizeof = 53,
TK_static = 39, TK_static = 39,
TK_static_cast = 55, TK_static_cast = 54,
TK_struct = 64, TK_struct = 64,
TK_switch = 92, TK_switch = 92,
TK_template = 44, TK_template = 45,
TK_this = 56, TK_this = 55,
TK_throw = 70, TK_throw = 70,
TK_try = 79, TK_try = 79,
TK_true = 57, TK_true = 56,
TK_typedef = 40, TK_typedef = 40,
TK_typeid = 58, TK_typeid = 57,
TK_typename = 13, TK_typename = 13,
TK_union = 65, TK_union = 65,
TK_unsigned = 24, TK_unsigned = 24,
@ -81,15 +81,15 @@ public interface GPPSizeofExpressionParsersym {
TK_volatile = 29, TK_volatile = 29,
TK_wchar_t = 26, TK_wchar_t = 26,
TK_while = 82, TK_while = 82,
TK_integer = 59, TK_integer = 58,
TK_floating = 60, TK_floating = 59,
TK_charconst = 61, TK_charconst = 60,
TK_stringlit = 45, TK_stringlit = 44,
TK_identifier = 1, TK_identifier = 1,
TK_Completion = 2, TK_Completion = 2,
TK_EndOfCompletion = 11, TK_EndOfCompletion = 10,
TK_Invalid = 131, TK_Invalid = 131,
TK_LeftBracket = 71, TK_LeftBracket = 72,
TK_LeftParen = 3, TK_LeftParen = 3,
TK_Dot = 128, TK_Dot = 128,
TK_DotStar = 98, TK_DotStar = 98,
@ -98,9 +98,9 @@ public interface GPPSizeofExpressionParsersym {
TK_PlusPlus = 46, TK_PlusPlus = 46,
TK_MinusMinus = 47, TK_MinusMinus = 47,
TK_And = 12, TK_And = 12,
TK_Star = 10, TK_Star = 11,
TK_Plus = 42, TK_Plus = 41,
TK_Minus = 43, TK_Minus = 42,
TK_Tilde = 8, TK_Tilde = 8,
TK_Bang = 48, TK_Bang = 48,
TK_Slash = 99, TK_Slash = 99,
@ -134,12 +134,12 @@ public interface GPPSizeofExpressionParsersym {
TK_OrAssign = 125, TK_OrAssign = 125,
TK_Comma = 77, TK_Comma = 77,
TK_RightBracket = 126, TK_RightBracket = 126,
TK_RightParen = 74, TK_RightParen = 75,
TK_RightBrace = 81, TK_RightBrace = 81,
TK_SemiColon = 41, TK_SemiColon = 43,
TK_LeftBrace = 75, TK_LeftBrace = 71,
TK_typeof = 27, TK_typeof = 27,
TK___alignof__ = 62, TK___alignof__ = 61,
TK___attribute__ = 6, TK___attribute__ = 6,
TK___declspec = 7, TK___declspec = 7,
TK_MAX = 109, TK_MAX = 109,
@ -158,8 +158,8 @@ public interface GPPSizeofExpressionParsersym {
"__declspec", "__declspec",
"Tilde", "Tilde",
"operator", "operator",
"Star",
"EndOfCompletion", "EndOfCompletion",
"Star",
"And", "And",
"typename", "typename",
"_Complex", "_Complex",
@ -189,15 +189,14 @@ public interface GPPSizeofExpressionParsersym {
"register", "register",
"static", "static",
"typedef", "typedef",
"SemiColon",
"Plus", "Plus",
"Minus", "Minus",
"template", "SemiColon",
"stringlit", "stringlit",
"template",
"PlusPlus", "PlusPlus",
"MinusMinus", "MinusMinus",
"Bang", "Bang",
"class",
"const_cast", "const_cast",
"dynamic_cast", "dynamic_cast",
"false", "false",
@ -211,6 +210,7 @@ public interface GPPSizeofExpressionParsersym {
"floating", "floating",
"charconst", "charconst",
"__alignof__", "__alignof__",
"class",
"enum", "enum",
"struct", "struct",
"union", "union",
@ -219,11 +219,11 @@ public interface GPPSizeofExpressionParsersym {
"using", "using",
"LT", "LT",
"throw", "throw",
"LeftBrace",
"LeftBracket", "LeftBracket",
"delete", "delete",
"new", "new",
"RightParen", "RightParen",
"LeftBrace",
"Colon", "Colon",
"Comma", "Comma",
"GT", "GT",