mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
attempt at fixing function declarator/constructor initializer ambiguity, needs more testing
This commit is contained in:
parent
e1bf40252e
commit
8d37ffe060
22 changed files with 13121 additions and 7157 deletions
|
@ -30,7 +30,8 @@ public abstract class CPPASTAmbiguity extends CPPASTNode {
|
|||
protected static class CPPASTNameCollector extends CPPASTVisitor {
|
||||
private IASTName[] names = new IASTName[2];
|
||||
private int namesPos=-1;
|
||||
{
|
||||
|
||||
public CPPASTNameCollector() {
|
||||
shouldVisitNames = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,15 @@
|
|||
<antcall target="generate_cpp">
|
||||
<param name="grammar_name" value="CPPSizeofExpressionParser"/>
|
||||
</antcall>
|
||||
<!-- Generate parser for disambiguating declarators
|
||||
<antcall target="generate_cpp">
|
||||
<param name="grammar_name" value="CPPNoConstructorInitializerParser"/>
|
||||
</antcall>
|
||||
-->
|
||||
<!-- Generate parser for disambiguating declarators -->
|
||||
<antcall target="generate_cpp">
|
||||
<param name="grammar_name" value="CPPNoFunctionDeclaratorParser"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ $Headers
|
|||
int kind = super.getKind(i);
|
||||
|
||||
// There used to be a special token kind for zero used to parser pure virtual function declarations.
|
||||
// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
|
||||
// But it turned out to be easier to just parse them as an init_ declarator and programaticaly check
|
||||
// for pure virtual, see consumeMemberDeclaratorWithInitializer().
|
||||
|
||||
//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
|
||||
|
@ -435,8 +435,9 @@ template_opt
|
|||
/. $Build consumeEmpty(); $EndBuild ./
|
||||
|
||||
|
||||
-- the ::=? is necessary for example 8.2.1 in the C++ spec to parse correctly
|
||||
dcolon_opt
|
||||
::= '::'
|
||||
::=? '::'
|
||||
/. $Build consumePlaceHolder(); $EndBuild ./
|
||||
| $empty
|
||||
/. $Build consumeEmpty(); $EndBuild ./
|
||||
|
@ -942,12 +943,12 @@ declaration_seq_opt
|
|||
|
||||
simple_declaration
|
||||
::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ';'
|
||||
/. $Build consumeDeclarationSimple(true); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(true, true); $EndBuild ./
|
||||
|
||||
|
||||
simple_declaration_with_declspec
|
||||
::= declaration_specifiers <openscope-ast> init_declarator_list_opt ';'
|
||||
/. $Build consumeDeclarationSimple(true); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(true, false); $EndBuild ./
|
||||
|
||||
|
||||
-- declaration specifier nodes not created here, they are created by sub-rules
|
||||
|
@ -1238,8 +1239,8 @@ linkage_specification
|
|||
|
||||
|
||||
init_declarator_list
|
||||
::= init_declarator
|
||||
| init_declarator_list ',' init_declarator
|
||||
::= init_declarator_complete
|
||||
| init_declarator_list ',' init_declarator_complete
|
||||
|
||||
|
||||
init_declarator_list_opt
|
||||
|
@ -1247,6 +1248,11 @@ init_declarator_list_opt
|
|||
| $empty
|
||||
|
||||
|
||||
init_declarator_complete
|
||||
::= init_declarator
|
||||
/. $Build consumeInitDeclaratorComplete(); $EndBuild ./
|
||||
|
||||
|
||||
init_declarator
|
||||
::= declarator
|
||||
| declarator initializer
|
||||
|
@ -1337,6 +1343,7 @@ declarator_id_name
|
|||
/. $Build consumeQualifiedId(false); $EndBuild ./
|
||||
|
||||
|
||||
|
||||
type_id
|
||||
::= type_specifier_seq
|
||||
/. $Build consumeTypeId(false); $EndBuild ./
|
||||
|
@ -1520,9 +1527,9 @@ visibility_label
|
|||
|
||||
member_declaration
|
||||
::= declaration_specifiers_opt <openscope-ast> member_declarator_list ';'
|
||||
/. $Build consumeDeclarationSimple(true); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(true, true); $EndBuild ./
|
||||
| declaration_specifiers_opt ';'
|
||||
/. $Build consumeDeclarationSimple(false); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(false, false); $EndBuild ./
|
||||
| function_definition ';'
|
||||
| function_definition
|
||||
| dcolon_opt nested_name_specifier template_opt unqualified_id_name ';'
|
||||
|
@ -1785,11 +1792,11 @@ handler
|
|||
-- open a scope just so that we can reuse consumeDeclarationSimple()
|
||||
exception_declaration
|
||||
::= type_specifier_seq <openscope-ast> declarator
|
||||
/. $Build consumeDeclarationSimple(true); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(true, false); $EndBuild ./
|
||||
| type_specifier_seq <openscope-ast> abstract_declarator -- TODO might need to be abstract_declarator_without_function, might be too lenient, what exactly can you catch?
|
||||
/. $Build consumeDeclarationSimple(true); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(true, false); $EndBuild ./
|
||||
| type_specifier_seq
|
||||
/. $Build consumeDeclarationSimple(false); $EndBuild ./
|
||||
/. $Build consumeDeclarationSimple(false, false); $EndBuild ./
|
||||
|
||||
|
||||
-- puts type ids on the stack
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
-----------------------------------------------------------------------------------
|
||||
-- Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
-- All rights reserved. This program and the accompanying materials
|
||||
-- are made available under the terms of the Eclipse Public License v1.0
|
||||
-- which accompanies this distribution, and is available at
|
||||
-- http://www.eclipse.org/legal/epl-v10.html
|
||||
--
|
||||
-- Contributors:
|
||||
-- IBM Corporation - initial API and implementation
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
%options la=2
|
||||
%options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp
|
||||
%options template=btParserTemplateD.g
|
||||
|
||||
$Import
|
||||
CPPGrammar.g
|
||||
$DropRules
|
||||
|
||||
direct_declarator
|
||||
::= function_direct_declarator
|
||||
|
||||
init_declarator_complete
|
||||
::= init_declarator
|
||||
|
||||
$End
|
||||
|
||||
$Start
|
||||
no_function_declarator_start
|
||||
$End
|
||||
|
||||
$Rules
|
||||
|
||||
no_function_declarator_start
|
||||
::= init_declarator_complete
|
||||
| ERROR_TOKEN
|
||||
/. $Build consumeDeclarationProblem(); $EndBuild ./
|
||||
|
||||
-- redeclare this rule with no semantic action, prevents recursion
|
||||
init_declarator_complete
|
||||
::= init_declarator
|
||||
|
||||
$End
|
|
@ -70,6 +70,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
|
|||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||
import org.eclipse.cdt.core.parser.util.DebugUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParsersym;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||
|
||||
|
@ -92,7 +93,7 @@ public abstract class BuildASTParserAction {
|
|||
* @see BuildASTParserAction#consumePlaceHolder()
|
||||
* @see BuildASTParserAction#consumeEmpty()
|
||||
*/
|
||||
protected static final Object PLACE_HOLDER = Boolean.TRUE;
|
||||
protected static final Object PLACE_HOLDER = Boolean.TRUE; // any object will do
|
||||
|
||||
|
||||
// turn debug tracing on and off
|
||||
|
@ -311,6 +312,9 @@ public abstract class BuildASTParserAction {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************************************************************************************
|
||||
* Start of actions.
|
||||
************************************************************************************************************/
|
||||
|
@ -403,6 +407,7 @@ public abstract class BuildASTParserAction {
|
|||
tu.accept(EMPTY_VISITOR);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* When applied to the AST causes ambiguity nodes to be resolved.
|
||||
*/
|
||||
|
@ -453,8 +458,10 @@ public abstract class BuildASTParserAction {
|
|||
result = declarationStatement;
|
||||
else if(isImplicitInt(decl))
|
||||
result = expressionStatement;
|
||||
else
|
||||
else {
|
||||
result = nodeFactory.newAmbiguousStatement(declarationStatement, expressionStatement);
|
||||
setOffsetAndLength(result);
|
||||
}
|
||||
|
||||
astStack.push(result);
|
||||
|
||||
|
@ -532,7 +539,11 @@ public abstract class BuildASTParserAction {
|
|||
public void consumeExpressionID() {
|
||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
|
||||
IASTName name = createName(parser.getRightIToken());
|
||||
System.out.println("Right Token: " + parser.getRightIToken());
|
||||
System.out.println("Left Token: " + parser.getLeftIToken());
|
||||
System.out.println("All Tokens: " + parser.getRuleTokens());
|
||||
//IASTName name = createName(parser.getRightIToken());
|
||||
IASTName name = createName(parser.getLeftIToken());
|
||||
IASTIdExpression expr = nodeFactory.newIdExpression(name);
|
||||
setOffsetAndLength(expr);
|
||||
astStack.push(expr);
|
||||
|
@ -628,8 +639,11 @@ public abstract class BuildASTParserAction {
|
|||
|
||||
if(alternateExpr == null || alternateExpr instanceof IASTProblemExpression)
|
||||
astStack.push(expr);
|
||||
else
|
||||
astStack.push(nodeFactory.newAmbiguousExpression(expr, (IASTExpression)alternateExpr));
|
||||
else {
|
||||
IASTNode ambiguityNode = nodeFactory.newAmbiguousExpression(expr, (IASTExpression)alternateExpr);
|
||||
setOffsetAndLength(ambiguityNode);
|
||||
astStack.push(ambiguityNode);
|
||||
}
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
|
@ -669,19 +683,13 @@ public abstract class BuildASTParserAction {
|
|||
|
||||
if(alternateExpr == null || alternateExpr instanceof IASTProblemExpression)
|
||||
astStack.push(expr);
|
||||
else
|
||||
astStack.push(nodeFactory.newAmbiguousExpression(expr, (IASTExpression)alternateExpr));
|
||||
else {
|
||||
IASTNode ambiguityNode = nodeFactory.newAmbiguousExpression(expr, (IASTExpression)alternateExpr);
|
||||
setOffsetAndLength(ambiguityNode);
|
||||
astStack.push(ambiguityNode);
|
||||
}
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
|
||||
// if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
//
|
||||
// IASTTypeId typeId = (IASTTypeId) astStack.pop();
|
||||
// IASTTypeIdExpression expr = nodeFactory.newTypeIdExpression(operator, typeId);
|
||||
// setOffsetAndLength(expr);
|
||||
// astStack.push(expr);
|
||||
//
|
||||
// if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1035,15 +1043,14 @@ public abstract class BuildASTParserAction {
|
|||
/**
|
||||
* parameter_declaration ::= declaration_specifiers
|
||||
*/
|
||||
public void consumeParameterDeclarationWithoutDeclarator(/*IBinding binding*/) {
|
||||
public void consumeParameterDeclarationWithoutDeclarator() {
|
||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
|
||||
// offsets need to be calculated differently in this case
|
||||
final int endOffset = parser.getRightIToken().getEndOffset() + 1;
|
||||
final int endOffset = parser.getRightIToken().getEndOffset();
|
||||
|
||||
IASTName name = nodeFactory.newName();
|
||||
setOffsetAndLength(name, endOffset, 0);
|
||||
//name.setBinding(binding);
|
||||
|
||||
// it appears that a declarator is always required in the AST here
|
||||
IASTDeclarator declarator = nodeFactory.newDeclarator(name);
|
||||
|
@ -1078,31 +1085,31 @@ public abstract class BuildASTParserAction {
|
|||
*
|
||||
* TODO Make both grammars the same here.
|
||||
*/
|
||||
public void consumeDeclarationSimple(boolean hasDeclaratorList) {
|
||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
|
||||
List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
|
||||
IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null
|
||||
|
||||
// do not generate nodes for extra EOC tokens
|
||||
if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
|
||||
return;
|
||||
|
||||
if(declSpecifier == null) { // can happen if implicit int is used
|
||||
declSpecifier = nodeFactory.newSimpleDeclSpecifier();
|
||||
setOffsetAndLength(declSpecifier, parser.getLeftIToken().getStartOffset(), 0);
|
||||
}
|
||||
|
||||
IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
|
||||
|
||||
for(Object declarator : declarators)
|
||||
declaration.addDeclarator((IASTDeclarator)declarator);
|
||||
|
||||
setOffsetAndLength(declaration);
|
||||
astStack.push(declaration);
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
// public void consumeDeclarationSimple(boolean hasDeclaratorList) {
|
||||
// if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
//
|
||||
// List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
|
||||
// IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null
|
||||
//
|
||||
// // do not generate nodes for extra EOC tokens
|
||||
// if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
|
||||
// return;
|
||||
//
|
||||
// if(declSpecifier == null) { // can happen if implicit int is used
|
||||
// declSpecifier = nodeFactory.newSimpleDeclSpecifier();
|
||||
// setOffsetAndLength(declSpecifier, parser.getLeftIToken().getStartOffset(), 0);
|
||||
// }
|
||||
//
|
||||
// IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
|
||||
//
|
||||
// for(Object declarator : declarators)
|
||||
// declaration.addDeclarator((IASTDeclarator)declarator);
|
||||
//
|
||||
// setOffsetAndLength(declaration);
|
||||
// astStack.push(declaration);
|
||||
//
|
||||
// if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,6 +34,7 @@ import static org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym.TK_uns
|
|||
import static org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym.TK_void;
|
||||
import static org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym.TK_volatile;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lpg.lpgjavaruntime.IToken;
|
||||
|
@ -41,6 +42,7 @@ import lpg.lpgjavaruntime.IToken;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
|
||||
|
@ -131,16 +133,19 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
@Override
|
||||
protected IParser getExpressionStatementParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new C99ExpressionStatementParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IParser getNoCastExpressionParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new C99NoCastExpressionParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IParser getSizeofExpressionParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new C99SizeofExpressionParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
|
@ -539,6 +544,33 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* declaration ::= declaration_specifiers <openscope> init_declarator_list ';'
|
||||
* declaration ::= declaration_specifiers ';'
|
||||
*/
|
||||
public void consumeDeclarationSimple(boolean hasDeclaratorList) {
|
||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
|
||||
List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
|
||||
IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop();
|
||||
|
||||
// do not generate nodes for extra EOC tokens
|
||||
if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
|
||||
return;
|
||||
|
||||
IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
|
||||
|
||||
for(Object declarator : declarators)
|
||||
declaration.addDeclarator((IASTDeclarator)declarator);
|
||||
|
||||
setOffsetAndLength(declaration);
|
||||
astStack.push(declaration);
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* external_declaration ::= ';'
|
||||
*
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
package org.eclipse.cdt.core.dom.lrparser.action.cpp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTInitializer;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
|
||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||
import org.eclipse.cdt.core.dom.ast.IScope;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguity;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVisitor;
|
||||
|
||||
|
||||
public class CPPASTAmbiguousDeclarator extends CPPASTAmbiguity implements IASTDeclarator {
|
||||
|
||||
private List<IASTDeclarator> declarators = new ArrayList<IASTDeclarator>(2);
|
||||
|
||||
public CPPASTAmbiguousDeclarator(IASTDeclarator ... ds) {
|
||||
for(IASTDeclarator declarator : ds)
|
||||
addDeclarator(declarator);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IASTNode[] getNodes() {
|
||||
return declarators.toArray(new IASTDeclarator[declarators.size()]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean accept(ASTVisitor visitor) {
|
||||
// this code was copied from CPPASTAmbiguity.accept() and slightly modified.
|
||||
IASTNode nodeToReplace = this;
|
||||
IASTAmbiguityParent owner = (IASTAmbiguityParent) getParent();
|
||||
|
||||
IASTNode[] nodez = getNodes();
|
||||
int[] problems = new int[nodez.length];
|
||||
|
||||
for(int i = 0; i < nodez.length; ++i) {
|
||||
IASTNode node = nodez[i];
|
||||
owner.replace(nodeToReplace, node);
|
||||
nodeToReplace = node;
|
||||
|
||||
node.accept(visitor);
|
||||
CPPASTNameCollector nameCollector = new CPPASTNameCollector();
|
||||
node.accept(nameCollector);
|
||||
IASTName[] names = nameCollector.getNames();
|
||||
for(IASTName name : names) {
|
||||
try {
|
||||
IBinding b = name.resolveBinding();
|
||||
if(b == null || b instanceof IProblemBinding)
|
||||
++problems[i];
|
||||
} catch (Exception t) {
|
||||
t.printStackTrace();
|
||||
++problems[i];
|
||||
}
|
||||
}
|
||||
if(names.length > 0) {
|
||||
IScope scope = CPPVisitor.getContainingScope(names[0]);
|
||||
if( scope != null ) {
|
||||
try {
|
||||
ASTInternal.flushCache(scope);
|
||||
} catch (DOMException de) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
int bestIndex = 0;
|
||||
int bestValue = problems[0];
|
||||
for (int i = 1; i < problems.length; ++i) {
|
||||
if (problems[i] < bestValue) {
|
||||
bestIndex = i;
|
||||
bestValue = problems[i];
|
||||
}
|
||||
}
|
||||
|
||||
//IASTAmbiguityParent owner = (IASTAmbiguityParent) getParent();
|
||||
owner.replace(nodeToReplace, nodez[bestIndex]);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addDeclarator(IASTDeclarator declarator) {
|
||||
if(declarator != null) {
|
||||
declarators.add(declarator);
|
||||
declarator.setParent(this);
|
||||
declarator.setPropertyInParent(null); // it really doesn't matter
|
||||
}
|
||||
}
|
||||
|
||||
private IASTDeclarator getDefaultDeclarator() {
|
||||
return declarators.get(0);
|
||||
}
|
||||
|
||||
public void addPointerOperator(IASTPointerOperator operator) {
|
||||
getDefaultDeclarator().addPointerOperator(operator);
|
||||
}
|
||||
|
||||
public void setInitializer(IASTInitializer initializer) {
|
||||
getDefaultDeclarator().setInitializer(initializer);
|
||||
}
|
||||
|
||||
public void setName(IASTName name) {
|
||||
getDefaultDeclarator().setName(name);
|
||||
}
|
||||
|
||||
public void setNestedDeclarator(IASTDeclarator nested) {
|
||||
getDefaultDeclarator().setNestedDeclarator(nested);
|
||||
}
|
||||
|
||||
public IASTInitializer getInitializer() {
|
||||
return getDefaultDeclarator().getInitializer();
|
||||
}
|
||||
|
||||
public IASTName getName() {
|
||||
return getDefaultDeclarator().getName();
|
||||
}
|
||||
|
||||
public IASTDeclarator getNestedDeclarator() {
|
||||
return getDefaultDeclarator().getNestedDeclarator();
|
||||
}
|
||||
|
||||
public IASTPointerOperator[] getPointerOperators() {
|
||||
return getDefaultDeclarator().getPointerOperators();
|
||||
}
|
||||
|
||||
public int getRoleForName(IASTName n) {
|
||||
return getDefaultDeclarator().getRoleForName(n);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -187,6 +187,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator;
|
|||
/**
|
||||
* Abstract factory implementation that creates C++ AST nodes.
|
||||
*
|
||||
* TODO rename, its convention for AST nodes to start with CPPAST...
|
||||
*
|
||||
* @author Mike Kucera
|
||||
*/
|
||||
@SuppressWarnings("restriction") // all AST node constructors are internal
|
||||
|
@ -377,7 +379,7 @@ public class CPPASTNodeFactory implements ICPPASTNodeFactory {
|
|||
}
|
||||
|
||||
public IASTSimpleDeclaration newSimpleDeclaration(IASTDeclSpecifier declSpecifier) {
|
||||
return new CPPASTSimpleDeclaration(declSpecifier);
|
||||
return new ISOCPPASTSimpleDeclaration(declSpecifier);
|
||||
}
|
||||
|
||||
public IASTInitializerExpression newInitializerExpression(IASTExpression expression) {
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.lrparser.action.cpp;
|
||||
|
||||
import static org.eclipse.cdt.core.parser.util.CollectionUtils.*;
|
||||
|
||||
import static org.eclipse.cdt.core.parser.util.CollectionUtils.findFirstAndRemove;
|
||||
import static org.eclipse.cdt.core.parser.util.CollectionUtils.reverseIterable;
|
||||
import static org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParsersym.*;
|
||||
|
||||
import java.util.Collections;
|
||||
|
@ -20,16 +20,17 @@ import java.util.List;
|
|||
|
||||
import lpg.lpgjavaruntime.IToken;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTASMDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarationStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTInitializer;
|
||||
|
@ -40,6 +41,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTPointer;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTProblemDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
|
@ -75,7 +77,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplatedTypeTemplateParameter;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTryBlockStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypenameExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
|
||||
|
@ -87,15 +88,13 @@ import org.eclipse.cdt.core.dom.lrparser.IParser;
|
|||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||
import org.eclipse.cdt.core.dom.lrparser.LPGTokenAdapter;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.BuildASTParserAction;
|
||||
import org.eclipse.cdt.core.parser.util.CollectionUtils;
|
||||
import org.eclipse.cdt.core.parser.util.ASTPrinter;
|
||||
import org.eclipse.cdt.core.parser.util.DebugUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99ExpressionStatementParser;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPExpressionStatementParser;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPNoCastExpressionParser;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPNoFunctionDeclaratorParser;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParsersym;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPSizeofExpressionParser;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator;
|
||||
|
||||
|
@ -130,23 +129,22 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
@Override
|
||||
protected IParser getExpressionStatementParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new CPPExpressionStatementParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IParser getNoCastExpressionParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new CPPNoCastExpressionParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected IParser getSizeofExpressionParser() {
|
||||
DebugUtil.printMethodTrace();
|
||||
return new CPPSizeofExpressionParser(parser.getOrderedTerminalSymbols());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* new_expression
|
||||
* ::= dcolon_opt 'new' new_placement_opt new_type_id <openscope-ast> new_array_expressions_op new_initializer_opt
|
||||
|
@ -964,8 +962,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
* object to determine how to set a specifier.
|
||||
*/
|
||||
protected void setSpecifier(IASTDeclSpecifier node, IToken token) {
|
||||
//TODO int kind = asC99Kind(token);
|
||||
|
||||
//TODO int kind = asC99Kind(token)
|
||||
int kind = token.getKind();
|
||||
switch(kind){
|
||||
case TK_typedef: node.setStorageClass(IASTDeclSpecifier.sc_typedef); return;
|
||||
|
@ -1081,8 +1078,9 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
|
||||
private static int getElaboratedTypeSpecifier(IToken token) {
|
||||
switch(token.getKind()) {
|
||||
default: assert false;
|
||||
int kind = token.getKind();
|
||||
switch(kind) {
|
||||
default: assert false : "wrong token kind: " + kind; //$NON-NLS-1$
|
||||
case TK_struct: return IASTElaboratedTypeSpecifier.k_struct;
|
||||
case TK_union: return IASTElaboratedTypeSpecifier.k_union;
|
||||
case TK_enum: return IASTElaboratedTypeSpecifier.k_enum;
|
||||
|
@ -1091,6 +1089,121 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* simple_declaration
|
||||
* ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ';'
|
||||
*
|
||||
* TODO: remove attemptAmbiguityResolution parameter
|
||||
*/
|
||||
public void consumeDeclarationSimple(boolean hasDeclaratorList, boolean attemptAmbiguityResolution) {
|
||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||
|
||||
List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
|
||||
IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null
|
||||
|
||||
// do not generate nodes for extra EOC tokens
|
||||
if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
|
||||
return;
|
||||
|
||||
if(declSpecifier == null) { // can happen if implicit int is used
|
||||
declSpecifier = nodeFactory.newSimpleDeclSpecifier();
|
||||
setOffsetAndLength(declSpecifier, parser.getLeftIToken().getStartOffset(), 0);
|
||||
}
|
||||
|
||||
IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
|
||||
setOffsetAndLength(declaration);
|
||||
for(Object declarator : declarators)
|
||||
declaration.addDeclarator((IASTDeclarator)declarator);
|
||||
|
||||
astStack.push(declaration);
|
||||
|
||||
// IASTNode alternateDeclaration = null;
|
||||
// if(attemptAmbiguityResolution) {// && hasConstructorInitializer(declaration)) { // try to resolve the constructor initializer ambiguity
|
||||
// // TODO should this ambiguity be resolved here, or at the level of individual declarators?
|
||||
// IParser alternateParser = new CPPNoConstructorInitializerParser(parser.getOrderedTerminalSymbols());
|
||||
// alternateDeclaration = runSecondaryParser(alternateParser);
|
||||
// }
|
||||
//
|
||||
// if(alternateDeclaration == null || alternateDeclaration instanceof IASTProblemDeclaration)
|
||||
// astStack.push(declaration);
|
||||
// else {
|
||||
// System.out.println("Ambiguous Declaration in my parser!");
|
||||
//// ASTPrinter.print(declaration);
|
||||
//// System.out.println();
|
||||
//// ASTPrinter.print(alternateDeclaration);
|
||||
//// System.out.println();
|
||||
//
|
||||
// IASTNode ambiguityNode = nodeFactory.newAmbiguousDeclaration((IASTDeclaration)alternateDeclaration, declaration);
|
||||
// setOffsetAndLength(ambiguityNode);
|
||||
// astStack.push(ambiguityNode);
|
||||
// }
|
||||
//
|
||||
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
|
||||
|
||||
public void consumeInitDeclaratorComplete() {
|
||||
DebugUtil.printMethodTrace();
|
||||
|
||||
IASTDeclarator declarator = (IASTDeclarator) astStack.peek();
|
||||
if(!(declarator instanceof IASTFunctionDeclarator))
|
||||
return;
|
||||
|
||||
IParser alternateParser = new CPPNoFunctionDeclaratorParser(parser.getOrderedTerminalSymbols());
|
||||
IASTNode alternateDeclarator = runSecondaryParser(alternateParser);
|
||||
|
||||
if(alternateDeclarator == null || alternateDeclarator instanceof IASTProblemDeclaration)
|
||||
return;
|
||||
|
||||
|
||||
astStack.pop();
|
||||
IASTNode ambiguityNode = new CPPASTAmbiguousDeclarator(declarator, (IASTDeclarator)alternateDeclarator);
|
||||
|
||||
System.out.println("AMBIGUOUS DECLARATOR!");
|
||||
// ASTPrinter.print(declarator);
|
||||
// System.out.println();
|
||||
// ASTPrinter.print(alternateDeclarator);
|
||||
// System.out.println();
|
||||
|
||||
setOffsetAndLength(ambiguityNode);
|
||||
astStack.push(ambiguityNode);
|
||||
|
||||
|
||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns true iff the given AST contains at least one constructor initializer node.
|
||||
* Can be called on any AST node but is mean to be called on declarations or declarators.
|
||||
*
|
||||
* TODO how freaking inefficient is this?
|
||||
*/
|
||||
private static boolean hasConstructorInitializer(IASTNode declaration) {
|
||||
final boolean[] found = {false};
|
||||
|
||||
ASTVisitor detector = new ASTVisitor() {
|
||||
{shouldVisitInitializers = true;}
|
||||
@Override
|
||||
public int visit(IASTInitializer initializer) {
|
||||
if(initializer instanceof ICPPASTConstructorInitializer) {
|
||||
found[0] = true; // who said Java doesn't have closures
|
||||
return PROCESS_ABORT;
|
||||
}
|
||||
return PROCESS_CONTINUE;
|
||||
}
|
||||
};
|
||||
|
||||
declaration.accept(detector);
|
||||
System.out.println("hasConstructorInitializer: " + found[0]);
|
||||
return found[0];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* visibility_label
|
||||
* ::= access_specifier_keyword ':'
|
||||
|
@ -1109,8 +1222,9 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
|
||||
private static int getAccessSpecifier(IToken token) {
|
||||
switch(token.getKind()) {
|
||||
default: assert false;
|
||||
int kind = token.getKind();
|
||||
switch(kind) {
|
||||
default: assert false : "wrong token kind: " + kind; //$NON-NLS-1$
|
||||
case TK_private: return ICPPASTVisiblityLabel.v_private;
|
||||
case TK_public: return ICPPASTVisiblityLabel.v_public;
|
||||
case TK_protected: return ICPPASTVisiblityLabel.v_protected;
|
||||
|
@ -1218,8 +1332,9 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
|
||||
private static int getCompositeTypeSpecifier(IToken token) {
|
||||
switch(token.getKind()) {
|
||||
default: assert false;
|
||||
int kind = token.getKind();
|
||||
switch(kind) {
|
||||
default: assert false : "wrong token kind: " + kind; //$NON-NLS-1$
|
||||
case TK_struct: return IASTCompositeTypeSpecifier.k_struct;
|
||||
case TK_union: return IASTCompositeTypeSpecifier.k_union;
|
||||
case TK_class: return ICPPASTCompositeTypeSpecifier.k_class;
|
||||
|
@ -1325,8 +1440,9 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
}
|
||||
|
||||
for(Object token : astStack.closeScope()) {
|
||||
switch(((IToken)token).getKind()) {
|
||||
default: assert false;
|
||||
int kind = ((IToken)token).getKind();
|
||||
switch(kind) {
|
||||
default: assert false : "wrong token kind: " + kind; //$NON-NLS-1$
|
||||
case TK_const: declarator.setConst(true); break;
|
||||
case TK_volatile: declarator.setVolatile(true); break;
|
||||
}
|
||||
|
@ -1501,8 +1617,9 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
}
|
||||
|
||||
private static int getTemplateParameterType(IToken token) {
|
||||
switch(token.getKind()) {
|
||||
default: assert false;
|
||||
int kind = token.getKind();
|
||||
switch(kind) {
|
||||
default: assert false : "wrong token kind: " + kind; //$NON-NLS-1$
|
||||
case TK_class: return ICPPASTSimpleTypeTemplateParameter.st_class;
|
||||
case TK_typename: return ICPPASTSimpleTypeTemplateParameter.st_typename;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package org.eclipse.cdt.core.dom.lrparser.action.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
|
||||
|
||||
/**
|
||||
* TODO this functionality should be moved into CPPASTSimpleDeclaration
|
||||
* @author Mike Kucera
|
||||
*
|
||||
*/
|
||||
public class ISOCPPASTSimpleDeclaration extends CPPASTSimpleDeclaration implements IASTAmbiguityParent {
|
||||
|
||||
public ISOCPPASTSimpleDeclaration() {
|
||||
}
|
||||
|
||||
public ISOCPPASTSimpleDeclaration(IASTDeclSpecifier declSpecifier) {
|
||||
super(declSpecifier);
|
||||
}
|
||||
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
IASTDeclarator[] declarators = getDeclarators();
|
||||
for(int i = 0; i < declarators.length; i++) {
|
||||
if(declarators[i] == child) {
|
||||
declarators[i] = (IASTDeclarator)other;
|
||||
other.setParent(child.getParent());
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -213,7 +213,7 @@ public int getKind(int i) {
|
|||
int kind = super.getKind(i);
|
||||
|
||||
// There used to be a special token kind for zero used to parser pure virtual function declarations.
|
||||
// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
|
||||
// But it turned out to be easier to just parse them as an init_ declarator and programaticaly check
|
||||
// for pure virtual, see consumeMemberDeclaratorWithInitializer().
|
||||
|
||||
//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
|
||||
|
@ -1221,14 +1221,14 @@ public CPPExpressionStatementParser(String[] mapFrom) { // constructor
|
|||
// Rule 221: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 221: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 222: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 222: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1449,660 +1449,667 @@ public CPPExpressionStatementParser(String[] mapFrom) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 312: init_declarator ::= declarator initializer
|
||||
// Rule 311: init_declarator_complete ::= init_declarator
|
||||
//
|
||||
case 312: { action.builder.
|
||||
case 311: { action.builder.
|
||||
consumeInitDeclaratorComplete(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: init_declarator ::= declarator initializer
|
||||
//
|
||||
case 313: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 315: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 314: { action.builder.
|
||||
case 315: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 316: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 317: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 316: { action.builder.
|
||||
case 317: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 320: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 321: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 320: { action.builder.
|
||||
case 321: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 321: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 322: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 321: { action.builder.
|
||||
case 322: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 322: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 323: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 322: { action.builder.
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 323: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 324: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 324: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 324: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 325: array_modifier ::= [ constant_expression ]
|
||||
// Rule 325: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 325: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: array_modifier ::= [ constant_expression ]
|
||||
//
|
||||
case 326: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: array_modifier ::= [ ]
|
||||
// Rule 327: array_modifier ::= [ ]
|
||||
//
|
||||
case 326: { action.builder.
|
||||
case 327: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 327: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 328: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 327: { action.builder.
|
||||
case 328: { action.builder.
|
||||
consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 328: ptr_operator ::= &
|
||||
// Rule 329: ptr_operator ::= &
|
||||
//
|
||||
case 328: { action.builder.
|
||||
case 329: { action.builder.
|
||||
consumeReferenceOperator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 329: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 330: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 329: { action.builder.
|
||||
case 330: { action.builder.
|
||||
consumePointerToMember(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 335: cv_qualifier ::= const
|
||||
//
|
||||
case 335: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 336: cv_qualifier ::= volatile
|
||||
// Rule 336: cv_qualifier ::= const
|
||||
//
|
||||
case 336: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 338: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
// Rule 337: cv_qualifier ::= volatile
|
||||
//
|
||||
case 338: { action.builder.
|
||||
case 337: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 339: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
//
|
||||
case 339: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 339: type_id ::= type_specifier_seq
|
||||
// Rule 340: type_id ::= type_specifier_seq
|
||||
//
|
||||
case 339: { action.builder.
|
||||
case 340: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 340: type_id ::= type_specifier_seq abstract_declarator
|
||||
// Rule 341: type_id ::= type_specifier_seq abstract_declarator
|
||||
//
|
||||
case 340: { action.builder.
|
||||
case 341: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 343: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 344: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 343: { action.builder.
|
||||
case 344: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 344: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
// Rule 345: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
//
|
||||
case 344: { action.builder.
|
||||
case 345: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 348: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 349: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 348: { action.builder.
|
||||
case 349: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 349: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 350: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 349: { action.builder.
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 350: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
// Rule 351: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 351: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 352: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 352: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 353: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 354: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 353: { action.builder.
|
||||
case 354: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 354: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 355: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 356: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 356: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: abstract_declarator_opt ::= $Empty
|
||||
// Rule 356: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
//
|
||||
case 362: { action.builder.
|
||||
case 356: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
// Rule 357: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 357: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: abstract_declarator_opt ::= $Empty
|
||||
//
|
||||
case 363: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 364: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
//
|
||||
case 364: { action.builder.
|
||||
consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 364: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 365: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 364: { action.builder.
|
||||
case 365: { action.builder.
|
||||
consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 366: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
// Rule 367: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
//
|
||||
case 366: { action.builder.
|
||||
case 367: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 368: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: parameter_init_declarator ::= = parameter_initializer
|
||||
// Rule 369: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 369: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: parameter_init_declarator ::= = parameter_initializer
|
||||
//
|
||||
case 370: { action.builder.
|
||||
consumeDeclaratorWithInitializer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: parameter_initializer ::= assignment_expression
|
||||
// Rule 371: parameter_initializer ::= assignment_expression
|
||||
//
|
||||
case 370: { action.builder.
|
||||
case 371: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 371: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
// Rule 372: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
//
|
||||
case 371: { action.builder.
|
||||
case 372: { action.builder.
|
||||
consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 372: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
// Rule 373: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
//
|
||||
case 372: { action.builder.
|
||||
case 373: { action.builder.
|
||||
consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 375: initializer ::= ( expression_list )
|
||||
// Rule 376: initializer ::= ( expression_list )
|
||||
//
|
||||
case 375: { action.builder.
|
||||
case 376: { action.builder.
|
||||
consumeInitializerConstructor(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 376: initializer_clause ::= assignment_expression
|
||||
// Rule 377: initializer_clause ::= assignment_expression
|
||||
//
|
||||
case 376: { action.builder.
|
||||
case 377: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 377: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 378: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 379: initializer_clause ::= { <openscope-ast> }
|
||||
// Rule 379: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
//
|
||||
case 379: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 384: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
// Rule 380: initializer_clause ::= { <openscope-ast> }
|
||||
//
|
||||
case 384: { action.builder.
|
||||
case 380: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassSpecifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 386: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 386: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 386: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 387: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
// Rule 387: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 387: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 388: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 388: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 388: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 390: identifier_name_opt ::= $Empty
|
||||
// Rule 389: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 390: { action.builder.
|
||||
case 389: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 391: identifier_name_opt ::= $Empty
|
||||
//
|
||||
case 391: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 394: visibility_label ::= access_specifier_keyword :
|
||||
// Rule 395: visibility_label ::= access_specifier_keyword :
|
||||
//
|
||||
case 394: { action.builder.
|
||||
case 395: { action.builder.
|
||||
consumeVisibilityLabel(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 395: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 395: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 396: member_declaration ::= declaration_specifiers_opt ;
|
||||
// Rule 396: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 396: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 399: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
// Rule 397: member_declaration ::= declaration_specifiers_opt ;
|
||||
//
|
||||
case 399: { action.builder.
|
||||
case 397: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 400: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
//
|
||||
case 400: { action.builder.
|
||||
consumeMemberDeclarationQualifiedId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 403: member_declaration ::= ERROR_TOKEN
|
||||
// Rule 404: member_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 403: { action.builder.
|
||||
case 404: { action.builder.
|
||||
consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 411: member_declarator ::= declarator constant_initializer
|
||||
// Rule 412: member_declarator ::= declarator constant_initializer
|
||||
//
|
||||
case 411: { action.builder.
|
||||
case 412: { action.builder.
|
||||
consumeMemberDeclaratorWithInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 412: member_declarator ::= bit_field_declarator : constant_expression
|
||||
// Rule 413: member_declarator ::= bit_field_declarator : constant_expression
|
||||
//
|
||||
case 412: { action.builder.
|
||||
case 413: { action.builder.
|
||||
consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 413: member_declarator ::= : constant_expression
|
||||
// Rule 414: member_declarator ::= : constant_expression
|
||||
//
|
||||
case 413: { action.builder.
|
||||
case 414: { action.builder.
|
||||
consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 414: bit_field_declarator ::= identifier_name
|
||||
// Rule 415: bit_field_declarator ::= identifier_name
|
||||
//
|
||||
case 414: { action.builder.
|
||||
case 415: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 415: constant_initializer ::= = constant_expression
|
||||
// Rule 416: constant_initializer ::= = constant_expression
|
||||
//
|
||||
case 415: { action.builder.
|
||||
case 416: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 421: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 422: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 421: { action.builder.
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 422: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 423: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 423: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 423: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 424: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 424: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 424: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeBaseSpecifier(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: access_specifier_keyword ::= private
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 426: access_specifier_keyword ::= protected
|
||||
// Rule 426: access_specifier_keyword ::= private
|
||||
//
|
||||
case 426: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 427: access_specifier_keyword ::= public
|
||||
// Rule 427: access_specifier_keyword ::= protected
|
||||
//
|
||||
case 427: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 429: access_specifier_keyword_opt ::= $Empty
|
||||
// Rule 428: access_specifier_keyword ::= public
|
||||
//
|
||||
case 429: { action.builder.
|
||||
case 428: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: access_specifier_keyword_opt ::= $Empty
|
||||
//
|
||||
case 430: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: conversion_function_id_name ::= operator conversion_type_id
|
||||
// Rule 431: conversion_function_id_name ::= operator conversion_type_id
|
||||
//
|
||||
case 430: { action.builder.
|
||||
case 431: { action.builder.
|
||||
consumeConversionName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 431: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
// Rule 432: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
//
|
||||
case 431: { action.builder.
|
||||
case 432: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 432: conversion_type_id ::= type_specifier_seq
|
||||
// Rule 433: conversion_type_id ::= type_specifier_seq
|
||||
//
|
||||
case 432: { action.builder.
|
||||
case 433: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 433: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 434: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 433: { action.builder.
|
||||
case 434: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 439: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
// Rule 440: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
//
|
||||
case 439: { action.builder.
|
||||
case 440: { action.builder.
|
||||
consumeConstructorChainInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 440: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 441: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 440: { action.builder.
|
||||
case 441: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 443: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 444: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 443: { action.builder.
|
||||
case 444: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 444: operator_id_name ::= operator overloadable_operator
|
||||
// Rule 445: operator_id_name ::= operator overloadable_operator
|
||||
//
|
||||
case 444: { action.builder.
|
||||
case 445: { action.builder.
|
||||
consumeOperatorName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 487: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
// Rule 488: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
//
|
||||
case 487: { action.builder.
|
||||
case 488: { action.builder.
|
||||
consumeTemplateDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 488: export_opt ::= export
|
||||
// Rule 489: export_opt ::= export
|
||||
//
|
||||
case 488: { action.builder.
|
||||
case 489: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 489: export_opt ::= $Empty
|
||||
// Rule 490: export_opt ::= $Empty
|
||||
//
|
||||
case 489: { action.builder.
|
||||
case 490: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 494: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 494: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 495: type_parameter ::= class identifier_name_opt = type_id
|
||||
// Rule 495: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 495: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 496: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= typename identifier_name_opt = type_id
|
||||
// Rule 496: type_parameter ::= class identifier_name_opt = type_id
|
||||
//
|
||||
case 497: { action.builder.
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
// Rule 497: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 497: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= typename identifier_name_opt = type_id
|
||||
//
|
||||
case 498: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 499: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
//
|
||||
case 499: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 499: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
// Rule 500: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
//
|
||||
case 499: { action.builder.
|
||||
case 500: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 500: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 501: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 500: { action.builder.
|
||||
case 501: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 509: explicit_instantiation ::= template declaration
|
||||
// Rule 510: explicit_instantiation ::= template declaration
|
||||
//
|
||||
case 509: { action.builder.
|
||||
case 510: { action.builder.
|
||||
consumeTemplateExplicitInstantiation(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 510: explicit_specialization ::= template < > declaration
|
||||
// Rule 511: explicit_specialization ::= template < > declaration
|
||||
//
|
||||
case 510: { action.builder.
|
||||
case 511: { action.builder.
|
||||
consumeTemplateExplicitSpecialization(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 511: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
// Rule 512: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
//
|
||||
case 511: { action.builder.
|
||||
case 512: { action.builder.
|
||||
consumeStatementTryBlock(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 514: handler ::= catch ( exception_declaration ) compound_statement
|
||||
// Rule 515: handler ::= catch ( exception_declaration ) compound_statement
|
||||
//
|
||||
case 514: { action.builder.
|
||||
case 515: { action.builder.
|
||||
consumeStatementCatchHandler(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 515: handler ::= catch ( ... ) compound_statement
|
||||
// Rule 516: handler ::= catch ( ... ) compound_statement
|
||||
//
|
||||
case 515: { action.builder.
|
||||
case 516: { action.builder.
|
||||
consumeStatementCatchHandler(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 516: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 517: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 518: exception_declaration ::= type_specifier_seq
|
||||
// Rule 518: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
//
|
||||
case 518: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 526: expression_parser_start ::= ERROR_TOKEN
|
||||
// Rule 519: exception_declaration ::= type_specifier_seq
|
||||
//
|
||||
case 526: { action.builder.
|
||||
case 519: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 527: expression_parser_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 527: { action.builder.
|
||||
consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -213,7 +213,7 @@ public int getKind(int i) {
|
|||
int kind = super.getKind(i);
|
||||
|
||||
// There used to be a special token kind for zero used to parser pure virtual function declarations.
|
||||
// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
|
||||
// But it turned out to be easier to just parse them as an init_ declarator and programaticaly check
|
||||
// for pure virtual, see consumeMemberDeclaratorWithInitializer().
|
||||
|
||||
//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
|
||||
|
@ -1214,14 +1214,14 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
|
|||
// Rule 220: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 220: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 221: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 221: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1442,660 +1442,667 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 311: init_declarator ::= declarator initializer
|
||||
// Rule 310: init_declarator_complete ::= init_declarator
|
||||
//
|
||||
case 311: { action.builder.
|
||||
case 310: { action.builder.
|
||||
consumeInitDeclaratorComplete(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: init_declarator ::= declarator initializer
|
||||
//
|
||||
case 312: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 314: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 313: { action.builder.
|
||||
case 314: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 315: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 316: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 315: { action.builder.
|
||||
case 316: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 319: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 320: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 319: { action.builder.
|
||||
case 320: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 320: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 321: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 320: { action.builder.
|
||||
case 321: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 321: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 322: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 321: { action.builder.
|
||||
case 322: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 322: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 322: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 323: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 323: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 324: array_modifier ::= [ constant_expression ]
|
||||
// Rule 324: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 324: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 325: array_modifier ::= [ constant_expression ]
|
||||
//
|
||||
case 325: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 325: array_modifier ::= [ ]
|
||||
// Rule 326: array_modifier ::= [ ]
|
||||
//
|
||||
case 325: { action.builder.
|
||||
case 326: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 327: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 326: { action.builder.
|
||||
case 327: { action.builder.
|
||||
consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 327: ptr_operator ::= &
|
||||
// Rule 328: ptr_operator ::= &
|
||||
//
|
||||
case 327: { action.builder.
|
||||
case 328: { action.builder.
|
||||
consumeReferenceOperator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 328: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 329: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 328: { action.builder.
|
||||
case 329: { action.builder.
|
||||
consumePointerToMember(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 334: cv_qualifier ::= const
|
||||
//
|
||||
case 334: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 335: cv_qualifier ::= volatile
|
||||
// Rule 335: cv_qualifier ::= const
|
||||
//
|
||||
case 335: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 337: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
// Rule 336: cv_qualifier ::= volatile
|
||||
//
|
||||
case 337: { action.builder.
|
||||
case 336: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 338: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
//
|
||||
case 338: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 338: type_id ::= type_specifier_seq
|
||||
// Rule 339: type_id ::= type_specifier_seq
|
||||
//
|
||||
case 338: { action.builder.
|
||||
case 339: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 339: type_id ::= type_specifier_seq abstract_declarator
|
||||
// Rule 340: type_id ::= type_specifier_seq abstract_declarator
|
||||
//
|
||||
case 339: { action.builder.
|
||||
case 340: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 342: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 343: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 342: { action.builder.
|
||||
case 343: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 343: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
// Rule 344: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
//
|
||||
case 343: { action.builder.
|
||||
case 344: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 347: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 348: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 347: { action.builder.
|
||||
case 348: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 348: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 349: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 348: { action.builder.
|
||||
case 349: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 349: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 349: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 350: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
// Rule 350: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 351: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 351: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 352: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 353: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 352: { action.builder.
|
||||
case 353: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 353: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 354: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 355: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 361: abstract_declarator_opt ::= $Empty
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
//
|
||||
case 361: { action.builder.
|
||||
case 355: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
// Rule 356: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 356: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: abstract_declarator_opt ::= $Empty
|
||||
//
|
||||
case 362: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
//
|
||||
case 363: { action.builder.
|
||||
consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 364: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 363: { action.builder.
|
||||
case 364: { action.builder.
|
||||
consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 365: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
// Rule 366: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
//
|
||||
case 365: { action.builder.
|
||||
case 366: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 367: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 367: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: parameter_init_declarator ::= = parameter_initializer
|
||||
// Rule 368: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 368: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: parameter_init_declarator ::= = parameter_initializer
|
||||
//
|
||||
case 369: { action.builder.
|
||||
consumeDeclaratorWithInitializer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: parameter_initializer ::= assignment_expression
|
||||
// Rule 370: parameter_initializer ::= assignment_expression
|
||||
//
|
||||
case 369: { action.builder.
|
||||
case 370: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
// Rule 371: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
//
|
||||
case 370: { action.builder.
|
||||
case 371: { action.builder.
|
||||
consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 371: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
// Rule 372: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
//
|
||||
case 371: { action.builder.
|
||||
case 372: { action.builder.
|
||||
consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 374: initializer ::= ( expression_list )
|
||||
// Rule 375: initializer ::= ( expression_list )
|
||||
//
|
||||
case 374: { action.builder.
|
||||
case 375: { action.builder.
|
||||
consumeInitializerConstructor(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 375: initializer_clause ::= assignment_expression
|
||||
// Rule 376: initializer_clause ::= assignment_expression
|
||||
//
|
||||
case 375: { action.builder.
|
||||
case 376: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 376: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 376: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 377: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> }
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
//
|
||||
case 378: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 383: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
// Rule 379: initializer_clause ::= { <openscope-ast> }
|
||||
//
|
||||
case 383: { action.builder.
|
||||
case 379: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 384: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
//
|
||||
case 384: { action.builder.
|
||||
consumeClassSpecifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 384: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 384: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 385: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 386: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
// Rule 386: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 386: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 387: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 387: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 387: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 389: identifier_name_opt ::= $Empty
|
||||
// Rule 388: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 389: { action.builder.
|
||||
case 388: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 390: identifier_name_opt ::= $Empty
|
||||
//
|
||||
case 390: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 393: visibility_label ::= access_specifier_keyword :
|
||||
// Rule 394: visibility_label ::= access_specifier_keyword :
|
||||
//
|
||||
case 393: { action.builder.
|
||||
case 394: { action.builder.
|
||||
consumeVisibilityLabel(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 394: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 394: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 395: member_declaration ::= declaration_specifiers_opt ;
|
||||
// Rule 395: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 395: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 398: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
// Rule 396: member_declaration ::= declaration_specifiers_opt ;
|
||||
//
|
||||
case 398: { action.builder.
|
||||
case 396: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 399: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
//
|
||||
case 399: { action.builder.
|
||||
consumeMemberDeclarationQualifiedId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 402: member_declaration ::= ERROR_TOKEN
|
||||
// Rule 403: member_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 402: { action.builder.
|
||||
case 403: { action.builder.
|
||||
consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 410: member_declarator ::= declarator constant_initializer
|
||||
// Rule 411: member_declarator ::= declarator constant_initializer
|
||||
//
|
||||
case 410: { action.builder.
|
||||
case 411: { action.builder.
|
||||
consumeMemberDeclaratorWithInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 411: member_declarator ::= bit_field_declarator : constant_expression
|
||||
// Rule 412: member_declarator ::= bit_field_declarator : constant_expression
|
||||
//
|
||||
case 411: { action.builder.
|
||||
case 412: { action.builder.
|
||||
consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 412: member_declarator ::= : constant_expression
|
||||
// Rule 413: member_declarator ::= : constant_expression
|
||||
//
|
||||
case 412: { action.builder.
|
||||
case 413: { action.builder.
|
||||
consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 413: bit_field_declarator ::= identifier_name
|
||||
// Rule 414: bit_field_declarator ::= identifier_name
|
||||
//
|
||||
case 413: { action.builder.
|
||||
case 414: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 414: constant_initializer ::= = constant_expression
|
||||
// Rule 415: constant_initializer ::= = constant_expression
|
||||
//
|
||||
case 414: { action.builder.
|
||||
case 415: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 420: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 421: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 420: { action.builder.
|
||||
case 421: { action.builder.
|
||||
consumeBaseSpecifier(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 421: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 421: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 422: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 422: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 423: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 423: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 423: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 424: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 424: { action.builder.
|
||||
consumeBaseSpecifier(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 424: access_specifier_keyword ::= private
|
||||
//
|
||||
case 424: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: access_specifier_keyword ::= protected
|
||||
// Rule 425: access_specifier_keyword ::= private
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 426: access_specifier_keyword ::= public
|
||||
// Rule 426: access_specifier_keyword ::= protected
|
||||
//
|
||||
case 426: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 428: access_specifier_keyword_opt ::= $Empty
|
||||
// Rule 427: access_specifier_keyword ::= public
|
||||
//
|
||||
case 428: { action.builder.
|
||||
case 427: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 429: access_specifier_keyword_opt ::= $Empty
|
||||
//
|
||||
case 429: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 429: conversion_function_id_name ::= operator conversion_type_id
|
||||
// Rule 430: conversion_function_id_name ::= operator conversion_type_id
|
||||
//
|
||||
case 429: { action.builder.
|
||||
case 430: { action.builder.
|
||||
consumeConversionName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
// Rule 431: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
//
|
||||
case 430: { action.builder.
|
||||
case 431: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 431: conversion_type_id ::= type_specifier_seq
|
||||
// Rule 432: conversion_type_id ::= type_specifier_seq
|
||||
//
|
||||
case 431: { action.builder.
|
||||
case 432: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 432: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 433: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 432: { action.builder.
|
||||
case 433: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 438: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
// Rule 439: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
//
|
||||
case 438: { action.builder.
|
||||
case 439: { action.builder.
|
||||
consumeConstructorChainInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 439: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 440: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 439: { action.builder.
|
||||
case 440: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 442: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 443: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 442: { action.builder.
|
||||
case 443: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 443: operator_id_name ::= operator overloadable_operator
|
||||
// Rule 444: operator_id_name ::= operator overloadable_operator
|
||||
//
|
||||
case 443: { action.builder.
|
||||
case 444: { action.builder.
|
||||
consumeOperatorName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 486: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
// Rule 487: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
//
|
||||
case 486: { action.builder.
|
||||
case 487: { action.builder.
|
||||
consumeTemplateDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 487: export_opt ::= export
|
||||
// Rule 488: export_opt ::= export
|
||||
//
|
||||
case 487: { action.builder.
|
||||
case 488: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 488: export_opt ::= $Empty
|
||||
// Rule 489: export_opt ::= $Empty
|
||||
//
|
||||
case 488: { action.builder.
|
||||
case 489: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 493: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 493: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 494: type_parameter ::= class identifier_name_opt = type_id
|
||||
// Rule 494: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 494: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 495: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 495: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 496: type_parameter ::= typename identifier_name_opt = type_id
|
||||
// Rule 495: type_parameter ::= class identifier_name_opt = type_id
|
||||
//
|
||||
case 496: { action.builder.
|
||||
case 495: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
// Rule 496: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= typename identifier_name_opt = type_id
|
||||
//
|
||||
case 497: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
//
|
||||
case 498: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
// Rule 499: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
//
|
||||
case 498: { action.builder.
|
||||
case 499: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 499: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 500: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 499: { action.builder.
|
||||
case 500: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 508: explicit_instantiation ::= template declaration
|
||||
// Rule 509: explicit_instantiation ::= template declaration
|
||||
//
|
||||
case 508: { action.builder.
|
||||
case 509: { action.builder.
|
||||
consumeTemplateExplicitInstantiation(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 509: explicit_specialization ::= template < > declaration
|
||||
// Rule 510: explicit_specialization ::= template < > declaration
|
||||
//
|
||||
case 509: { action.builder.
|
||||
case 510: { action.builder.
|
||||
consumeTemplateExplicitSpecialization(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 510: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
// Rule 511: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
//
|
||||
case 510: { action.builder.
|
||||
case 511: { action.builder.
|
||||
consumeStatementTryBlock(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 513: handler ::= catch ( exception_declaration ) compound_statement
|
||||
// Rule 514: handler ::= catch ( exception_declaration ) compound_statement
|
||||
//
|
||||
case 513: { action.builder.
|
||||
case 514: { action.builder.
|
||||
consumeStatementCatchHandler(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 514: handler ::= catch ( ... ) compound_statement
|
||||
// Rule 515: handler ::= catch ( ... ) compound_statement
|
||||
//
|
||||
case 514: { action.builder.
|
||||
case 515: { action.builder.
|
||||
consumeStatementCatchHandler(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 515: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 515: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 516: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
//
|
||||
case 517: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 525: no_cast_start ::= ERROR_TOKEN
|
||||
// Rule 518: exception_declaration ::= type_specifier_seq
|
||||
//
|
||||
case 525: { action.builder.
|
||||
case 518: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 526: no_cast_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 526: { action.builder.
|
||||
consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,272 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl_v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*********************************************************************************/
|
||||
|
||||
// This file was generated by LPG
|
||||
|
||||
package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||
|
||||
public interface CPPNoFunctionDeclaratorParsersym {
|
||||
public final static int
|
||||
TK_asm = 61,
|
||||
TK_auto = 50,
|
||||
TK_bool = 14,
|
||||
TK_break = 76,
|
||||
TK_case = 77,
|
||||
TK_catch = 119,
|
||||
TK_char = 15,
|
||||
TK_class = 62,
|
||||
TK_const = 46,
|
||||
TK_const_cast = 31,
|
||||
TK_continue = 78,
|
||||
TK_default = 79,
|
||||
TK_delete = 64,
|
||||
TK_do = 80,
|
||||
TK_double = 16,
|
||||
TK_dynamic_cast = 32,
|
||||
TK_else = 122,
|
||||
TK_enum = 68,
|
||||
TK_explicit = 51,
|
||||
TK_export = 81,
|
||||
TK_extern = 17,
|
||||
TK_false = 33,
|
||||
TK_float = 18,
|
||||
TK_for = 82,
|
||||
TK_friend = 52,
|
||||
TK_goto = 83,
|
||||
TK_if = 84,
|
||||
TK_inline = 53,
|
||||
TK_int = 19,
|
||||
TK_long = 20,
|
||||
TK_mutable = 54,
|
||||
TK_namespace = 55,
|
||||
TK_new = 65,
|
||||
TK_operator = 7,
|
||||
TK_private = 114,
|
||||
TK_protected = 115,
|
||||
TK_public = 116,
|
||||
TK_register = 56,
|
||||
TK_reinterpret_cast = 34,
|
||||
TK_return = 85,
|
||||
TK_short = 21,
|
||||
TK_signed = 22,
|
||||
TK_sizeof = 35,
|
||||
TK_static = 57,
|
||||
TK_static_cast = 36,
|
||||
TK_struct = 69,
|
||||
TK_switch = 86,
|
||||
TK_template = 28,
|
||||
TK_this = 37,
|
||||
TK_throw = 58,
|
||||
TK_try = 74,
|
||||
TK_true = 38,
|
||||
TK_typedef = 59,
|
||||
TK_typeid = 39,
|
||||
TK_typename = 10,
|
||||
TK_union = 70,
|
||||
TK_unsigned = 23,
|
||||
TK_using = 47,
|
||||
TK_virtual = 45,
|
||||
TK_void = 24,
|
||||
TK_volatile = 48,
|
||||
TK_wchar_t = 25,
|
||||
TK_while = 75,
|
||||
TK_integer = 40,
|
||||
TK_floating = 41,
|
||||
TK_charconst = 42,
|
||||
TK_stringlit = 29,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 9,
|
||||
TK_Invalid = 124,
|
||||
TK_LeftBracket = 60,
|
||||
TK_LeftParen = 3,
|
||||
TK_LeftBrace = 49,
|
||||
TK_Dot = 120,
|
||||
TK_DotStar = 96,
|
||||
TK_Arrow = 103,
|
||||
TK_ArrowStar = 90,
|
||||
TK_PlusPlus = 26,
|
||||
TK_MinusMinus = 27,
|
||||
TK_And = 8,
|
||||
TK_Star = 6,
|
||||
TK_Plus = 11,
|
||||
TK_Minus = 12,
|
||||
TK_Tilde = 5,
|
||||
TK_Bang = 30,
|
||||
TK_Slash = 91,
|
||||
TK_Percent = 92,
|
||||
TK_RightShift = 88,
|
||||
TK_LeftShift = 89,
|
||||
TK_LT = 43,
|
||||
TK_GT = 63,
|
||||
TK_LE = 93,
|
||||
TK_GE = 94,
|
||||
TK_EQ = 97,
|
||||
TK_NE = 98,
|
||||
TK_Caret = 99,
|
||||
TK_Or = 100,
|
||||
TK_AndAnd = 101,
|
||||
TK_OrOr = 102,
|
||||
TK_Question = 117,
|
||||
TK_Colon = 72,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 67,
|
||||
TK_StarAssign = 104,
|
||||
TK_SlashAssign = 105,
|
||||
TK_PercentAssign = 106,
|
||||
TK_PlusAssign = 107,
|
||||
TK_MinusAssign = 108,
|
||||
TK_RightShiftAssign = 109,
|
||||
TK_LeftShiftAssign = 110,
|
||||
TK_AndAssign = 111,
|
||||
TK_CaretAssign = 112,
|
||||
TK_OrAssign = 113,
|
||||
TK_Comma = 66,
|
||||
TK_zero = 44,
|
||||
TK_RightBracket = 118,
|
||||
TK_RightParen = 87,
|
||||
TK_RightBrace = 71,
|
||||
TK_SemiColon = 13,
|
||||
TK_ERROR_TOKEN = 73,
|
||||
TK_original_namespace_name = 123,
|
||||
TK_EOF_TOKEN = 121;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
"identifier",
|
||||
"Completion",
|
||||
"LeftParen",
|
||||
"ColonColon",
|
||||
"Tilde",
|
||||
"Star",
|
||||
"operator",
|
||||
"And",
|
||||
"EndOfCompletion",
|
||||
"typename",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"SemiColon",
|
||||
"bool",
|
||||
"char",
|
||||
"double",
|
||||
"extern",
|
||||
"float",
|
||||
"int",
|
||||
"long",
|
||||
"short",
|
||||
"signed",
|
||||
"unsigned",
|
||||
"void",
|
||||
"wchar_t",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"template",
|
||||
"stringlit",
|
||||
"Bang",
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
"false",
|
||||
"reinterpret_cast",
|
||||
"sizeof",
|
||||
"static_cast",
|
||||
"this",
|
||||
"true",
|
||||
"typeid",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"LT",
|
||||
"zero",
|
||||
"virtual",
|
||||
"const",
|
||||
"using",
|
||||
"volatile",
|
||||
"LeftBrace",
|
||||
"auto",
|
||||
"explicit",
|
||||
"friend",
|
||||
"inline",
|
||||
"mutable",
|
||||
"namespace",
|
||||
"register",
|
||||
"static",
|
||||
"throw",
|
||||
"typedef",
|
||||
"LeftBracket",
|
||||
"asm",
|
||||
"class",
|
||||
"GT",
|
||||
"delete",
|
||||
"new",
|
||||
"Comma",
|
||||
"Assign",
|
||||
"enum",
|
||||
"struct",
|
||||
"union",
|
||||
"RightBrace",
|
||||
"Colon",
|
||||
"ERROR_TOKEN",
|
||||
"try",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
"continue",
|
||||
"default",
|
||||
"do",
|
||||
"export",
|
||||
"for",
|
||||
"goto",
|
||||
"if",
|
||||
"return",
|
||||
"switch",
|
||||
"RightParen",
|
||||
"RightShift",
|
||||
"LeftShift",
|
||||
"ArrowStar",
|
||||
"Slash",
|
||||
"Percent",
|
||||
"LE",
|
||||
"GE",
|
||||
"DotDotDot",
|
||||
"DotStar",
|
||||
"EQ",
|
||||
"NE",
|
||||
"Caret",
|
||||
"Or",
|
||||
"AndAnd",
|
||||
"OrOr",
|
||||
"Arrow",
|
||||
"StarAssign",
|
||||
"SlashAssign",
|
||||
"PercentAssign",
|
||||
"PlusAssign",
|
||||
"MinusAssign",
|
||||
"RightShiftAssign",
|
||||
"LeftShiftAssign",
|
||||
"AndAssign",
|
||||
"CaretAssign",
|
||||
"OrAssign",
|
||||
"private",
|
||||
"protected",
|
||||
"public",
|
||||
"Question",
|
||||
"RightBracket",
|
||||
"catch",
|
||||
"Dot",
|
||||
"EOF_TOKEN",
|
||||
"else",
|
||||
"original_namespace_name",
|
||||
"Invalid"
|
||||
};
|
||||
|
||||
public final static boolean isValidForParser = true;
|
||||
}
|
|
@ -213,7 +213,7 @@ public int getKind(int i) {
|
|||
int kind = super.getKind(i);
|
||||
|
||||
// There used to be a special token kind for zero used to parser pure virtual function declarations.
|
||||
// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
|
||||
// But it turned out to be easier to just parse them as an init_ declarator and programaticaly check
|
||||
// for pure virtual, see consumeMemberDeclaratorWithInitializer().
|
||||
|
||||
//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
|
||||
|
@ -1221,14 +1221,14 @@ public CPPParser(String[] mapFrom) { // constructor
|
|||
// Rule 221: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 221: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 222: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 222: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1449,654 +1449,661 @@ public CPPParser(String[] mapFrom) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 312: init_declarator ::= declarator initializer
|
||||
// Rule 311: init_declarator_complete ::= init_declarator
|
||||
//
|
||||
case 312: { action.builder.
|
||||
case 311: { action.builder.
|
||||
consumeInitDeclaratorComplete(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: init_declarator ::= declarator initializer
|
||||
//
|
||||
case 313: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 315: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 314: { action.builder.
|
||||
case 315: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 316: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 317: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 316: { action.builder.
|
||||
case 317: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 320: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 321: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 320: { action.builder.
|
||||
case 321: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 321: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 322: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 321: { action.builder.
|
||||
case 322: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 322: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 323: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 322: { action.builder.
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 323: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 324: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 324: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 324: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 325: array_modifier ::= [ constant_expression ]
|
||||
// Rule 325: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 325: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: array_modifier ::= [ constant_expression ]
|
||||
//
|
||||
case 326: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: array_modifier ::= [ ]
|
||||
// Rule 327: array_modifier ::= [ ]
|
||||
//
|
||||
case 326: { action.builder.
|
||||
case 327: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 327: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 328: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 327: { action.builder.
|
||||
case 328: { action.builder.
|
||||
consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 328: ptr_operator ::= &
|
||||
// Rule 329: ptr_operator ::= &
|
||||
//
|
||||
case 328: { action.builder.
|
||||
case 329: { action.builder.
|
||||
consumeReferenceOperator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 329: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 330: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 329: { action.builder.
|
||||
case 330: { action.builder.
|
||||
consumePointerToMember(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 335: cv_qualifier ::= const
|
||||
//
|
||||
case 335: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 336: cv_qualifier ::= volatile
|
||||
// Rule 336: cv_qualifier ::= const
|
||||
//
|
||||
case 336: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 338: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
// Rule 337: cv_qualifier ::= volatile
|
||||
//
|
||||
case 338: { action.builder.
|
||||
case 337: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 339: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
//
|
||||
case 339: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 339: type_id ::= type_specifier_seq
|
||||
// Rule 340: type_id ::= type_specifier_seq
|
||||
//
|
||||
case 339: { action.builder.
|
||||
case 340: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 340: type_id ::= type_specifier_seq abstract_declarator
|
||||
// Rule 341: type_id ::= type_specifier_seq abstract_declarator
|
||||
//
|
||||
case 340: { action.builder.
|
||||
case 341: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 343: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 344: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 343: { action.builder.
|
||||
case 344: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 344: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
// Rule 345: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
//
|
||||
case 344: { action.builder.
|
||||
case 345: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 348: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 349: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 348: { action.builder.
|
||||
case 349: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 349: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 350: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 349: { action.builder.
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 350: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
// Rule 351: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 351: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 352: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 352: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 353: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 354: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 353: { action.builder.
|
||||
case 354: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 354: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 355: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 356: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 356: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: abstract_declarator_opt ::= $Empty
|
||||
// Rule 356: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
//
|
||||
case 362: { action.builder.
|
||||
case 356: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
// Rule 357: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 357: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 363: abstract_declarator_opt ::= $Empty
|
||||
//
|
||||
case 363: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 364: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
//
|
||||
case 364: { action.builder.
|
||||
consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 364: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 365: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 364: { action.builder.
|
||||
case 365: { action.builder.
|
||||
consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 366: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
// Rule 367: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
//
|
||||
case 366: { action.builder.
|
||||
case 367: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 368: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: parameter_init_declarator ::= = parameter_initializer
|
||||
// Rule 369: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 369: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: parameter_init_declarator ::= = parameter_initializer
|
||||
//
|
||||
case 370: { action.builder.
|
||||
consumeDeclaratorWithInitializer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: parameter_initializer ::= assignment_expression
|
||||
// Rule 371: parameter_initializer ::= assignment_expression
|
||||
//
|
||||
case 370: { action.builder.
|
||||
case 371: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 371: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
// Rule 372: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
//
|
||||
case 371: { action.builder.
|
||||
case 372: { action.builder.
|
||||
consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 372: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
// Rule 373: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
//
|
||||
case 372: { action.builder.
|
||||
case 373: { action.builder.
|
||||
consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 375: initializer ::= ( expression_list )
|
||||
// Rule 376: initializer ::= ( expression_list )
|
||||
//
|
||||
case 375: { action.builder.
|
||||
case 376: { action.builder.
|
||||
consumeInitializerConstructor(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 376: initializer_clause ::= assignment_expression
|
||||
// Rule 377: initializer_clause ::= assignment_expression
|
||||
//
|
||||
case 376: { action.builder.
|
||||
case 377: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 377: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 378: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 379: initializer_clause ::= { <openscope-ast> }
|
||||
// Rule 379: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
//
|
||||
case 379: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 384: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
// Rule 380: initializer_clause ::= { <openscope-ast> }
|
||||
//
|
||||
case 384: { action.builder.
|
||||
case 380: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassSpecifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 386: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 386: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 386: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 387: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
// Rule 387: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 387: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 388: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 388: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 388: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 390: identifier_name_opt ::= $Empty
|
||||
// Rule 389: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 390: { action.builder.
|
||||
case 389: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 391: identifier_name_opt ::= $Empty
|
||||
//
|
||||
case 391: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 394: visibility_label ::= access_specifier_keyword :
|
||||
// Rule 395: visibility_label ::= access_specifier_keyword :
|
||||
//
|
||||
case 394: { action.builder.
|
||||
case 395: { action.builder.
|
||||
consumeVisibilityLabel(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 395: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 395: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 396: member_declaration ::= declaration_specifiers_opt ;
|
||||
// Rule 396: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 396: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 399: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
// Rule 397: member_declaration ::= declaration_specifiers_opt ;
|
||||
//
|
||||
case 399: { action.builder.
|
||||
case 397: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 400: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
//
|
||||
case 400: { action.builder.
|
||||
consumeMemberDeclarationQualifiedId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 403: member_declaration ::= ERROR_TOKEN
|
||||
// Rule 404: member_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 403: { action.builder.
|
||||
case 404: { action.builder.
|
||||
consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 411: member_declarator ::= declarator constant_initializer
|
||||
// Rule 412: member_declarator ::= declarator constant_initializer
|
||||
//
|
||||
case 411: { action.builder.
|
||||
case 412: { action.builder.
|
||||
consumeMemberDeclaratorWithInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 412: member_declarator ::= bit_field_declarator : constant_expression
|
||||
// Rule 413: member_declarator ::= bit_field_declarator : constant_expression
|
||||
//
|
||||
case 412: { action.builder.
|
||||
case 413: { action.builder.
|
||||
consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 413: member_declarator ::= : constant_expression
|
||||
// Rule 414: member_declarator ::= : constant_expression
|
||||
//
|
||||
case 413: { action.builder.
|
||||
case 414: { action.builder.
|
||||
consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 414: bit_field_declarator ::= identifier_name
|
||||
// Rule 415: bit_field_declarator ::= identifier_name
|
||||
//
|
||||
case 414: { action.builder.
|
||||
case 415: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 415: constant_initializer ::= = constant_expression
|
||||
// Rule 416: constant_initializer ::= = constant_expression
|
||||
//
|
||||
case 415: { action.builder.
|
||||
case 416: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 421: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 422: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 421: { action.builder.
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 422: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 423: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 423: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 423: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 424: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 424: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 424: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeBaseSpecifier(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: access_specifier_keyword ::= private
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 426: access_specifier_keyword ::= protected
|
||||
// Rule 426: access_specifier_keyword ::= private
|
||||
//
|
||||
case 426: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 427: access_specifier_keyword ::= public
|
||||
// Rule 427: access_specifier_keyword ::= protected
|
||||
//
|
||||
case 427: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 429: access_specifier_keyword_opt ::= $Empty
|
||||
// Rule 428: access_specifier_keyword ::= public
|
||||
//
|
||||
case 429: { action.builder.
|
||||
case 428: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: access_specifier_keyword_opt ::= $Empty
|
||||
//
|
||||
case 430: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: conversion_function_id_name ::= operator conversion_type_id
|
||||
// Rule 431: conversion_function_id_name ::= operator conversion_type_id
|
||||
//
|
||||
case 430: { action.builder.
|
||||
case 431: { action.builder.
|
||||
consumeConversionName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 431: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
// Rule 432: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
//
|
||||
case 431: { action.builder.
|
||||
case 432: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 432: conversion_type_id ::= type_specifier_seq
|
||||
// Rule 433: conversion_type_id ::= type_specifier_seq
|
||||
//
|
||||
case 432: { action.builder.
|
||||
case 433: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 433: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 434: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 433: { action.builder.
|
||||
case 434: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 439: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
// Rule 440: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
//
|
||||
case 439: { action.builder.
|
||||
case 440: { action.builder.
|
||||
consumeConstructorChainInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 440: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 441: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 440: { action.builder.
|
||||
case 441: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 443: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 444: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 443: { action.builder.
|
||||
case 444: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 444: operator_id_name ::= operator overloadable_operator
|
||||
// Rule 445: operator_id_name ::= operator overloadable_operator
|
||||
//
|
||||
case 444: { action.builder.
|
||||
case 445: { action.builder.
|
||||
consumeOperatorName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 487: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
// Rule 488: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
//
|
||||
case 487: { action.builder.
|
||||
case 488: { action.builder.
|
||||
consumeTemplateDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 488: export_opt ::= export
|
||||
// Rule 489: export_opt ::= export
|
||||
//
|
||||
case 488: { action.builder.
|
||||
case 489: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 489: export_opt ::= $Empty
|
||||
// Rule 490: export_opt ::= $Empty
|
||||
//
|
||||
case 489: { action.builder.
|
||||
case 490: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 494: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 494: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 495: type_parameter ::= class identifier_name_opt = type_id
|
||||
// Rule 495: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 495: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 496: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= typename identifier_name_opt = type_id
|
||||
// Rule 496: type_parameter ::= class identifier_name_opt = type_id
|
||||
//
|
||||
case 497: { action.builder.
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
// Rule 497: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 497: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: type_parameter ::= typename identifier_name_opt = type_id
|
||||
//
|
||||
case 498: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 499: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
//
|
||||
case 499: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 499: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
// Rule 500: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
//
|
||||
case 499: { action.builder.
|
||||
case 500: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 500: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 501: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 500: { action.builder.
|
||||
case 501: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 509: explicit_instantiation ::= template declaration
|
||||
// Rule 510: explicit_instantiation ::= template declaration
|
||||
//
|
||||
case 509: { action.builder.
|
||||
case 510: { action.builder.
|
||||
consumeTemplateExplicitInstantiation(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 510: explicit_specialization ::= template < > declaration
|
||||
// Rule 511: explicit_specialization ::= template < > declaration
|
||||
//
|
||||
case 510: { action.builder.
|
||||
case 511: { action.builder.
|
||||
consumeTemplateExplicitSpecialization(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 511: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
// Rule 512: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
//
|
||||
case 511: { action.builder.
|
||||
case 512: { action.builder.
|
||||
consumeStatementTryBlock(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 514: handler ::= catch ( exception_declaration ) compound_statement
|
||||
// Rule 515: handler ::= catch ( exception_declaration ) compound_statement
|
||||
//
|
||||
case 514: { action.builder.
|
||||
case 515: { action.builder.
|
||||
consumeStatementCatchHandler(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 515: handler ::= catch ( ... ) compound_statement
|
||||
// Rule 516: handler ::= catch ( ... ) compound_statement
|
||||
//
|
||||
case 515: { action.builder.
|
||||
case 516: { action.builder.
|
||||
consumeStatementCatchHandler(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 516: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 517: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 518: exception_declaration ::= type_specifier_seq
|
||||
// Rule 518: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
//
|
||||
case 518: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 519: exception_declaration ::= type_specifier_seq
|
||||
//
|
||||
case 519: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,544 @@
|
|||
package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class CPPRules {
|
||||
static Map fRules = new HashMap();
|
||||
|
||||
static {
|
||||
|
||||
fRules.put(Integer.valueOf(3), "] ::= RightBracket");
|
||||
fRules.put(Integer.valueOf(4), "] ::= EndOfCompletion");
|
||||
fRules.put(Integer.valueOf(5), ") ::= RightParen");
|
||||
fRules.put(Integer.valueOf(6), ") ::= EndOfCompletion");
|
||||
fRules.put(Integer.valueOf(7), "} ::= RightBrace");
|
||||
fRules.put(Integer.valueOf(8), "} ::= EndOfCompletion");
|
||||
fRules.put(Integer.valueOf(9), "; ::= SemiColon");
|
||||
fRules.put(Integer.valueOf(10), "; ::= EndOfCompletion");
|
||||
fRules.put(Integer.valueOf(228), "declaration_specifiers_opt ::=");
|
||||
fRules.put(Integer.valueOf(229), "declaration_specifiers_opt ::= declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(313), "declarator ::= direct_declarator");
|
||||
fRules.put(Integer.valueOf(314), "declarator ::= <openscope-ast> ptr_operator_seq direct_declarator");
|
||||
fRules.put(Integer.valueOf(337), "declarator_id_name ::= qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(338), "declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name");
|
||||
fRules.put(Integer.valueOf(492), "template_parameter ::= type_parameter");
|
||||
fRules.put(Integer.valueOf(1), "<openscope-ast> ::=");
|
||||
fRules.put(Integer.valueOf(311), "init_declarator ::= declarator");
|
||||
fRules.put(Integer.valueOf(312), "init_declarator ::= declarator initializer");
|
||||
fRules.put(Integer.valueOf(307), "init_declarator_list ::= init_declarator");
|
||||
fRules.put(Integer.valueOf(308), "init_declarator_list ::= init_declarator_list Comma init_declarator");
|
||||
fRules.put(Integer.valueOf(309), "init_declarator_list_opt ::= init_declarator_list");
|
||||
fRules.put(Integer.valueOf(310), "init_declarator_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(221), "simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;");
|
||||
fRules.put(Integer.valueOf(304), "asm_definition ::= asm LeftParen stringlit ) ;");
|
||||
fRules.put(Integer.valueOf(299), "namespace_alias_definition ::= namespace identifier_token Assign dcolon_opt nested_name_specifier_opt namespace_name ;");
|
||||
fRules.put(Integer.valueOf(300), "using_declaration ::= using typename_opt dcolon_opt nested_name_specifier_opt unqualified_id_name ;");
|
||||
fRules.put(Integer.valueOf(303), "using_directive ::= using namespace dcolon_opt nested_name_specifier_opt namespace_name ;");
|
||||
fRules.put(Integer.valueOf(212), "block_declaration ::= simple_declaration");
|
||||
fRules.put(Integer.valueOf(213), "block_declaration ::= asm_definition");
|
||||
fRules.put(Integer.valueOf(214), "block_declaration ::= namespace_alias_definition");
|
||||
fRules.put(Integer.valueOf(215), "block_declaration ::= using_declaration");
|
||||
fRules.put(Integer.valueOf(216), "block_declaration ::= using_directive");
|
||||
fRules.put(Integer.valueOf(320), "basic_direct_declarator ::= declarator_id_name");
|
||||
fRules.put(Integer.valueOf(321), "basic_direct_declarator ::= LeftParen declarator )");
|
||||
fRules.put(Integer.valueOf(322), "function_direct_declarator ::= basic_direct_declarator LeftParen <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt");
|
||||
fRules.put(Integer.valueOf(41), "dcolon_opt ::= ColonColon");
|
||||
fRules.put(Integer.valueOf(42), "dcolon_opt ::=");
|
||||
fRules.put(Integer.valueOf(17), "identifier_token ::= identifier");
|
||||
fRules.put(Integer.valueOf(18), "identifier_token ::= Completion");
|
||||
fRules.put(Integer.valueOf(38), "identifier_name ::= identifier_token");
|
||||
fRules.put(Integer.valueOf(501), "template_identifier ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(500), "template_id_name ::= template_identifier LT <openscope-ast> template_argument_list_opt GT");
|
||||
fRules.put(Integer.valueOf(382), "class_name ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(383), "class_name ::= template_id_name");
|
||||
fRules.put(Integer.valueOf(54), "class_or_namespace_name ::= class_name");
|
||||
fRules.put(Integer.valueOf(47), "nested_name_specifier ::= class_or_namespace_name ColonColon nested_name_specifier_with_template");
|
||||
fRules.put(Integer.valueOf(48), "nested_name_specifier ::= class_or_namespace_name ColonColon");
|
||||
fRules.put(Integer.valueOf(327), "ptr_operator ::= Star <openscope-ast> cv_qualifier_seq_opt");
|
||||
fRules.put(Integer.valueOf(328), "ptr_operator ::= And");
|
||||
fRules.put(Integer.valueOf(329), "ptr_operator ::= dcolon_opt nested_name_specifier Star <openscope-ast> cv_qualifier_seq_opt");
|
||||
fRules.put(Integer.valueOf(330), "ptr_operator_seq ::= ptr_operator");
|
||||
fRules.put(Integer.valueOf(331), "ptr_operator_seq ::= ptr_operator_seq ptr_operator");
|
||||
fRules.put(Integer.valueOf(315), "function_declarator ::= function_direct_declarator");
|
||||
fRules.put(Integer.valueOf(316), "function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator");
|
||||
fRules.put(Integer.valueOf(371), "function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body");
|
||||
fRules.put(Integer.valueOf(372), "function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq");
|
||||
fRules.put(Integer.valueOf(488), "export_opt ::= export");
|
||||
fRules.put(Integer.valueOf(489), "export_opt ::=");
|
||||
fRules.put(Integer.valueOf(487), "template_declaration ::= export_opt template LT <openscope-ast> template_parameter_list GT declaration");
|
||||
fRules.put(Integer.valueOf(509), "explicit_instantiation ::= template declaration");
|
||||
fRules.put(Integer.valueOf(510), "explicit_specialization ::= template LT GT declaration");
|
||||
fRules.put(Integer.valueOf(305), "linkage_specification ::= extern stringlit LeftBrace <openscope-ast> declaration_seq_opt }");
|
||||
fRules.put(Integer.valueOf(306), "linkage_specification ::= extern stringlit <openscope-ast> declaration");
|
||||
fRules.put(Integer.valueOf(296), "original_namespace_definition ::= namespace identifier_name LeftBrace <openscope-ast> declaration_seq_opt }");
|
||||
fRules.put(Integer.valueOf(297), "extension_namespace_definition ::= namespace original_namespace_name LeftBrace <openscope-ast> declaration_seq_opt }");
|
||||
fRules.put(Integer.valueOf(294), "named_namespace_definition ::= original_namespace_definition");
|
||||
fRules.put(Integer.valueOf(295), "named_namespace_definition ::= extension_namespace_definition");
|
||||
fRules.put(Integer.valueOf(298), "unnamed_namespace_definition ::= namespace LeftBrace <openscope-ast> declaration_seq_opt }");
|
||||
fRules.put(Integer.valueOf(292), "namespace_definition ::= named_namespace_definition");
|
||||
fRules.put(Integer.valueOf(293), "namespace_definition ::= unnamed_namespace_definition");
|
||||
fRules.put(Integer.valueOf(205), "declaration ::= block_declaration");
|
||||
fRules.put(Integer.valueOf(206), "declaration ::= function_definition");
|
||||
fRules.put(Integer.valueOf(207), "declaration ::= template_declaration");
|
||||
fRules.put(Integer.valueOf(208), "declaration ::= explicit_instantiation");
|
||||
fRules.put(Integer.valueOf(209), "declaration ::= explicit_specialization");
|
||||
fRules.put(Integer.valueOf(210), "declaration ::= linkage_specification");
|
||||
fRules.put(Integer.valueOf(211), "declaration ::= namespace_definition");
|
||||
fRules.put(Integer.valueOf(15), "external_declaration ::= declaration");
|
||||
fRules.put(Integer.valueOf(16), "external_declaration ::= ERROR_TOKEN");
|
||||
fRules.put(Integer.valueOf(13), "external_declaration_list ::= external_declaration");
|
||||
fRules.put(Integer.valueOf(14), "external_declaration_list ::= external_declaration_list external_declaration");
|
||||
fRules.put(Integer.valueOf(11), "translation_unit ::= external_declaration_list");
|
||||
fRules.put(Integer.valueOf(12), "translation_unit ::=");
|
||||
fRules.put(Integer.valueOf(0), "$accept ::= translation_unit");
|
||||
fRules.put(Integer.valueOf(2), "<empty> ::=");
|
||||
fRules.put(Integer.valueOf(19), "literal ::= integer");
|
||||
fRules.put(Integer.valueOf(20), "literal ::= zero");
|
||||
fRules.put(Integer.valueOf(21), "literal ::= floating");
|
||||
fRules.put(Integer.valueOf(22), "literal ::= charconst");
|
||||
fRules.put(Integer.valueOf(23), "literal ::= stringlit");
|
||||
fRules.put(Integer.valueOf(24), "literal ::= true");
|
||||
fRules.put(Integer.valueOf(25), "literal ::= false");
|
||||
fRules.put(Integer.valueOf(26), "literal ::= this");
|
||||
fRules.put(Integer.valueOf(444), "operator_id_name ::= operator overloadable_operator");
|
||||
fRules.put(Integer.valueOf(442), "operator_function_id_name ::= operator_id_name");
|
||||
fRules.put(Integer.valueOf(443), "operator_function_id_name ::= operator_id_name LT <openscope-ast> template_argument_list_opt GT");
|
||||
fRules.put(Integer.valueOf(430), "conversion_function_id_name ::= operator conversion_type_id");
|
||||
fRules.put(Integer.valueOf(33), "unqualified_id_name ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(34), "unqualified_id_name ::= operator_function_id_name");
|
||||
fRules.put(Integer.valueOf(35), "unqualified_id_name ::= conversion_function_id_name");
|
||||
fRules.put(Integer.valueOf(36), "unqualified_id_name ::= template_id_name");
|
||||
fRules.put(Integer.valueOf(37), "unqualified_id_name ::= Tilde class_name");
|
||||
fRules.put(Integer.valueOf(43), "qualified_id_name ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name");
|
||||
fRules.put(Integer.valueOf(44), "qualified_id_name ::= ColonColon identifier_name");
|
||||
fRules.put(Integer.valueOf(45), "qualified_id_name ::= ColonColon operator_function_id_name");
|
||||
fRules.put(Integer.valueOf(46), "qualified_id_name ::= ColonColon template_id_name");
|
||||
fRules.put(Integer.valueOf(31), "qualified_or_unqualified_name ::= unqualified_id_name");
|
||||
fRules.put(Integer.valueOf(32), "qualified_or_unqualified_name ::= qualified_id_name");
|
||||
fRules.put(Integer.valueOf(30), "id_expression ::= qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(27), "primary_expression ::= literal");
|
||||
fRules.put(Integer.valueOf(28), "primary_expression ::= LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(29), "primary_expression ::= id_expression");
|
||||
fRules.put(Integer.valueOf(263), "simple_type_specifier_token ::= char");
|
||||
fRules.put(Integer.valueOf(264), "simple_type_specifier_token ::= wchar_t");
|
||||
fRules.put(Integer.valueOf(265), "simple_type_specifier_token ::= bool");
|
||||
fRules.put(Integer.valueOf(266), "simple_type_specifier_token ::= short");
|
||||
fRules.put(Integer.valueOf(267), "simple_type_specifier_token ::= int");
|
||||
fRules.put(Integer.valueOf(268), "simple_type_specifier_token ::= long");
|
||||
fRules.put(Integer.valueOf(269), "simple_type_specifier_token ::= signed");
|
||||
fRules.put(Integer.valueOf(270), "simple_type_specifier_token ::= unsigned");
|
||||
fRules.put(Integer.valueOf(271), "simple_type_specifier_token ::= float");
|
||||
fRules.put(Integer.valueOf(272), "simple_type_specifier_token ::= double");
|
||||
fRules.put(Integer.valueOf(273), "simple_type_specifier_token ::= void");
|
||||
fRules.put(Integer.valueOf(262), "simple_type_specifier ::= simple_type_specifier_token");
|
||||
fRules.put(Integer.valueOf(55), "postfix_expression ::= primary_expression");
|
||||
fRules.put(Integer.valueOf(56), "postfix_expression ::= postfix_expression LeftBracket expression ]");
|
||||
fRules.put(Integer.valueOf(57), "postfix_expression ::= postfix_expression LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(58), "postfix_expression ::= simple_type_specifier LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(59), "postfix_expression ::= typename dcolon_opt nested_name_specifier <empty> identifier_name LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(60), "postfix_expression ::= typename dcolon_opt nested_name_specifier template_opt template_id_name LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(61), "postfix_expression ::= postfix_expression Dot qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(62), "postfix_expression ::= postfix_expression Arrow qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(63), "postfix_expression ::= postfix_expression Dot template qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(64), "postfix_expression ::= postfix_expression Arrow template qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(65), "postfix_expression ::= postfix_expression Dot pseudo_destructor_name");
|
||||
fRules.put(Integer.valueOf(66), "postfix_expression ::= postfix_expression Arrow pseudo_destructor_name");
|
||||
fRules.put(Integer.valueOf(67), "postfix_expression ::= postfix_expression PlusPlus");
|
||||
fRules.put(Integer.valueOf(68), "postfix_expression ::= postfix_expression MinusMinus");
|
||||
fRules.put(Integer.valueOf(69), "postfix_expression ::= dynamic_cast LT type_id GT LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(70), "postfix_expression ::= static_cast LT type_id GT LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(71), "postfix_expression ::= reinterpret_cast LT type_id GT LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(72), "postfix_expression ::= const_cast LT type_id GT LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(73), "postfix_expression ::= typeid LeftParen expression )");
|
||||
fRules.put(Integer.valueOf(74), "postfix_expression ::= typeid LeftParen type_id )");
|
||||
fRules.put(Integer.valueOf(92), "new_expression ::= dcolon_opt new new_placement_opt new_type_id <openscope-ast> new_array_expressions_opt new_initializer_opt");
|
||||
fRules.put(Integer.valueOf(93), "new_expression ::= dcolon_opt new new_placement_opt LeftParen type_id ) <openscope-ast> new_array_expressions_opt new_initializer_opt");
|
||||
fRules.put(Integer.valueOf(108), "delete_expression ::= dcolon_opt delete cast_expression");
|
||||
fRules.put(Integer.valueOf(109), "delete_expression ::= dcolon_opt delete LeftBracket ] cast_expression");
|
||||
fRules.put(Integer.valueOf(79), "unary_expression ::= postfix_expression");
|
||||
fRules.put(Integer.valueOf(80), "unary_expression ::= new_expression");
|
||||
fRules.put(Integer.valueOf(81), "unary_expression ::= delete_expression");
|
||||
fRules.put(Integer.valueOf(82), "unary_expression ::= PlusPlus cast_expression");
|
||||
fRules.put(Integer.valueOf(83), "unary_expression ::= MinusMinus cast_expression");
|
||||
fRules.put(Integer.valueOf(84), "unary_expression ::= And cast_expression");
|
||||
fRules.put(Integer.valueOf(85), "unary_expression ::= Star cast_expression");
|
||||
fRules.put(Integer.valueOf(86), "unary_expression ::= Plus cast_expression");
|
||||
fRules.put(Integer.valueOf(87), "unary_expression ::= Minus cast_expression");
|
||||
fRules.put(Integer.valueOf(88), "unary_expression ::= Tilde cast_expression");
|
||||
fRules.put(Integer.valueOf(89), "unary_expression ::= Bang cast_expression");
|
||||
fRules.put(Integer.valueOf(90), "unary_expression ::= sizeof unary_expression");
|
||||
fRules.put(Integer.valueOf(91), "unary_expression ::= sizeof LeftParen type_id )");
|
||||
fRules.put(Integer.valueOf(110), "cast_expression ::= unary_expression");
|
||||
fRules.put(Integer.valueOf(111), "cast_expression ::= LeftParen type_id ) cast_expression");
|
||||
fRules.put(Integer.valueOf(112), "pm_expression ::= cast_expression");
|
||||
fRules.put(Integer.valueOf(113), "pm_expression ::= pm_expression DotStar cast_expression");
|
||||
fRules.put(Integer.valueOf(114), "pm_expression ::= pm_expression ArrowStar cast_expression");
|
||||
fRules.put(Integer.valueOf(115), "multiplicative_expression ::= pm_expression");
|
||||
fRules.put(Integer.valueOf(116), "multiplicative_expression ::= multiplicative_expression Star pm_expression");
|
||||
fRules.put(Integer.valueOf(117), "multiplicative_expression ::= multiplicative_expression Slash pm_expression");
|
||||
fRules.put(Integer.valueOf(118), "multiplicative_expression ::= multiplicative_expression Percent pm_expression");
|
||||
fRules.put(Integer.valueOf(119), "additive_expression ::= multiplicative_expression");
|
||||
fRules.put(Integer.valueOf(120), "additive_expression ::= additive_expression Plus multiplicative_expression");
|
||||
fRules.put(Integer.valueOf(121), "additive_expression ::= additive_expression Minus multiplicative_expression");
|
||||
fRules.put(Integer.valueOf(122), "shift_expression ::= additive_expression");
|
||||
fRules.put(Integer.valueOf(123), "shift_expression ::= shift_expression LeftShift additive_expression");
|
||||
fRules.put(Integer.valueOf(124), "shift_expression ::= shift_expression RightShift additive_expression");
|
||||
fRules.put(Integer.valueOf(125), "relational_expression ::= shift_expression");
|
||||
fRules.put(Integer.valueOf(126), "relational_expression ::= relational_expression LT shift_expression");
|
||||
fRules.put(Integer.valueOf(127), "relational_expression ::= relational_expression GT shift_expression");
|
||||
fRules.put(Integer.valueOf(128), "relational_expression ::= relational_expression LE shift_expression");
|
||||
fRules.put(Integer.valueOf(129), "relational_expression ::= relational_expression GE shift_expression");
|
||||
fRules.put(Integer.valueOf(130), "equality_expression ::= relational_expression");
|
||||
fRules.put(Integer.valueOf(131), "equality_expression ::= equality_expression EQ relational_expression");
|
||||
fRules.put(Integer.valueOf(132), "equality_expression ::= equality_expression NE relational_expression");
|
||||
fRules.put(Integer.valueOf(133), "and_expression ::= equality_expression");
|
||||
fRules.put(Integer.valueOf(134), "and_expression ::= and_expression And equality_expression");
|
||||
fRules.put(Integer.valueOf(135), "exclusive_or_expression ::= and_expression");
|
||||
fRules.put(Integer.valueOf(136), "exclusive_or_expression ::= exclusive_or_expression Caret and_expression");
|
||||
fRules.put(Integer.valueOf(137), "inclusive_or_expression ::= exclusive_or_expression");
|
||||
fRules.put(Integer.valueOf(138), "inclusive_or_expression ::= inclusive_or_expression Or exclusive_or_expression");
|
||||
fRules.put(Integer.valueOf(139), "logical_and_expression ::= inclusive_or_expression");
|
||||
fRules.put(Integer.valueOf(140), "logical_and_expression ::= logical_and_expression AndAnd inclusive_or_expression");
|
||||
fRules.put(Integer.valueOf(141), "logical_or_expression ::= logical_and_expression");
|
||||
fRules.put(Integer.valueOf(142), "logical_or_expression ::= logical_or_expression OrOr logical_and_expression");
|
||||
fRules.put(Integer.valueOf(143), "conditional_expression ::= logical_or_expression");
|
||||
fRules.put(Integer.valueOf(144), "conditional_expression ::= logical_or_expression Question expression Colon assignment_expression");
|
||||
fRules.put(Integer.valueOf(145), "throw_expression ::= throw");
|
||||
fRules.put(Integer.valueOf(146), "throw_expression ::= throw assignment_expression");
|
||||
fRules.put(Integer.valueOf(147), "assignment_expression ::= conditional_expression");
|
||||
fRules.put(Integer.valueOf(148), "assignment_expression ::= throw_expression");
|
||||
fRules.put(Integer.valueOf(149), "assignment_expression ::= logical_or_expression Assign assignment_expression");
|
||||
fRules.put(Integer.valueOf(150), "assignment_expression ::= logical_or_expression StarAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(151), "assignment_expression ::= logical_or_expression SlashAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(152), "assignment_expression ::= logical_or_expression PercentAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(153), "assignment_expression ::= logical_or_expression PlusAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(154), "assignment_expression ::= logical_or_expression MinusAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(155), "assignment_expression ::= logical_or_expression RightShiftAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(156), "assignment_expression ::= logical_or_expression LeftShiftAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(157), "assignment_expression ::= logical_or_expression AndAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(158), "assignment_expression ::= logical_or_expression CaretAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(159), "assignment_expression ::= logical_or_expression OrAssign assignment_expression");
|
||||
fRules.put(Integer.valueOf(162), "expression_list_actual ::= assignment_expression");
|
||||
fRules.put(Integer.valueOf(163), "expression_list_actual ::= expression_list_actual Comma assignment_expression");
|
||||
fRules.put(Integer.valueOf(161), "expression_list ::= <openscope-ast> expression_list_actual");
|
||||
fRules.put(Integer.valueOf(160), "expression ::= expression_list");
|
||||
fRules.put(Integer.valueOf(39), "template_opt ::= template");
|
||||
fRules.put(Integer.valueOf(40), "template_opt ::=");
|
||||
fRules.put(Integer.valueOf(51), "class_or_namespace_name_with_template ::= template_opt class_or_namespace_name");
|
||||
fRules.put(Integer.valueOf(49), "nested_name_specifier_with_template ::= class_or_namespace_name_with_template ColonColon nested_name_specifier_with_template");
|
||||
fRules.put(Integer.valueOf(50), "nested_name_specifier_with_template ::= class_or_namespace_name_with_template ColonColon");
|
||||
fRules.put(Integer.valueOf(52), "nested_name_specifier_opt ::= nested_name_specifier");
|
||||
fRules.put(Integer.valueOf(53), "nested_name_specifier_opt ::=");
|
||||
fRules.put(Integer.valueOf(164), "expression_list_opt ::= expression_list");
|
||||
fRules.put(Integer.valueOf(165), "expression_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(274), "type_name ::= class_name");
|
||||
fRules.put(Integer.valueOf(78), "destructor_type_name ::= Tilde type_name");
|
||||
fRules.put(Integer.valueOf(75), "pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt type_name ColonColon destructor_type_name");
|
||||
fRules.put(Integer.valueOf(76), "pseudo_destructor_name ::= dcolon_opt nested_name_specifier template template_id_name ColonColon destructor_type_name");
|
||||
fRules.put(Integer.valueOf(77), "pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt destructor_type_name");
|
||||
fRules.put(Integer.valueOf(254), "storage_class_specifier ::= auto");
|
||||
fRules.put(Integer.valueOf(255), "storage_class_specifier ::= register");
|
||||
fRules.put(Integer.valueOf(256), "storage_class_specifier ::= static");
|
||||
fRules.put(Integer.valueOf(257), "storage_class_specifier ::= extern");
|
||||
fRules.put(Integer.valueOf(258), "storage_class_specifier ::= mutable");
|
||||
fRules.put(Integer.valueOf(259), "function_specifier ::= inline");
|
||||
fRules.put(Integer.valueOf(260), "function_specifier ::= virtual");
|
||||
fRules.put(Integer.valueOf(261), "function_specifier ::= explicit");
|
||||
fRules.put(Integer.valueOf(335), "cv_qualifier ::= const");
|
||||
fRules.put(Integer.valueOf(336), "cv_qualifier ::= volatile");
|
||||
fRules.put(Integer.valueOf(230), "no_type_declaration_specifier ::= storage_class_specifier");
|
||||
fRules.put(Integer.valueOf(231), "no_type_declaration_specifier ::= function_specifier");
|
||||
fRules.put(Integer.valueOf(232), "no_type_declaration_specifier ::= cv_qualifier");
|
||||
fRules.put(Integer.valueOf(233), "no_type_declaration_specifier ::= friend");
|
||||
fRules.put(Integer.valueOf(234), "no_type_declaration_specifier ::= typedef");
|
||||
fRules.put(Integer.valueOf(235), "no_type_declaration_specifiers ::= no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(236), "no_type_declaration_specifiers ::= no_type_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(237), "simple_declaration_specifiers ::= simple_type_specifier");
|
||||
fRules.put(Integer.valueOf(238), "simple_declaration_specifiers ::= no_type_declaration_specifiers simple_type_specifier");
|
||||
fRules.put(Integer.valueOf(239), "simple_declaration_specifiers ::= simple_declaration_specifiers simple_type_specifier");
|
||||
fRules.put(Integer.valueOf(240), "simple_declaration_specifiers ::= simple_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(241), "simple_declaration_specifiers ::= no_type_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(391), "class_keyword ::= class");
|
||||
fRules.put(Integer.valueOf(392), "class_keyword ::= struct");
|
||||
fRules.put(Integer.valueOf(393), "class_keyword ::= union");
|
||||
fRules.put(Integer.valueOf(385), "class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt");
|
||||
fRules.put(Integer.valueOf(386), "class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt");
|
||||
fRules.put(Integer.valueOf(387), "class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt");
|
||||
fRules.put(Integer.valueOf(388), "class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt");
|
||||
fRules.put(Integer.valueOf(384), "class_specifier ::= class_head LeftBrace <openscope-ast> member_declaration_list_opt }");
|
||||
fRules.put(Integer.valueOf(242), "class_declaration_specifiers ::= class_specifier");
|
||||
fRules.put(Integer.valueOf(243), "class_declaration_specifiers ::= no_type_declaration_specifiers class_specifier");
|
||||
fRules.put(Integer.valueOf(244), "class_declaration_specifiers ::= class_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(280), "elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt identifier_name");
|
||||
fRules.put(Integer.valueOf(281), "elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt template_opt template_id_name");
|
||||
fRules.put(Integer.valueOf(282), "elaborated_type_specifier ::= enum dcolon_opt nested_name_specifier_opt identifier_name");
|
||||
fRules.put(Integer.valueOf(245), "elaborated_declaration_specifiers ::= elaborated_type_specifier");
|
||||
fRules.put(Integer.valueOf(246), "elaborated_declaration_specifiers ::= no_type_declaration_specifiers elaborated_type_specifier");
|
||||
fRules.put(Integer.valueOf(247), "elaborated_declaration_specifiers ::= elaborated_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(283), "enum_specifier ::= enum LeftBrace <openscope-ast> enumerator_list_opt }");
|
||||
fRules.put(Integer.valueOf(284), "enum_specifier ::= enum identifier_token LeftBrace <openscope-ast> enumerator_list_opt }");
|
||||
fRules.put(Integer.valueOf(248), "enum_declaration_specifiers ::= enum_specifier");
|
||||
fRules.put(Integer.valueOf(249), "enum_declaration_specifiers ::= no_type_declaration_specifiers enum_specifier");
|
||||
fRules.put(Integer.valueOf(250), "enum_declaration_specifiers ::= enum_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(275), "type_name_specifier ::= type_name");
|
||||
fRules.put(Integer.valueOf(276), "type_name_specifier ::= dcolon_opt nested_name_specifier_opt type_name");
|
||||
fRules.put(Integer.valueOf(277), "type_name_specifier ::= dcolon_opt nested_name_specifier template template_id_name");
|
||||
fRules.put(Integer.valueOf(278), "type_name_specifier ::= typename dcolon_opt nested_name_specifier identifier_name");
|
||||
fRules.put(Integer.valueOf(279), "type_name_specifier ::= typename dcolon_opt nested_name_specifier template_opt template_id_name");
|
||||
fRules.put(Integer.valueOf(251), "type_name_declaration_specifiers ::= type_name_specifier");
|
||||
fRules.put(Integer.valueOf(252), "type_name_declaration_specifiers ::= no_type_declaration_specifiers type_name_specifier");
|
||||
fRules.put(Integer.valueOf(253), "type_name_declaration_specifiers ::= type_name_declaration_specifiers no_type_declaration_specifier");
|
||||
fRules.put(Integer.valueOf(223), "declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(224), "declaration_specifiers ::= <openscope-ast> class_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(225), "declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(226), "declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(227), "declaration_specifiers ::= <openscope-ast> type_name_declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(341), "type_specifier_seq ::= declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(339), "type_id ::= type_specifier_seq");
|
||||
fRules.put(Integer.valueOf(340), "type_id ::= type_specifier_seq abstract_declarator");
|
||||
fRules.put(Integer.valueOf(94), "new_placement_opt ::= LeftParen expression_list )");
|
||||
fRules.put(Integer.valueOf(95), "new_placement_opt ::=");
|
||||
fRules.put(Integer.valueOf(96), "new_type_id ::= type_specifier_seq");
|
||||
fRules.put(Integer.valueOf(97), "new_type_id ::= type_specifier_seq new_declarator");
|
||||
fRules.put(Integer.valueOf(101), "new_array_expressions ::= LeftBracket expression ]");
|
||||
fRules.put(Integer.valueOf(102), "new_array_expressions ::= new_array_expressions LeftBracket constant_expression ]");
|
||||
fRules.put(Integer.valueOf(103), "new_array_expressions_opt ::= new_array_expressions");
|
||||
fRules.put(Integer.valueOf(104), "new_array_expressions_opt ::=");
|
||||
fRules.put(Integer.valueOf(105), "new_initializer ::= LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(106), "new_initializer_opt ::= new_initializer");
|
||||
fRules.put(Integer.valueOf(107), "new_initializer_opt ::=");
|
||||
fRules.put(Integer.valueOf(99), "new_pointer_operators ::= ptr_operator");
|
||||
fRules.put(Integer.valueOf(100), "new_pointer_operators ::= ptr_operator new_pointer_operators");
|
||||
fRules.put(Integer.valueOf(98), "new_declarator ::= <openscope-ast> new_pointer_operators");
|
||||
fRules.put(Integer.valueOf(168), "constant_expression ::= conditional_expression");
|
||||
fRules.put(Integer.valueOf(166), "expression_opt ::= expression");
|
||||
fRules.put(Integer.valueOf(167), "expression_opt ::=");
|
||||
fRules.put(Integer.valueOf(169), "constant_expression_opt ::= constant_expression");
|
||||
fRules.put(Integer.valueOf(170), "constant_expression_opt ::=");
|
||||
fRules.put(Integer.valueOf(180), "labeled_statement ::= identifier Colon statement");
|
||||
fRules.put(Integer.valueOf(181), "labeled_statement ::= case constant_expression Colon");
|
||||
fRules.put(Integer.valueOf(182), "labeled_statement ::= default Colon");
|
||||
fRules.put(Integer.valueOf(183), "expression_statement ::= expression ;");
|
||||
fRules.put(Integer.valueOf(184), "expression_statement ::= ;");
|
||||
fRules.put(Integer.valueOf(185), "compound_statement ::= LeftBrace <openscope-ast> statement_seq }");
|
||||
fRules.put(Integer.valueOf(186), "compound_statement ::= LeftBrace }");
|
||||
fRules.put(Integer.valueOf(189), "selection_statement ::= if LeftParen condition ) statement");
|
||||
fRules.put(Integer.valueOf(190), "selection_statement ::= if LeftParen condition ) statement else statement");
|
||||
fRules.put(Integer.valueOf(191), "selection_statement ::= switch LeftParen condition ) statement");
|
||||
fRules.put(Integer.valueOf(194), "iteration_statement ::= while LeftParen condition ) statement");
|
||||
fRules.put(Integer.valueOf(195), "iteration_statement ::= do statement while LeftParen expression ) ;");
|
||||
fRules.put(Integer.valueOf(196), "iteration_statement ::= for LeftParen expression_opt ; expression_opt ; expression_opt ) statement");
|
||||
fRules.put(Integer.valueOf(197), "iteration_statement ::= for LeftParen simple_declaration_with_declspec expression_opt ; expression_opt ) statement");
|
||||
fRules.put(Integer.valueOf(198), "jump_statement ::= break ;");
|
||||
fRules.put(Integer.valueOf(199), "jump_statement ::= continue ;");
|
||||
fRules.put(Integer.valueOf(200), "jump_statement ::= return expression ;");
|
||||
fRules.put(Integer.valueOf(201), "jump_statement ::= return ;");
|
||||
fRules.put(Integer.valueOf(202), "jump_statement ::= goto identifier_token ;");
|
||||
fRules.put(Integer.valueOf(203), "declaration_statement ::= block_declaration");
|
||||
fRules.put(Integer.valueOf(204), "declaration_statement ::= function_definition");
|
||||
fRules.put(Integer.valueOf(511), "try_block ::= try compound_statement <openscope-ast> handler_seq");
|
||||
fRules.put(Integer.valueOf(171), "statement ::= labeled_statement");
|
||||
fRules.put(Integer.valueOf(172), "statement ::= expression_statement");
|
||||
fRules.put(Integer.valueOf(173), "statement ::= compound_statement");
|
||||
fRules.put(Integer.valueOf(174), "statement ::= selection_statement");
|
||||
fRules.put(Integer.valueOf(175), "statement ::= iteration_statement");
|
||||
fRules.put(Integer.valueOf(176), "statement ::= jump_statement");
|
||||
fRules.put(Integer.valueOf(177), "statement ::= declaration_statement");
|
||||
fRules.put(Integer.valueOf(178), "statement ::= try_block");
|
||||
fRules.put(Integer.valueOf(179), "statement ::= ERROR_TOKEN");
|
||||
fRules.put(Integer.valueOf(187), "statement_seq ::= statement");
|
||||
fRules.put(Integer.valueOf(188), "statement_seq ::= statement_seq statement");
|
||||
fRules.put(Integer.valueOf(192), "condition ::= expression");
|
||||
fRules.put(Integer.valueOf(193), "condition ::= type_specifier_seq declarator Assign assignment_expression");
|
||||
fRules.put(Integer.valueOf(222), "simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;");
|
||||
fRules.put(Integer.valueOf(217), "declaration_seq ::= declaration");
|
||||
fRules.put(Integer.valueOf(218), "declaration_seq ::= declaration_seq declaration");
|
||||
fRules.put(Integer.valueOf(219), "declaration_seq_opt ::= declaration_seq");
|
||||
fRules.put(Integer.valueOf(220), "declaration_seq_opt ::=");
|
||||
fRules.put(Integer.valueOf(289), "enumerator_definition ::= identifier_token");
|
||||
fRules.put(Integer.valueOf(290), "enumerator_definition ::= identifier_token Assign constant_expression");
|
||||
fRules.put(Integer.valueOf(285), "enumerator_list ::= enumerator_definition");
|
||||
fRules.put(Integer.valueOf(286), "enumerator_list ::= enumerator_list Comma enumerator_definition");
|
||||
fRules.put(Integer.valueOf(287), "enumerator_list_opt ::= enumerator_list");
|
||||
fRules.put(Integer.valueOf(288), "enumerator_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(291), "namespace_name ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(301), "typename_opt ::= typename");
|
||||
fRules.put(Integer.valueOf(302), "typename_opt ::=");
|
||||
fRules.put(Integer.valueOf(374), "initializer ::= Assign initializer_clause");
|
||||
fRules.put(Integer.valueOf(375), "initializer ::= LeftParen expression_list )");
|
||||
fRules.put(Integer.valueOf(323), "array_direct_declarator ::= array_direct_declarator array_modifier");
|
||||
fRules.put(Integer.valueOf(324), "array_direct_declarator ::= basic_direct_declarator array_modifier");
|
||||
fRules.put(Integer.valueOf(317), "direct_declarator ::= basic_direct_declarator");
|
||||
fRules.put(Integer.valueOf(318), "direct_declarator ::= function_direct_declarator");
|
||||
fRules.put(Integer.valueOf(319), "direct_declarator ::= array_direct_declarator");
|
||||
fRules.put(Integer.valueOf(363), "parameter_declaration ::= declaration_specifiers parameter_init_declarator");
|
||||
fRules.put(Integer.valueOf(364), "parameter_declaration ::= declaration_specifiers");
|
||||
fRules.put(Integer.valueOf(357), "parameter_declaration_list ::= parameter_declaration");
|
||||
fRules.put(Integer.valueOf(358), "parameter_declaration_list ::= parameter_declaration_list Comma parameter_declaration");
|
||||
fRules.put(Integer.valueOf(359), "parameter_declaration_list_opt ::= parameter_declaration_list");
|
||||
fRules.put(Integer.valueOf(360), "parameter_declaration_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(354), "parameter_declaration_clause ::= parameter_declaration_list_opt DotDotDot");
|
||||
fRules.put(Integer.valueOf(356), "parameter_declaration_clause ::= parameter_declaration_list Comma DotDotDot");
|
||||
fRules.put(Integer.valueOf(355), "parameter_declaration_clause ::= parameter_declaration_list_opt");
|
||||
fRules.put(Integer.valueOf(332), "cv_qualifier_seq ::= cv_qualifier cv_qualifier_seq_opt");
|
||||
fRules.put(Integer.valueOf(333), "cv_qualifier_seq_opt ::= cv_qualifier_seq");
|
||||
fRules.put(Integer.valueOf(334), "cv_qualifier_seq_opt ::=");
|
||||
fRules.put(Integer.valueOf(519), "exception_specification ::= throw LeftParen type_id_list )");
|
||||
fRules.put(Integer.valueOf(520), "exception_specification ::= throw LeftParen )");
|
||||
fRules.put(Integer.valueOf(521), "exception_specification_opt ::= exception_specification");
|
||||
fRules.put(Integer.valueOf(522), "exception_specification_opt ::=");
|
||||
fRules.put(Integer.valueOf(325), "array_modifier ::= LeftBracket constant_expression ]");
|
||||
fRules.put(Integer.valueOf(326), "array_modifier ::= LeftBracket ]");
|
||||
fRules.put(Integer.valueOf(348), "basic_direct_abstract_declarator ::= LeftParen abstract_declarator )");
|
||||
fRules.put(Integer.valueOf(349), "array_direct_abstract_declarator ::= array_modifier");
|
||||
fRules.put(Integer.valueOf(350), "array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier");
|
||||
fRules.put(Integer.valueOf(351), "array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier");
|
||||
fRules.put(Integer.valueOf(352), "function_direct_abstract_declarator ::= basic_direct_abstract_declarator LeftParen <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt");
|
||||
fRules.put(Integer.valueOf(353), "function_direct_abstract_declarator ::= LeftParen <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt");
|
||||
fRules.put(Integer.valueOf(345), "direct_abstract_declarator ::= basic_direct_abstract_declarator");
|
||||
fRules.put(Integer.valueOf(346), "direct_abstract_declarator ::= array_direct_abstract_declarator");
|
||||
fRules.put(Integer.valueOf(347), "direct_abstract_declarator ::= function_direct_abstract_declarator");
|
||||
fRules.put(Integer.valueOf(342), "abstract_declarator ::= direct_abstract_declarator");
|
||||
fRules.put(Integer.valueOf(343), "abstract_declarator ::= <openscope-ast> ptr_operator_seq");
|
||||
fRules.put(Integer.valueOf(344), "abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator");
|
||||
fRules.put(Integer.valueOf(361), "abstract_declarator_opt ::= abstract_declarator");
|
||||
fRules.put(Integer.valueOf(362), "abstract_declarator_opt ::=");
|
||||
fRules.put(Integer.valueOf(365), "parameter_init_declarator ::= declarator");
|
||||
fRules.put(Integer.valueOf(366), "parameter_init_declarator ::= declarator Assign parameter_initializer");
|
||||
fRules.put(Integer.valueOf(367), "parameter_init_declarator ::= abstract_declarator");
|
||||
fRules.put(Integer.valueOf(368), "parameter_init_declarator ::= abstract_declarator Assign parameter_initializer");
|
||||
fRules.put(Integer.valueOf(369), "parameter_init_declarator ::= Assign parameter_initializer");
|
||||
fRules.put(Integer.valueOf(370), "parameter_initializer ::= assignment_expression");
|
||||
fRules.put(Integer.valueOf(434), "ctor_initializer_list ::= Colon mem_initializer_list");
|
||||
fRules.put(Integer.valueOf(435), "ctor_initializer_list_opt ::= ctor_initializer_list");
|
||||
fRules.put(Integer.valueOf(436), "ctor_initializer_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(373), "function_body ::= compound_statement");
|
||||
fRules.put(Integer.valueOf(514), "handler ::= catch LeftParen exception_declaration ) compound_statement");
|
||||
fRules.put(Integer.valueOf(515), "handler ::= catch LeftParen DotDotDot ) compound_statement");
|
||||
fRules.put(Integer.valueOf(512), "handler_seq ::= handler");
|
||||
fRules.put(Integer.valueOf(513), "handler_seq ::= handler_seq handler");
|
||||
fRules.put(Integer.valueOf(376), "initializer_clause ::= assignment_expression");
|
||||
fRules.put(Integer.valueOf(377), "initializer_clause ::= LeftBrace <openscope-ast> initializer_list Comma }");
|
||||
fRules.put(Integer.valueOf(378), "initializer_clause ::= LeftBrace <openscope-ast> initializer_list }");
|
||||
fRules.put(Integer.valueOf(379), "initializer_clause ::= LeftBrace <openscope-ast> }");
|
||||
fRules.put(Integer.valueOf(380), "initializer_list ::= initializer_clause");
|
||||
fRules.put(Integer.valueOf(381), "initializer_list ::= initializer_list Comma initializer_clause");
|
||||
fRules.put(Integer.valueOf(414), "bit_field_declarator ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(410), "member_declarator ::= declarator");
|
||||
fRules.put(Integer.valueOf(411), "member_declarator ::= declarator constant_initializer");
|
||||
fRules.put(Integer.valueOf(412), "member_declarator ::= bit_field_declarator Colon constant_expression");
|
||||
fRules.put(Integer.valueOf(413), "member_declarator ::= Colon constant_expression");
|
||||
fRules.put(Integer.valueOf(408), "member_declarator_list ::= member_declarator");
|
||||
fRules.put(Integer.valueOf(409), "member_declarator_list ::= member_declarator_list Comma member_declarator");
|
||||
fRules.put(Integer.valueOf(425), "access_specifier_keyword ::= private");
|
||||
fRules.put(Integer.valueOf(426), "access_specifier_keyword ::= protected");
|
||||
fRules.put(Integer.valueOf(427), "access_specifier_keyword ::= public");
|
||||
fRules.put(Integer.valueOf(394), "visibility_label ::= access_specifier_keyword Colon");
|
||||
fRules.put(Integer.valueOf(395), "member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;");
|
||||
fRules.put(Integer.valueOf(396), "member_declaration ::= declaration_specifiers_opt ;");
|
||||
fRules.put(Integer.valueOf(397), "member_declaration ::= function_definition ;");
|
||||
fRules.put(Integer.valueOf(398), "member_declaration ::= function_definition");
|
||||
fRules.put(Integer.valueOf(399), "member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;");
|
||||
fRules.put(Integer.valueOf(400), "member_declaration ::= using_declaration");
|
||||
fRules.put(Integer.valueOf(401), "member_declaration ::= template_declaration");
|
||||
fRules.put(Integer.valueOf(402), "member_declaration ::= visibility_label");
|
||||
fRules.put(Integer.valueOf(403), "member_declaration ::= ERROR_TOKEN");
|
||||
fRules.put(Integer.valueOf(404), "member_declaration_list ::= member_declaration");
|
||||
fRules.put(Integer.valueOf(405), "member_declaration_list ::= member_declaration_list member_declaration");
|
||||
fRules.put(Integer.valueOf(406), "member_declaration_list_opt ::= member_declaration_list");
|
||||
fRules.put(Integer.valueOf(407), "member_declaration_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(389), "identifier_name_opt ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(390), "identifier_name_opt ::=");
|
||||
fRules.put(Integer.valueOf(416), "base_clause ::= Colon base_specifier_list");
|
||||
fRules.put(Integer.valueOf(417), "base_clause_opt ::= base_clause");
|
||||
fRules.put(Integer.valueOf(418), "base_clause_opt ::=");
|
||||
fRules.put(Integer.valueOf(415), "constant_initializer ::= Assign constant_expression");
|
||||
fRules.put(Integer.valueOf(421), "base_specifier ::= dcolon_opt nested_name_specifier_opt class_name");
|
||||
fRules.put(Integer.valueOf(422), "base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name");
|
||||
fRules.put(Integer.valueOf(423), "base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name");
|
||||
fRules.put(Integer.valueOf(424), "base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name");
|
||||
fRules.put(Integer.valueOf(419), "base_specifier_list ::= base_specifier");
|
||||
fRules.put(Integer.valueOf(420), "base_specifier_list ::= base_specifier_list Comma base_specifier");
|
||||
fRules.put(Integer.valueOf(428), "access_specifier_keyword_opt ::= access_specifier_keyword");
|
||||
fRules.put(Integer.valueOf(429), "access_specifier_keyword_opt ::=");
|
||||
fRules.put(Integer.valueOf(431), "conversion_type_id ::= type_specifier_seq conversion_declarator");
|
||||
fRules.put(Integer.valueOf(432), "conversion_type_id ::= type_specifier_seq");
|
||||
fRules.put(Integer.valueOf(433), "conversion_declarator ::= <openscope-ast> ptr_operator_seq");
|
||||
fRules.put(Integer.valueOf(440), "mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name");
|
||||
fRules.put(Integer.valueOf(441), "mem_initializer_name ::= identifier_name");
|
||||
fRules.put(Integer.valueOf(439), "mem_initializer ::= mem_initializer_name LeftParen expression_list_opt )");
|
||||
fRules.put(Integer.valueOf(437), "mem_initializer_list ::= mem_initializer");
|
||||
fRules.put(Integer.valueOf(438), "mem_initializer_list ::= mem_initializer Comma mem_initializer_list");
|
||||
fRules.put(Integer.valueOf(506), "template_argument ::= assignment_expression");
|
||||
fRules.put(Integer.valueOf(507), "template_argument ::= type_id");
|
||||
fRules.put(Integer.valueOf(508), "template_argument ::= qualified_or_unqualified_name");
|
||||
fRules.put(Integer.valueOf(502), "template_argument_list ::= template_argument");
|
||||
fRules.put(Integer.valueOf(503), "template_argument_list ::= template_argument_list Comma template_argument");
|
||||
fRules.put(Integer.valueOf(504), "template_argument_list_opt ::= template_argument_list");
|
||||
fRules.put(Integer.valueOf(505), "template_argument_list_opt ::=");
|
||||
fRules.put(Integer.valueOf(445), "overloadable_operator ::= new");
|
||||
fRules.put(Integer.valueOf(446), "overloadable_operator ::= delete");
|
||||
fRules.put(Integer.valueOf(447), "overloadable_operator ::= new LeftBracket ]");
|
||||
fRules.put(Integer.valueOf(448), "overloadable_operator ::= delete LeftBracket ]");
|
||||
fRules.put(Integer.valueOf(449), "overloadable_operator ::= Plus");
|
||||
fRules.put(Integer.valueOf(450), "overloadable_operator ::= Minus");
|
||||
fRules.put(Integer.valueOf(451), "overloadable_operator ::= Star");
|
||||
fRules.put(Integer.valueOf(452), "overloadable_operator ::= Slash");
|
||||
fRules.put(Integer.valueOf(453), "overloadable_operator ::= Percent");
|
||||
fRules.put(Integer.valueOf(454), "overloadable_operator ::= Caret");
|
||||
fRules.put(Integer.valueOf(455), "overloadable_operator ::= And");
|
||||
fRules.put(Integer.valueOf(456), "overloadable_operator ::= Or");
|
||||
fRules.put(Integer.valueOf(457), "overloadable_operator ::= Tilde");
|
||||
fRules.put(Integer.valueOf(458), "overloadable_operator ::= Bang");
|
||||
fRules.put(Integer.valueOf(459), "overloadable_operator ::= Assign");
|
||||
fRules.put(Integer.valueOf(460), "overloadable_operator ::= LT");
|
||||
fRules.put(Integer.valueOf(461), "overloadable_operator ::= GT");
|
||||
fRules.put(Integer.valueOf(462), "overloadable_operator ::= PlusAssign");
|
||||
fRules.put(Integer.valueOf(463), "overloadable_operator ::= MinusAssign");
|
||||
fRules.put(Integer.valueOf(464), "overloadable_operator ::= StarAssign");
|
||||
fRules.put(Integer.valueOf(465), "overloadable_operator ::= SlashAssign");
|
||||
fRules.put(Integer.valueOf(466), "overloadable_operator ::= PercentAssign");
|
||||
fRules.put(Integer.valueOf(467), "overloadable_operator ::= CaretAssign");
|
||||
fRules.put(Integer.valueOf(468), "overloadable_operator ::= AndAssign");
|
||||
fRules.put(Integer.valueOf(469), "overloadable_operator ::= OrAssign");
|
||||
fRules.put(Integer.valueOf(470), "overloadable_operator ::= LeftShift");
|
||||
fRules.put(Integer.valueOf(471), "overloadable_operator ::= RightShift");
|
||||
fRules.put(Integer.valueOf(472), "overloadable_operator ::= RightShiftAssign");
|
||||
fRules.put(Integer.valueOf(473), "overloadable_operator ::= LeftShiftAssign");
|
||||
fRules.put(Integer.valueOf(474), "overloadable_operator ::= EQ");
|
||||
fRules.put(Integer.valueOf(475), "overloadable_operator ::= NE");
|
||||
fRules.put(Integer.valueOf(476), "overloadable_operator ::= LE");
|
||||
fRules.put(Integer.valueOf(477), "overloadable_operator ::= GE");
|
||||
fRules.put(Integer.valueOf(478), "overloadable_operator ::= AndAnd");
|
||||
fRules.put(Integer.valueOf(479), "overloadable_operator ::= OrOr");
|
||||
fRules.put(Integer.valueOf(480), "overloadable_operator ::= PlusPlus");
|
||||
fRules.put(Integer.valueOf(481), "overloadable_operator ::= MinusMinus");
|
||||
fRules.put(Integer.valueOf(482), "overloadable_operator ::= Comma");
|
||||
fRules.put(Integer.valueOf(483), "overloadable_operator ::= ArrowStar");
|
||||
fRules.put(Integer.valueOf(484), "overloadable_operator ::= Arrow");
|
||||
fRules.put(Integer.valueOf(485), "overloadable_operator ::= LeftParen )");
|
||||
fRules.put(Integer.valueOf(486), "overloadable_operator ::= LeftBracket ]");
|
||||
fRules.put(Integer.valueOf(493), "template_parameter ::= parameter_declaration");
|
||||
fRules.put(Integer.valueOf(490), "template_parameter_list ::= template_parameter");
|
||||
fRules.put(Integer.valueOf(491), "template_parameter_list ::= template_parameter_list Comma template_parameter");
|
||||
fRules.put(Integer.valueOf(494), "type_parameter ::= class identifier_name_opt");
|
||||
fRules.put(Integer.valueOf(495), "type_parameter ::= class identifier_name_opt Assign type_id");
|
||||
fRules.put(Integer.valueOf(496), "type_parameter ::= typename identifier_name_opt");
|
||||
fRules.put(Integer.valueOf(497), "type_parameter ::= typename identifier_name_opt Assign type_id");
|
||||
fRules.put(Integer.valueOf(498), "type_parameter ::= template LT <openscope-ast> template_parameter_list GT class identifier_name_opt");
|
||||
fRules.put(Integer.valueOf(499), "type_parameter ::= template LT <openscope-ast> template_parameter_list GT class identifier_name_opt Assign id_expression");
|
||||
fRules.put(Integer.valueOf(516), "exception_declaration ::= type_specifier_seq <openscope-ast> declarator");
|
||||
fRules.put(Integer.valueOf(517), "exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator");
|
||||
fRules.put(Integer.valueOf(518), "exception_declaration ::= type_specifier_seq");
|
||||
fRules.put(Integer.valueOf(523), "type_id_list ::= type_id");
|
||||
fRules.put(Integer.valueOf(524), "type_id_list ::= type_id_list Comma type_id");
|
||||
|
||||
}
|
||||
|
||||
public static String lookup(int ruleNumber) {
|
||||
return (String) fRules.get(Integer.valueOf(ruleNumber));
|
||||
}
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ public int getKind(int i) {
|
|||
int kind = super.getKind(i);
|
||||
|
||||
// There used to be a special token kind for zero used to parser pure virtual function declarations.
|
||||
// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
|
||||
// But it turned out to be easier to just parse them as an init_ declarator and programaticaly check
|
||||
// for pure virtual, see consumeMemberDeclaratorWithInitializer().
|
||||
|
||||
//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
|
||||
|
@ -1207,14 +1207,14 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
|
|||
// Rule 219: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 219: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 220: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
|
||||
//
|
||||
case 220: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1435,660 +1435,667 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 310: init_declarator ::= declarator initializer
|
||||
// Rule 309: init_declarator_complete ::= init_declarator
|
||||
//
|
||||
case 310: { action.builder.
|
||||
case 309: { action.builder.
|
||||
consumeInitDeclaratorComplete(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: init_declarator ::= declarator initializer
|
||||
//
|
||||
case 311: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 313: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 312: { action.builder.
|
||||
case 313: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
// Rule 315: function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
|
||||
//
|
||||
case 314: { action.builder.
|
||||
case 315: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 318: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 319: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 318: { action.builder.
|
||||
case 319: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 319: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 320: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 319: { action.builder.
|
||||
case 320: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 320: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 321: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 320: { action.builder.
|
||||
case 321: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 321: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 321: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 322: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 322: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 322: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 323: array_modifier ::= [ constant_expression ]
|
||||
// Rule 323: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 323: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 324: array_modifier ::= [ constant_expression ]
|
||||
//
|
||||
case 324: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 324: array_modifier ::= [ ]
|
||||
// Rule 325: array_modifier ::= [ ]
|
||||
//
|
||||
case 324: { action.builder.
|
||||
case 325: { action.builder.
|
||||
consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 325: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 326: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 325: { action.builder.
|
||||
case 326: { action.builder.
|
||||
consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 326: ptr_operator ::= &
|
||||
// Rule 327: ptr_operator ::= &
|
||||
//
|
||||
case 326: { action.builder.
|
||||
case 327: { action.builder.
|
||||
consumeReferenceOperator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 327: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
// Rule 328: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
|
||||
//
|
||||
case 327: { action.builder.
|
||||
case 328: { action.builder.
|
||||
consumePointerToMember(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 333: cv_qualifier ::= const
|
||||
//
|
||||
case 333: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 334: cv_qualifier ::= volatile
|
||||
// Rule 334: cv_qualifier ::= const
|
||||
//
|
||||
case 334: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 336: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
// Rule 335: cv_qualifier ::= volatile
|
||||
//
|
||||
case 336: { action.builder.
|
||||
case 335: { action.builder.
|
||||
consumeDeclSpecToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 337: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
|
||||
//
|
||||
case 337: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 337: type_id ::= type_specifier_seq
|
||||
// Rule 338: type_id ::= type_specifier_seq
|
||||
//
|
||||
case 337: { action.builder.
|
||||
case 338: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 338: type_id ::= type_specifier_seq abstract_declarator
|
||||
// Rule 339: type_id ::= type_specifier_seq abstract_declarator
|
||||
//
|
||||
case 338: { action.builder.
|
||||
case 339: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 341: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 342: abstract_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 341: { action.builder.
|
||||
case 342: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 342: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
// Rule 343: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
|
||||
//
|
||||
case 342: { action.builder.
|
||||
case 343: { action.builder.
|
||||
consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 346: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 347: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 346: { action.builder.
|
||||
case 347: { action.builder.
|
||||
consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 347: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 348: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 347: { action.builder.
|
||||
case 348: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 348: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 348: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 349: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
// Rule 349: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 349: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 350: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 350: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 350: { action.builder.
|
||||
consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 351: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
// Rule 352: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
|
||||
//
|
||||
case 351: { action.builder.
|
||||
case 352: { action.builder.
|
||||
consumeDirectDeclaratorFunctionDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 352: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
// Rule 353: parameter_declaration_clause ::= parameter_declaration_list_opt ...
|
||||
//
|
||||
case 353: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 354: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 360: abstract_declarator_opt ::= $Empty
|
||||
// Rule 354: parameter_declaration_clause ::= parameter_declaration_list_opt
|
||||
//
|
||||
case 360: { action.builder.
|
||||
case 354: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 361: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
// Rule 355: parameter_declaration_clause ::= parameter_declaration_list , ...
|
||||
//
|
||||
case 355: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 361: abstract_declarator_opt ::= $Empty
|
||||
//
|
||||
case 361: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: parameter_declaration ::= declaration_specifiers parameter_init_declarator
|
||||
//
|
||||
case 362: { action.builder.
|
||||
consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 362: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 363: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 362: { action.builder.
|
||||
case 363: { action.builder.
|
||||
consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 364: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
// Rule 365: parameter_init_declarator ::= declarator = parameter_initializer
|
||||
//
|
||||
case 364: { action.builder.
|
||||
case 365: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 366: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 366: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 367: parameter_init_declarator ::= = parameter_initializer
|
||||
// Rule 367: parameter_init_declarator ::= abstract_declarator = parameter_initializer
|
||||
//
|
||||
case 367: { action.builder.
|
||||
consumeDeclaratorWithInitializer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: parameter_init_declarator ::= = parameter_initializer
|
||||
//
|
||||
case 368: { action.builder.
|
||||
consumeDeclaratorWithInitializer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: parameter_initializer ::= assignment_expression
|
||||
// Rule 369: parameter_initializer ::= assignment_expression
|
||||
//
|
||||
case 368: { action.builder.
|
||||
case 369: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
// Rule 370: function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
|
||||
//
|
||||
case 369: { action.builder.
|
||||
case 370: { action.builder.
|
||||
consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
// Rule 371: function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
|
||||
//
|
||||
case 370: { action.builder.
|
||||
case 371: { action.builder.
|
||||
consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 373: initializer ::= ( expression_list )
|
||||
// Rule 374: initializer ::= ( expression_list )
|
||||
//
|
||||
case 373: { action.builder.
|
||||
case 374: { action.builder.
|
||||
consumeInitializerConstructor(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 374: initializer_clause ::= assignment_expression
|
||||
// Rule 375: initializer_clause ::= assignment_expression
|
||||
//
|
||||
case 374: { action.builder.
|
||||
case 375: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 375: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 375: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 376: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
// Rule 376: initializer_clause ::= { <openscope-ast> initializer_list , }
|
||||
//
|
||||
case 376: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> }
|
||||
// Rule 377: initializer_clause ::= { <openscope-ast> initializer_list }
|
||||
//
|
||||
case 377: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 382: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
// Rule 378: initializer_clause ::= { <openscope-ast> }
|
||||
//
|
||||
case 382: { action.builder.
|
||||
case 378: { action.builder.
|
||||
consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 383: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
|
||||
//
|
||||
case 383: { action.builder.
|
||||
consumeClassSpecifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 383: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 383: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 384: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 384: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 384: { action.builder.
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 385: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
// Rule 385: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 385: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
consumeClassHead(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 386: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
// Rule 386: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 386: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 388: identifier_name_opt ::= $Empty
|
||||
// Rule 387: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
|
||||
//
|
||||
case 388: { action.builder.
|
||||
case 387: { action.builder.
|
||||
consumeClassHead(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 389: identifier_name_opt ::= $Empty
|
||||
//
|
||||
case 389: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 392: visibility_label ::= access_specifier_keyword :
|
||||
// Rule 393: visibility_label ::= access_specifier_keyword :
|
||||
//
|
||||
case 392: { action.builder.
|
||||
case 393: { action.builder.
|
||||
consumeVisibilityLabel(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 393: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 393: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 394: member_declaration ::= declaration_specifiers_opt ;
|
||||
// Rule 394: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
|
||||
//
|
||||
case 394: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 397: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
// Rule 395: member_declaration ::= declaration_specifiers_opt ;
|
||||
//
|
||||
case 397: { action.builder.
|
||||
case 395: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 398: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
|
||||
//
|
||||
case 398: { action.builder.
|
||||
consumeMemberDeclarationQualifiedId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 401: member_declaration ::= ERROR_TOKEN
|
||||
// Rule 402: member_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 401: { action.builder.
|
||||
case 402: { action.builder.
|
||||
consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 409: member_declarator ::= declarator constant_initializer
|
||||
// Rule 410: member_declarator ::= declarator constant_initializer
|
||||
//
|
||||
case 409: { action.builder.
|
||||
case 410: { action.builder.
|
||||
consumeMemberDeclaratorWithInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 410: member_declarator ::= bit_field_declarator : constant_expression
|
||||
// Rule 411: member_declarator ::= bit_field_declarator : constant_expression
|
||||
//
|
||||
case 410: { action.builder.
|
||||
case 411: { action.builder.
|
||||
consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 411: member_declarator ::= : constant_expression
|
||||
// Rule 412: member_declarator ::= : constant_expression
|
||||
//
|
||||
case 411: { action.builder.
|
||||
case 412: { action.builder.
|
||||
consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 412: bit_field_declarator ::= identifier_name
|
||||
// Rule 413: bit_field_declarator ::= identifier_name
|
||||
//
|
||||
case 412: { action.builder.
|
||||
case 413: { action.builder.
|
||||
consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 413: constant_initializer ::= = constant_expression
|
||||
// Rule 414: constant_initializer ::= = constant_expression
|
||||
//
|
||||
case 413: { action.builder.
|
||||
case 414: { action.builder.
|
||||
consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 419: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 420: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 419: { action.builder.
|
||||
case 420: { action.builder.
|
||||
consumeBaseSpecifier(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 420: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 420: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 421: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 421: base_specifier ::= virtual access_specifier_keyword_opt dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 421: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 422: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 422: base_specifier ::= access_specifier_keyword virtual dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 422: { action.builder.
|
||||
consumeBaseSpecifier(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 423: base_specifier ::= access_specifier_keyword dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 423: { action.builder.
|
||||
consumeBaseSpecifier(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 423: access_specifier_keyword ::= private
|
||||
//
|
||||
case 423: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 424: access_specifier_keyword ::= protected
|
||||
// Rule 424: access_specifier_keyword ::= private
|
||||
//
|
||||
case 424: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 425: access_specifier_keyword ::= public
|
||||
// Rule 425: access_specifier_keyword ::= protected
|
||||
//
|
||||
case 425: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 427: access_specifier_keyword_opt ::= $Empty
|
||||
// Rule 426: access_specifier_keyword ::= public
|
||||
//
|
||||
case 427: { action.builder.
|
||||
case 426: { action.builder.
|
||||
consumeAccessKeywordToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 428: access_specifier_keyword_opt ::= $Empty
|
||||
//
|
||||
case 428: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 428: conversion_function_id_name ::= operator conversion_type_id
|
||||
// Rule 429: conversion_function_id_name ::= operator conversion_type_id
|
||||
//
|
||||
case 428: { action.builder.
|
||||
case 429: { action.builder.
|
||||
consumeConversionName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 429: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
// Rule 430: conversion_type_id ::= type_specifier_seq conversion_declarator
|
||||
//
|
||||
case 429: { action.builder.
|
||||
case 430: { action.builder.
|
||||
consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 430: conversion_type_id ::= type_specifier_seq
|
||||
// Rule 431: conversion_type_id ::= type_specifier_seq
|
||||
//
|
||||
case 430: { action.builder.
|
||||
case 431: { action.builder.
|
||||
consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 431: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
// Rule 432: conversion_declarator ::= <openscope-ast> ptr_operator_seq
|
||||
//
|
||||
case 431: { action.builder.
|
||||
case 432: { action.builder.
|
||||
consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 437: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
// Rule 438: mem_initializer ::= mem_initializer_name ( expression_list_opt )
|
||||
//
|
||||
case 437: { action.builder.
|
||||
case 438: { action.builder.
|
||||
consumeConstructorChainInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 438: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
// Rule 439: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
|
||||
//
|
||||
case 438: { action.builder.
|
||||
case 439: { action.builder.
|
||||
consumeQualifiedId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 441: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 442: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 441: { action.builder.
|
||||
case 442: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 442: operator_id_name ::= operator overloadable_operator
|
||||
// Rule 443: operator_id_name ::= operator overloadable_operator
|
||||
//
|
||||
case 442: { action.builder.
|
||||
case 443: { action.builder.
|
||||
consumeOperatorName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 485: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
// Rule 486: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
|
||||
//
|
||||
case 485: { action.builder.
|
||||
case 486: { action.builder.
|
||||
consumeTemplateDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 486: export_opt ::= export
|
||||
// Rule 487: export_opt ::= export
|
||||
//
|
||||
case 486: { action.builder.
|
||||
case 487: { action.builder.
|
||||
consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 487: export_opt ::= $Empty
|
||||
// Rule 488: export_opt ::= $Empty
|
||||
//
|
||||
case 487: { action.builder.
|
||||
case 488: { action.builder.
|
||||
consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 492: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 492: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 493: type_parameter ::= class identifier_name_opt = type_id
|
||||
// Rule 493: type_parameter ::= class identifier_name_opt
|
||||
//
|
||||
case 493: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 494: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 494: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 495: type_parameter ::= typename identifier_name_opt = type_id
|
||||
// Rule 494: type_parameter ::= class identifier_name_opt = type_id
|
||||
//
|
||||
case 495: { action.builder.
|
||||
case 494: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 496: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
// Rule 495: type_parameter ::= typename identifier_name_opt
|
||||
//
|
||||
case 495: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 496: type_parameter ::= typename identifier_name_opt = type_id
|
||||
//
|
||||
case 496: { action.builder.
|
||||
consumeSimpleTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
|
||||
//
|
||||
case 497: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 497: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
// Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
|
||||
//
|
||||
case 497: { action.builder.
|
||||
case 498: { action.builder.
|
||||
consumeTemplatedTypeTemplateParameter(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 498: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
// Rule 499: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
|
||||
//
|
||||
case 498: { action.builder.
|
||||
case 499: { action.builder.
|
||||
consumeTemplateId(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 507: explicit_instantiation ::= template declaration
|
||||
// Rule 508: explicit_instantiation ::= template declaration
|
||||
//
|
||||
case 507: { action.builder.
|
||||
case 508: { action.builder.
|
||||
consumeTemplateExplicitInstantiation(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 508: explicit_specialization ::= template < > declaration
|
||||
// Rule 509: explicit_specialization ::= template < > declaration
|
||||
//
|
||||
case 508: { action.builder.
|
||||
case 509: { action.builder.
|
||||
consumeTemplateExplicitSpecialization(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 509: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
// Rule 510: try_block ::= try compound_statement <openscope-ast> handler_seq
|
||||
//
|
||||
case 509: { action.builder.
|
||||
case 510: { action.builder.
|
||||
consumeStatementTryBlock(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 512: handler ::= catch ( exception_declaration ) compound_statement
|
||||
// Rule 513: handler ::= catch ( exception_declaration ) compound_statement
|
||||
//
|
||||
case 512: { action.builder.
|
||||
case 513: { action.builder.
|
||||
consumeStatementCatchHandler(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 513: handler ::= catch ( ... ) compound_statement
|
||||
// Rule 514: handler ::= catch ( ... ) compound_statement
|
||||
//
|
||||
case 513: { action.builder.
|
||||
case 514: { action.builder.
|
||||
consumeStatementCatchHandler(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 514: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 514: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 515: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
// Rule 515: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
|
||||
//
|
||||
case 515: { action.builder.
|
||||
consumeDeclarationSimple(true); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq
|
||||
// Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
|
||||
//
|
||||
case 516: { action.builder.
|
||||
consumeDeclarationSimple(false); break;
|
||||
consumeDeclarationSimple(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 524: no_sizeof_type_name_start ::= ERROR_TOKEN
|
||||
// Rule 517: exception_declaration ::= type_specifier_seq
|
||||
//
|
||||
case 524: { action.builder.
|
||||
case 517: { action.builder.
|
||||
consumeDeclarationSimple(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 525: no_sizeof_type_name_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 525: { action.builder.
|
||||
consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue