diff options
author | Mike Kucera | 2008-02-13 20:17:29 +0000 |
---|---|---|
committer | Mike Kucera | 2008-02-13 20:17:29 +0000 |
commit | 8ece714199b5faaece6d699359628be84309d559 (patch) | |
tree | a5a0d27a8ff04be22e2fb46c6c5a332c9c72d949 /lrparser | |
parent | 4117aeccbdd34fbe4afe53a53fc2f5a530ade63d (diff) | |
download | org.eclipse.cdt-8ece714199b5faaece6d699359628be84309d559.tar.gz org.eclipse.cdt-8ece714199b5faaece6d699359628be84309d559.tar.xz org.eclipse.cdt-8ece714199b5faaece6d699359628be84309d559.zip |
fixed bug, builder was creating qualified name nodes when unqualified name required
Diffstat (limited to 'lrparser')
10 files changed, 2056 insertions, 2952 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java index 47cf41b902b..d2c40f058f6 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java +++ b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java @@ -15,6 +15,8 @@ import junit.framework.AssertionFailedError; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage; import org.eclipse.cdt.core.dom.lrparser.c99.C99Language; +import org.eclipse.cdt.core.dom.lrparser.cpp.ISOCPPLanguage; +import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.parser.ParserLanguage; import org.eclipse.cdt.core.parser.tests.ast2.AST2CSpecTest; import org.eclipse.cdt.internal.core.parser.ParserException; @@ -25,25 +27,25 @@ public class C99SpecTests extends AST2CSpecTest { public C99SpecTests(String name) { super(name); } - /** - * Only parses it as C actually - * @throws ParserException - */ + @Override protected void parseCandCPP( String code, boolean checkBindings, int expectedProblemBindings ) throws ParserException { - parse(code, ParserLanguage.C, checkBindings, expectedProblemBindings); + //parse(code, ParserLanguage.C, checkBindings, expectedProblemBindings); parse(code, ParserLanguage.CPP, checkBindings, expectedProblemBindings); } + @Override protected IASTTranslationUnit parse( String code, ParserLanguage lang, boolean checkBindings, int expectedProblemBindings ) throws ParserException { - if(lang == ParserLanguage.C) - return ParseHelper.parse(code, getLanguage(), true, checkBindings, expectedProblemBindings ); - else - return super.parse(code, lang, checkBindings, expectedProblemBindings); + ILanguage language = lang.isCPP() ? getCPPLanguage() : getCLanguage(); + return ParseHelper.parse(code, language, true, checkBindings, expectedProblemBindings ); } - protected BaseExtensibleLanguage getLanguage() { + protected BaseExtensibleLanguage getCLanguage() { return C99Language.getDefault(); } + + protected BaseExtensibleLanguage getCPPLanguage() { + return ISOCPPLanguage.getDefault(); + } //Assignment statements cannot exists outside of a function body @Override diff --git a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParseHelper.java b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParseHelper.java index 2c4d2e89e33..f294f96f730 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParseHelper.java +++ b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParseHelper.java @@ -19,9 +19,10 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IProblemBinding; -import org.eclipse.cdt.core.dom.ast.c.CASTVisitor; +import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor; import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage; import org.eclipse.cdt.core.model.AbstractLanguage; +import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.parser.CodeReader; import org.eclipse.cdt.core.parser.IScannerInfo; import org.eclipse.cdt.core.parser.ParserUtil; @@ -38,42 +39,48 @@ public class ParseHelper { static int testsRun = 0; - private static class C99NameResolver extends ASTVisitor { + private static class NameResolver extends CPPASTVisitor { { shouldVisitNames = true; } - public int numProblemBindings=0; - public int numNullBindings=0; + public int numProblemBindings = 0; + public int numNullBindings = 0; + @Override public int visit( IASTName name ){ + System.out.println("Visit Name: '" + name.toString() + "'"); IBinding binding = name.resolveBinding(); - if (binding instanceof IProblemBinding) + if (binding instanceof IProblemBinding) { numProblemBindings++; - if (binding == null) + System.out.println("Problem Binding: " + name); + } + if (binding == null) { numNullBindings++; + System.out.println("Null Binding: " + name); + } return PROCESS_CONTINUE; } } - public static IASTTranslationUnit parse(char[] code, BaseExtensibleLanguage lang, boolean expectNoProblems, boolean checkBindings, int expectedProblemBindings) { + public static IASTTranslationUnit parse(char[] code, ILanguage lang, boolean expectNoProblems, boolean checkBindings, int expectedProblemBindings) { CodeReader codeReader = new CodeReader(code); return parse(codeReader, lang, new ScannerInfo(), null, expectNoProblems, checkBindings, expectedProblemBindings); } - public static IASTTranslationUnit parse(String code, BaseExtensibleLanguage lang, boolean expectNoProblems, boolean checkBindings, int expectedProblemBindings) { + public static IASTTranslationUnit parse(String code, ILanguage lang, boolean expectNoProblems, boolean checkBindings, int expectedProblemBindings) { return parse(code.toCharArray(), lang, expectNoProblems, checkBindings, expectedProblemBindings); } - public static IASTTranslationUnit parse(String code, BaseExtensibleLanguage lang, boolean expectNoProblems) { + public static IASTTranslationUnit parse(String code, ILanguage lang, boolean expectNoProblems) { return parse(code, lang, expectNoProblems, false, 0); } - public static IASTTranslationUnit parse(CodeReader codeReader, BaseExtensibleLanguage language, IScannerInfo scanInfo, + public static IASTTranslationUnit parse(CodeReader codeReader, ILanguage language, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, boolean expectNoProblems, boolean checkBindings, int expectedProblemBindings) { testsRun++; @@ -100,7 +107,7 @@ public class ParseHelper { // resolve all bindings if (checkBindings) { - C99NameResolver res = new C99NameResolver(); + NameResolver res = new NameResolver(); tu.accept( res ); if (res.numProblemBindings != expectedProblemBindings ) throw new AssertionFailedError("Expected " + expectedProblemBindings + " problem(s), encountered " + res.numProblemBindings ); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParserTestSuiteConvenient.java b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParserTestSuiteConvenient.java new file mode 100644 index 00000000000..e7eda34d1b3 --- /dev/null +++ b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/ParserTestSuiteConvenient.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * 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 + *******************************************************************************/ +package org.eclipse.cdt.core.lrparser.tests.c99; + +import junit.framework.Test; +import junit.framework.TestSuite; + +public class ParserTestSuiteConvenient extends TestSuite { + + // this test suite is just for my convenience + + public static Test suite() { + TestSuite suite = new TestSuite(); + +// suite.addTestSuite(C99Tests.class); // has some tests that do fail + +// suite.addTestSuite(C99SpecTests.class); // a couple of failures + + suite.addTest(new C99SpecTests("test6_7_2_3s10")); + + +// suite.addTestSuite(C99KnRTests.class); // mostly fail due to ambiguities +// +// // The majority of the content assist test are in the ui tests plugin +// suite.addTestSuite(C99CompletionBasicTest.class); +// // this one still has a lot of failing tests though +// suite.addTestSuite(C99SelectionParseTest.class); +// +// suite.addTestSuite(C99DOMLocationInclusionTests.class); +// suite.addTestSuite(C99DOMLocationTests.class); +// suite.addTestSuite(C99DOMLocationMacroTests.class); +// suite.addTestSuite(C99DOMPreprocessorInformationTest.class); +// suite.addTestSuite(C99CommentTests.class); +// suite.addTestSuite(C99DigraphTrigraphTests.class); +// suite.addTestSuite(C99GCCTests.class); +// suite.addTestSuite(C99UtilOldTests.class); +// suite.addTestSuite(C99UtilTests.class); +// suite.addTestSuite(C99CompleteParser2Tests.class); +// suite.addTestSuite(C99TaskParserTest.class); + + + return suite; + } +} diff --git a/lrparser/org.eclipse.cdt.core.lrparser/META-INF/MANIFEST.MF b/lrparser/org.eclipse.cdt.core.lrparser/META-INF/MANIFEST.MF index 8d4148969a6..ce3c89ec043 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/META-INF/MANIFEST.MF +++ b/lrparser/org.eclipse.cdt.core.lrparser/META-INF/MANIFEST.MF @@ -11,6 +11,7 @@ Export-Package: org.eclipse.cdt.core.dom.lrparser, org.eclipse.cdt.core.dom.lrparser.action, org.eclipse.cdt.core.dom.lrparser.action.c99, org.eclipse.cdt.core.dom.lrparser.c99, + org.eclipse.cdt.core.dom.lrparser.cpp, org.eclipse.cdt.internal.core.dom.lrparser.c99;x-internal:=true, org.eclipse.cdt.internal.core.dom.lrparser.c99.bindings Bundle-Localization: plugin diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g index 61080a90ac8..c306206738f 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g +++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPParser.g @@ -11,7 +11,7 @@ %options la=2 %options package=org.eclipse.cdt.internal.core.dom.lrparser.cpp -%options template=TrialUndoParserTemplate.g +%options template=btParserTemplateD.g @@ -148,7 +148,7 @@ $End $Define -- These macros allow the template and header code to be customized by an extending parser. $ast_class /.Object./ - $additional_interfaces /. ./ + $additional_interfaces /. , IParserActionTokenProvider, IParser ./ $build_action_class /. CPPBuildASTParserAction ./ $resolve_action_class /. C99TypedefTrackerParserAction ./ @@ -176,9 +176,9 @@ $Define $builder /. action.builder./ -- comment out when using trial/undo - --$Action /. $BeginAction ./ - --$BeginFinal /. ./ - --$EndFinal /. ./ + $Action /. $BeginAction ./ + $BeginFinal /. ./ + $EndFinal /. ./ $End @@ -188,8 +188,8 @@ $Headers private $action_class action; // uncomment to use with backtracking parser - //public $action_type() { // constructor - //} + public $action_type() { // constructor + } private void initActions(IASTTranslationUnit tu) { // binding resolution actions need access to IASTName nodes, temporary @@ -199,7 +199,7 @@ $Headers //action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols); // comment this line to use with backtracking parser - setParserAction(action); + //setParserAction(action); } @@ -231,7 +231,7 @@ $Headers action = null; // Comment this line to use with backtracking parser - parserAction = null; + //parserAction = null; return compNode; } @@ -258,9 +258,9 @@ $Headers // uncomment this method to use with backtracking parser - //public List getRuleTokens() { - // return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1)); - //} + public List getRuleTokens() { + return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1)); + } ./ diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java index b7bb10a6457..9b6261149c3 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java +++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java @@ -103,15 +103,13 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements System.out.println(); System.out.println("********************************************************"); + System.out.println("Parsing"); + System.out.println("Options: " + options); System.out.println("GPP AST:"); DebugUtil.printAST(gtu); System.out.println(); - - - //IParseResult parseResult = parse(reader, scanInfo, fileCreator, index, null, null); - //IASTTranslationUnit tu = parseResult.getTranslationUnit(); - + // TODO temporary IScannerExtensionConfiguration config = new GCCScannerExtensionConfiguration(); @@ -138,6 +136,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log) throws CoreException { + System.out.println("Second Method"); return getASTTranslationUnit(reader, scanInfo, fileCreator, index, 0, log); } diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java index 13889304d27..ac647bb859c 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java +++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java @@ -51,6 +51,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNullStatement; 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.IASTProblem; import org.eclipse.cdt.core.dom.ast.IASTProblemExpression; @@ -73,6 +74,7 @@ import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99NoCastExpressionParser; import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym; import org.eclipse.cdt.internal.core.dom.parser.ASTNode; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousExpression; +import org.eclipse.cdt.internal.core.dom.parser.c.CASTAmbiguity; /** @@ -118,9 +120,6 @@ public abstract class BuildASTParserAction { private final IASTNodeFactory nodeFactory; - protected static final ASTVisitor EMPTY_VISITOR = new ASTVisitor() { - { shouldVisitStatements = true; } - }; @@ -324,11 +323,33 @@ public abstract class BuildASTParserAction { setOffsetAndLength(tu, 0, offset(d) + length(d)); } - // resolve ambiguities - tu.accept(EMPTY_VISITOR); + resolveAmbiguityNodes(); if(TRACE_AST_STACK) System.out.println(astStack); } + + + /** + * Removes ambiguity nodes from the AST by resolving them. + * The ambiguity nodes resolve themselves when visited for the first time. + * All ambiguities must be resolved before the AST is returned. + * + * @see CPPASTAmbiguity.accept() + * @see CASTAmbiguity.accept() + * + * TODO Ambiguity resolution may be avoided in the case that no + * ambiguity nodes were created. + */ + private void resolveAmbiguityNodes() { + tu.accept(EMPTY_VISITOR); + } + + /** + * When applied to the AST causes ambiguity nodes to be resolved. + */ + protected static final ASTVisitor EMPTY_VISITOR = new ASTVisitor() { + { shouldVisitStatements = true; } + }; @@ -338,9 +359,7 @@ public abstract class BuildASTParserAction { public void consumeIdentifierName() { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); - IToken token = parser.getRightIToken(); - IASTName name = createName(token); - astStack.push(name); + astStack.push(createName(parser.getRightIToken())); if(TRACE_AST_STACK) System.out.println(astStack); } @@ -814,7 +833,7 @@ public abstract class BuildASTParserAction { decl = nodeFactory.newDeclarator(nodeFactory.newName()); for(Object pointer : astStack.closeScope()) - decl.addPointerOperator((ICASTPointer)pointer); + decl.addPointerOperator((IASTPointer)pointer); setOffsetAndLength(decl); astStack.push(decl); @@ -911,7 +930,7 @@ public abstract class BuildASTParserAction { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList(); - ICASTDeclSpecifier declSpecifier = (ICASTDeclSpecifier) astStack.pop(); // may be null + IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier); diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java index bcec644a3b3..e81b0827bc4 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java +++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java @@ -88,11 +88,11 @@ import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator; /** - * Semantic actions that build the AST during the parse. These are the actions - * that are specific to the C++ parser. + * Semantic actions that build the AST during the parse. + * These are the actions that are specific to the C++ parser, the superclass + * contains actions that can be shared with the C99 parser. * * @author Mike Kucera - * */ public class CPPBuildASTParserAction extends BuildASTParserAction { @@ -633,6 +633,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { public void consumeNestedNameSpecifierEmpty() { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); + // can't use Collections.EMPTY_LIST because we need a list thats mutable astStack.push(new LinkedList<IASTName>()); if(TRACE_AST_STACK) System.out.println(astStack); @@ -676,7 +677,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { public void consumeQualifiedId(boolean hasTemplateKeyword) { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); - ICPPASTQualifiedName qualifiedName = subRuleQualifiedName(hasTemplateKeyword); + IASTName qualifiedName = subRuleQualifiedName(hasTemplateKeyword); astStack.push(qualifiedName); if(TRACE_AST_STACK) System.out.println(astStack); @@ -688,7 +689,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { * Creates a qualified name from a list of names (that must be in reverse order). * Does not set the offset and length. */ - private ICPPASTQualifiedName createQualifiedName(LinkedList<IASTName> nestedNames, boolean hasDColon) { + private ICPPASTQualifiedName createQualifiedName(LinkedList<IASTName> nestedNames, boolean startsWithColonColon) { ICPPASTQualifiedName qualifiedName = nodeFactory.newCPPQualifiedName(); int startOffset = offset(nestedNames.getLast()); @@ -698,8 +699,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { for(IASTName name : reverseIterable(nestedNames)) qualifiedName.addName(name); - qualifiedName.setFullyQualified(hasDColon); - + qualifiedName.setFullyQualified(startsWithColonColon); return qualifiedName; } @@ -713,17 +713,22 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { * Does not place the resulting node on the stack, returns it instead. */ @SuppressWarnings("unchecked") - private ICPPASTQualifiedName subRuleQualifiedName(boolean hasOptionalKeyword) { - IASTName subName = (IASTName) astStack.pop(); + private IASTName subRuleQualifiedName(boolean hasOptionalKeyword) { + IASTName lastName = (IASTName) astStack.pop(); if(hasOptionalKeyword) // this is usually a template keyword and can be ignored astStack.pop(); LinkedList<IASTName> nestedNames = (LinkedList<IASTName>) astStack.pop(); - boolean hasDColon = astStack.pop() == PLACE_HOLDER; + boolean startsWithColonColon = astStack.pop() == PLACE_HOLDER; + + if(nestedNames.isEmpty() && !startsWithColonColon) { // then its not a qualified name + return lastName; + } + + nestedNames.addFirst(lastName); // the list of names is in reverse order - nestedNames.addFirst(subName); - return createQualifiedName(nestedNames, hasDColon); + return createQualifiedName(nestedNames, startsWithColonColon); } @@ -784,7 +789,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { public void consumeNamespaceAliasDefinition() { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); - ICPPASTQualifiedName qualifiedName = subRuleQualifiedName(false); + IASTName qualifiedName = subRuleQualifiedName(false); IASTName alias = createName(parser.getRuleTokens().get(1)); ICPPASTNamespaceAlias namespaceAlias = nodeFactory.newNamespaceAlias(alias, qualifiedName); @@ -803,7 +808,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { public void consumeUsingDeclaration() { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); - ICPPASTQualifiedName qualifiedName = subRuleQualifiedName(false); + IASTName qualifiedName = subRuleQualifiedName(false); boolean hasTypenameKeyword = astStack.pop() == PLACE_HOLDER; ICPPASTUsingDeclaration usingDeclaration = nodeFactory.newUsingDeclaration(qualifiedName); @@ -823,7 +828,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction { public void consumeUsingDirective() { if(TRACE_ACTIONS) DebugUtil.printMethodTrace(); - ICPPASTQualifiedName qualifiedName = subRuleQualifiedName(false); + IASTName qualifiedName = subRuleQualifiedName(false); ICPPASTUsingDirective usingDirective = nodeFactory.newUsingDirective(qualifiedName); setOffsetAndLength(usingDirective); diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/util/CollectionUtils.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/util/CollectionUtils.java index 9f748f6084b..f98068c2879 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/util/CollectionUtils.java +++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/util/CollectionUtils.java @@ -32,6 +32,8 @@ public final class CollectionUtils { /** * Returns an iterator that iterates backwards over the given list. * The remove() method is not implemented and will throw UnsupportedOperationException. + * The returned iterator does not support the remove() method. + * * @throws NullPointerException if list is null */ public static <T> Iterator<T> reverseIterator(final List<T> list) { @@ -93,7 +95,7 @@ public final class CollectionUtils { * @throws NullPointerException if source or pattern is null */ public static boolean matchTokens(List<IToken> source, Integer ... pattern) { - if(source.size() != pattern.length) // throws NPE if either param is null + if(source.size() != pattern.length) // throws NPE if either parameter is null return false; for(int i = 0, n = pattern.length; i < n; i++) { @@ -107,13 +109,14 @@ public final class CollectionUtils { /** * Finds the first object in the heterogeneous list that is an instance of * the given class, removes it from the list, and returns it. + * If there is not object in the list of the given type the list is left + * unmodified and null is returned. * * @throws NullPointerException if list or clazz is null * @throws UnsupportedOperationException if the list's Iterator does not support the remove() method */ @SuppressWarnings("unchecked") public static <T> T findFirstAndRemove(List<Object> list, Class<T> clazz) { - // There's a name somewhere on the stack, find it for(Iterator<Object> iter = list.iterator(); iter.hasNext();) { Object o = iter.next(); if(clazz.isInstance(o)) { diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java index b6a787823ca..5ddde1317bb 100644 --- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java +++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java @@ -13,11 +13,7 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp; - import lpg.lpgjavaruntime.*; -import org.eclipse.cdt.core.dom.lrparser.lpgextensions.ITrialUndoActionProvider; -import org.eclipse.cdt.core.dom.lrparser.lpgextensions.AbstractTrialUndoActionProvider; -import org.eclipse.cdt.core.dom.lrparser.lpgextensions.TrialUndoParser; import java.util.*; @@ -29,111 +25,148 @@ import org.eclipse.cdt.core.dom.lrparser.IParser; import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider; import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil; -public class CPPParser extends AbstractTrialUndoActionProvider< CPPParserAction , Object > implements IParserActionTokenProvider, IParser { - private static ParseTable prs = new CPPParserprs(); - protected static final Action< CPPParserAction , Object >[] RULE_ACTIONS; +public class CPPParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser +{ + private static ParseTable prs = new CPPParserprs(); + private BacktrackingParser btParser; - { - ruleAction = RULE_ACTIONS; - } - - public CPPParser(LexStream lexStream) { - super(lexStream); + public BacktrackingParser getParser() { return btParser; } + private void setResult(Object object) { btParser.setSym1(object); } + public Object getRhsSym(int i) { return btParser.getSym(i); } - try { - super.remapTerminalSymbols(orderedTerminalSymbols(), CPPParserprs.EOFT_SYMBOL); - } catch (NullExportedSymbolsException e) { - } catch (NullTerminalSymbolsException e) { - } catch (UnimplementedTerminalsException e) { - java.util.ArrayList unimplemented_symbols = e.getSymbols(); - System.out.println("The Lexer will not scan the following token(s):"); - for (int i = 0; i < unimplemented_symbols.size(); i++) { - Integer id = (Integer) unimplemented_symbols.get(i); - System.out.println(" " + CPPParsersym.orderedTerminalSymbols[id.intValue()]); - } - System.out.println(); - } catch (UndefinedEofSymbolException e) { - throw new Error(new UndefinedEofSymbolException("The Lexer does not implement the Eof symbol " + CPPParsersym.orderedTerminalSymbols[CPPParserprs.EOFT_SYMBOL])); - } - } + public int getRhsTokenIndex(int i) { return btParser.getToken(i); } + public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); } + + public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); } + public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); } - - public CPPParser() { // constructor - // this(new $lexer_class()); - } + public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); } + public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); } - public String[] orderedTerminalSymbols() { - return CPPParsersym.orderedTerminalSymbols; - } - - public String getTokenKindName(int kind) { - return CPPParsersym.orderedTerminalSymbols[kind]; - } + public int getLeftSpan() { return btParser.getFirstToken(); } + public IToken getLeftIToken() { return super.getIToken(getLeftSpan()); } - public int getEOFTokenKind() { - return CPPParserprs.EOFT_SYMBOL; - } - - public PrsStream getParseStream() { - return (PrsStream) this; - } + public int getRightSpan() { return btParser.getLastToken(); } + public IToken getRightIToken() { return super.getIToken(getRightSpan()); } - // - // Report error message for given error_token. - // - public final void reportErrorTokenMessage(int error_token, String msg) { - int firsttok = super.getFirstRealToken(error_token), lasttok = super.getLastRealToken(error_token); - String location = super.getFileName() + ':' + - (firsttok > lasttok - ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok)) - : (super.getLine(error_token) + ":" + - super.getColumn(error_token) + ":" + - super.getEndLine(error_token) + ":" + - super.getEndColumn(error_token))) + ": "; - super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg); - } + public int getRhsErrorTokenIndex(int i) + { + int index = btParser.getToken(i); + IToken err = super.getIToken(index); + return (err instanceof ErrorToken ? index : 0); + } + public ErrorToken getRhsErrorIToken(int i) + { + int index = btParser.getToken(i); + IToken err = super.getIToken(index); + return (ErrorToken) (err instanceof ErrorToken ? err : null); + } - public Object parser() { - return parser(null, 0); - } + public CPPParser(LexStream lexStream) + { + super(lexStream); - public Object parser(Monitor monitor) { - return parser(monitor, 0); - } + try + { + super.remapTerminalSymbols(orderedTerminalSymbols(), CPPParserprs.EOFT_SYMBOL); + } + catch(NullExportedSymbolsException e) { + } + catch(NullTerminalSymbolsException e) { + } + catch(UnimplementedTerminalsException e) + { + java.util.ArrayList unimplemented_symbols = e.getSymbols(); + System.out.println("The Lexer will not scan the following token(s):"); + for (int i = 0; i < unimplemented_symbols.size(); i++) + { + Integer id = (Integer) unimplemented_symbols.get(i); + System.out.println(" " + CPPParsersym.orderedTerminalSymbols[id.intValue()]); + } + System.out.println(); + } + catch(UndefinedEofSymbolException e) + { + throw new Error(new UndefinedEofSymbolException + ("The Lexer does not implement the Eof symbol " + + CPPParsersym.orderedTerminalSymbols[CPPParserprs.EOFT_SYMBOL])); + } + } - public Object parser(int error_repair_count) { - return parser(null, error_repair_count); - } + public String[] orderedTerminalSymbols() { return CPPParsersym.orderedTerminalSymbols; } + public String getTokenKindName(int kind) { return CPPParsersym.orderedTerminalSymbols[kind]; } + public int getEOFTokenKind() { return CPPParserprs.EOFT_SYMBOL; } + public PrsStream getParseStream() { return (PrsStream) this; } + + // + // Report error message for given error_token. + // + public final void reportErrorTokenMessage(int error_token, String msg) + { + int firsttok = super.getFirstErrorToken(error_token), + lasttok = super.getLastErrorToken(error_token); + String location = super.getFileName() + ':' + + (firsttok > lasttok + ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok)) + : (super.getLine(error_token) + ":" + + super.getColumn(error_token) + ":" + + super.getEndLine(error_token) + ":" + + super.getEndColumn(error_token))) + + ": "; + super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg); + } - public Object parser(Monitor monitor, int error_repair_count) { - try { - btParser = new TrialUndoParser((TokenStream) this, prs, (ITrialUndoActionProvider< Object >) this); - } catch (NotBacktrackParseTableException e) { - throw new Error(new NotBacktrackParseTableException("Regenerate CPPParserprs.java with -BACKTRACK option")); - } catch (BadParseSymFileException e) { - throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- CPPParsersym.java")); - } + public Object parser() + { + return parser(null, 0); + } + + public Object parser(Monitor monitor) + { + return parser(monitor, 0); + } + + public Object parser(int error_repair_count) + { + return parser(null, error_repair_count); + } - try { - Object result = (Object) btParser.parse(error_repair_count); - btParser.commit(); - return result; - } catch (BadParseException e) { - reset(e.error_token); // point to error token + public Object parser(Monitor monitor, int error_repair_count) + { + try + { + btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this); + } + catch (NotBacktrackParseTableException e) + { + throw new Error(new NotBacktrackParseTableException + ("Regenerate CPPParserprs.java with -BACKTRACK option")); + } + catch (BadParseSymFileException e) + { + throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- CPPParsersym.java")); + } - //DiagnoseParser diagnoseParser = new DiagnoseParser((TokenStream) this, prs); - //diagnoseParser.diagnose(e.error_token); - } + try + { + return (Object) btParser.parse(error_repair_count); + } + catch (BadParseException e) + { + reset(e.error_token); // point to error token + DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs); + diagnoseParser.diagnose(e.error_token); + } - return null; - } + return null; + } private CPPParserAction action; // uncomment to use with backtracking parser -//public CPPParser() { // constructor -//} +public CPPParser() { // constructor +} private void initActions(IASTTranslationUnit tu) { // binding resolution actions need access to IASTName nodes, temporary @@ -143,7 +176,7 @@ private void initActions(IASTTranslationUnit tu) { //action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols); // comment this line to use with backtracking parser - setParserAction(action); + //setParserAction(action); } @@ -175,7 +208,7 @@ public IASTCompletionNode parse(IASTTranslationUnit tu) { action = null; // Comment this line to use with backtracking parser - parserAction = null; + //parserAction = null; return compNode; } @@ -202,2803 +235,1786 @@ public int getKind(int i) { // uncomment this method to use with backtracking parser -//public List getRuleTokens() { -// return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1)); -//} - - - - - // - // Initialize ruleAction array. - // - static { - RULE_ACTIONS = new Action[523 + 1]; - RULE_ACTIONS[0] = null; +public List getRuleTokens() { + return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1)); +} - RULE_ACTIONS[1] = new Action1(); - RULE_ACTIONS[4] = new Action4(); - RULE_ACTIONS[5] = new Action5(); - RULE_ACTIONS[10] = new Action10(); - RULE_ACTIONS[11] = new Action11(); - RULE_ACTIONS[12] = new Action12(); - RULE_ACTIONS[13] = new Action13(); - RULE_ACTIONS[14] = new Action14(); - RULE_ACTIONS[15] = new Action15(); - RULE_ACTIONS[16] = new Action16(); - RULE_ACTIONS[17] = new Action17(); - RULE_ACTIONS[18] = new Action18(); - RULE_ACTIONS[19] = new Action19(); - RULE_ACTIONS[21] = new Action21(); - RULE_ACTIONS[23] = new Action23(); - RULE_ACTIONS[30] = new Action30(); - RULE_ACTIONS[31] = new Action31(); - RULE_ACTIONS[32] = new Action32(); - RULE_ACTIONS[33] = new Action33(); - RULE_ACTIONS[34] = new Action34(); - RULE_ACTIONS[35] = new Action35(); - RULE_ACTIONS[36] = new Action36(); - RULE_ACTIONS[37] = new Action37(); - RULE_ACTIONS[38] = new Action38(); - RULE_ACTIONS[39] = new Action39(); - RULE_ACTIONS[40] = new Action40(); - RULE_ACTIONS[41] = new Action41(); - RULE_ACTIONS[42] = new Action42(); - RULE_ACTIONS[43] = new Action43(); - RULE_ACTIONS[44] = new Action44(); - RULE_ACTIONS[46] = new Action46(); - RULE_ACTIONS[50] = new Action50(); - RULE_ACTIONS[51] = new Action51(); - RULE_ACTIONS[52] = new Action52(); - RULE_ACTIONS[53] = new Action53(); - RULE_ACTIONS[54] = new Action54(); - RULE_ACTIONS[55] = new Action55(); - RULE_ACTIONS[56] = new Action56(); - RULE_ACTIONS[57] = new Action57(); - RULE_ACTIONS[58] = new Action58(); - RULE_ACTIONS[59] = new Action59(); - RULE_ACTIONS[60] = new Action60(); - RULE_ACTIONS[61] = new Action61(); - RULE_ACTIONS[62] = new Action62(); - RULE_ACTIONS[63] = new Action63(); - RULE_ACTIONS[64] = new Action64(); - RULE_ACTIONS[65] = new Action65(); - RULE_ACTIONS[66] = new Action66(); - RULE_ACTIONS[67] = new Action67(); - RULE_ACTIONS[68] = new Action68(); - RULE_ACTIONS[69] = new Action69(); - RULE_ACTIONS[70] = new Action70(); - RULE_ACTIONS[71] = new Action71(); - RULE_ACTIONS[75] = new Action75(); - RULE_ACTIONS[76] = new Action76(); - RULE_ACTIONS[77] = new Action77(); - RULE_ACTIONS[78] = new Action78(); - RULE_ACTIONS[79] = new Action79(); - RULE_ACTIONS[80] = new Action80(); - RULE_ACTIONS[81] = new Action81(); - RULE_ACTIONS[82] = new Action82(); - RULE_ACTIONS[83] = new Action83(); - RULE_ACTIONS[84] = new Action84(); - RULE_ACTIONS[85] = new Action85(); - RULE_ACTIONS[86] = new Action86(); - RULE_ACTIONS[89] = new Action89(); - RULE_ACTIONS[90] = new Action90(); - RULE_ACTIONS[91] = new Action91(); - RULE_ACTIONS[92] = new Action92(); - RULE_ACTIONS[101] = new Action101(); - RULE_ACTIONS[102] = new Action102(); - RULE_ACTIONS[103] = new Action103(); - RULE_ACTIONS[105] = new Action105(); - RULE_ACTIONS[107] = new Action107(); - RULE_ACTIONS[108] = new Action108(); - RULE_ACTIONS[110] = new Action110(); - RULE_ACTIONS[111] = new Action111(); - RULE_ACTIONS[112] = new Action112(); - RULE_ACTIONS[114] = new Action114(); - RULE_ACTIONS[115] = new Action115(); - RULE_ACTIONS[117] = new Action117(); - RULE_ACTIONS[118] = new Action118(); - RULE_ACTIONS[120] = new Action120(); - RULE_ACTIONS[121] = new Action121(); - RULE_ACTIONS[122] = new Action122(); - RULE_ACTIONS[123] = new Action123(); - RULE_ACTIONS[125] = new Action125(); - RULE_ACTIONS[126] = new Action126(); - RULE_ACTIONS[128] = new Action128(); - RULE_ACTIONS[130] = new Action130(); - RULE_ACTIONS[132] = new Action132(); - RULE_ACTIONS[134] = new Action134(); - RULE_ACTIONS[136] = new Action136(); - RULE_ACTIONS[138] = new Action138(); - RULE_ACTIONS[139] = new Action139(); - RULE_ACTIONS[140] = new Action140(); - RULE_ACTIONS[143] = new Action143(); - RULE_ACTIONS[144] = new Action144(); - RULE_ACTIONS[145] = new Action145(); - RULE_ACTIONS[146] = new Action146(); - RULE_ACTIONS[147] = new Action147(); - RULE_ACTIONS[148] = new Action148(); - RULE_ACTIONS[149] = new Action149(); - RULE_ACTIONS[150] = new Action150(); - RULE_ACTIONS[151] = new Action151(); - RULE_ACTIONS[152] = new Action152(); - RULE_ACTIONS[153] = new Action153(); - RULE_ACTIONS[155] = new Action155(); - RULE_ACTIONS[156] = new Action156(); - RULE_ACTIONS[160] = new Action160(); - RULE_ACTIONS[162] = new Action162(); - RULE_ACTIONS[165] = new Action165(); - RULE_ACTIONS[174] = new Action174(); - RULE_ACTIONS[175] = new Action175(); - RULE_ACTIONS[176] = new Action176(); - RULE_ACTIONS[177] = new Action177(); - RULE_ACTIONS[178] = new Action178(); - RULE_ACTIONS[179] = new Action179(); - RULE_ACTIONS[180] = new Action180(); - RULE_ACTIONS[181] = new Action181(); - RULE_ACTIONS[184] = new Action184(); - RULE_ACTIONS[185] = new Action185(); - RULE_ACTIONS[186] = new Action186(); - RULE_ACTIONS[188] = new Action188(); - RULE_ACTIONS[189] = new Action189(); - RULE_ACTIONS[190] = new Action190(); - RULE_ACTIONS[191] = new Action191(); - RULE_ACTIONS[192] = new Action192(); - RULE_ACTIONS[193] = new Action193(); - RULE_ACTIONS[194] = new Action194(); - RULE_ACTIONS[195] = new Action195(); - RULE_ACTIONS[196] = new Action196(); - RULE_ACTIONS[197] = new Action197(); - RULE_ACTIONS[198] = new Action198(); - RULE_ACTIONS[215] = new Action215(); - RULE_ACTIONS[216] = new Action216(); - RULE_ACTIONS[217] = new Action217(); - RULE_ACTIONS[218] = new Action218(); - RULE_ACTIONS[219] = new Action219(); - RULE_ACTIONS[220] = new Action220(); - RULE_ACTIONS[222] = new Action222(); - RULE_ACTIONS[226] = new Action226(); - RULE_ACTIONS[227] = new Action227(); - RULE_ACTIONS[255] = new Action255(); - RULE_ACTIONS[271] = new Action271(); - RULE_ACTIONS[272] = new Action272(); - RULE_ACTIONS[273] = new Action273(); - RULE_ACTIONS[274] = new Action274(); - RULE_ACTIONS[275] = new Action275(); - RULE_ACTIONS[276] = new Action276(); - RULE_ACTIONS[277] = new Action277(); - RULE_ACTIONS[279] = new Action279(); - RULE_ACTIONS[280] = new Action280(); - RULE_ACTIONS[285] = new Action285(); - RULE_ACTIONS[286] = new Action286(); - RULE_ACTIONS[295] = new Action295(); - RULE_ACTIONS[296] = new Action296(); - RULE_ACTIONS[297] = new Action297(); - RULE_ACTIONS[299] = new Action299(); - RULE_ACTIONS[300] = new Action300(); - RULE_ACTIONS[301] = new Action301(); - RULE_ACTIONS[302] = new Action302(); - RULE_ACTIONS[303] = new Action303(); - RULE_ACTIONS[304] = new Action304(); - RULE_ACTIONS[305] = new Action305(); - RULE_ACTIONS[306] = new Action306(); - RULE_ACTIONS[312] = new Action312(); - RULE_ACTIONS[314] = new Action314(); - RULE_ACTIONS[318] = new Action318(); - RULE_ACTIONS[319] = new Action319(); - RULE_ACTIONS[320] = new Action320(); - RULE_ACTIONS[321] = new Action321(); - RULE_ACTIONS[322] = new Action322(); - RULE_ACTIONS[323] = new Action323(); - RULE_ACTIONS[324] = new Action324(); - RULE_ACTIONS[325] = new Action325(); - RULE_ACTIONS[326] = new Action326(); - RULE_ACTIONS[327] = new Action327(); - RULE_ACTIONS[333] = new Action333(); - RULE_ACTIONS[334] = new Action334(); - RULE_ACTIONS[336] = new Action336(); - RULE_ACTIONS[337] = new Action337(); - RULE_ACTIONS[338] = new Action338(); - RULE_ACTIONS[341] = new Action341(); - RULE_ACTIONS[342] = new Action342(); - RULE_ACTIONS[346] = new Action346(); - RULE_ACTIONS[347] = new Action347(); - RULE_ACTIONS[348] = new Action348(); - RULE_ACTIONS[349] = new Action349(); - RULE_ACTIONS[350] = new Action350(); - RULE_ACTIONS[351] = new Action351(); - RULE_ACTIONS[352] = new Action352(); - RULE_ACTIONS[353] = new Action353(); - RULE_ACTIONS[354] = new Action354(); - RULE_ACTIONS[360] = new Action360(); - RULE_ACTIONS[361] = new Action361(); - RULE_ACTIONS[362] = new Action362(); - RULE_ACTIONS[364] = new Action364(); - RULE_ACTIONS[366] = new Action366(); - RULE_ACTIONS[367] = new Action367(); - RULE_ACTIONS[368] = new Action368(); - RULE_ACTIONS[369] = new Action369(); - RULE_ACTIONS[370] = new Action370(); - RULE_ACTIONS[373] = new Action373(); - RULE_ACTIONS[374] = new Action374(); - RULE_ACTIONS[375] = new Action375(); - RULE_ACTIONS[376] = new Action376(); - RULE_ACTIONS[377] = new Action377(); - RULE_ACTIONS[382] = new Action382(); - RULE_ACTIONS[383] = new Action383(); - RULE_ACTIONS[384] = new Action384(); - RULE_ACTIONS[385] = new Action385(); - RULE_ACTIONS[386] = new Action386(); - RULE_ACTIONS[390] = new Action390(); - RULE_ACTIONS[394] = new Action394(); - RULE_ACTIONS[395] = new Action395(); - RULE_ACTIONS[396] = new Action396(); - RULE_ACTIONS[399] = new Action399(); - RULE_ACTIONS[410] = new Action410(); - RULE_ACTIONS[411] = new Action411(); - RULE_ACTIONS[412] = new Action412(); - RULE_ACTIONS[413] = new Action413(); - RULE_ACTIONS[420] = new Action420(); - RULE_ACTIONS[421] = new Action421(); - RULE_ACTIONS[422] = new Action422(); - RULE_ACTIONS[423] = new Action423(); - RULE_ACTIONS[429] = new Action429(); - RULE_ACTIONS[430] = new Action430(); - RULE_ACTIONS[431] = new Action431(); - RULE_ACTIONS[432] = new Action432(); - RULE_ACTIONS[438] = new Action438(); - RULE_ACTIONS[439] = new Action439(); - RULE_ACTIONS[442] = new Action442(); - RULE_ACTIONS[443] = new Action443(); - RULE_ACTIONS[486] = new Action486(); - RULE_ACTIONS[487] = new Action487(); - RULE_ACTIONS[488] = new Action488(); - RULE_ACTIONS[493] = new Action493(); - RULE_ACTIONS[494] = new Action494(); - RULE_ACTIONS[495] = new Action495(); - RULE_ACTIONS[496] = new Action496(); - RULE_ACTIONS[497] = new Action497(); - RULE_ACTIONS[498] = new Action498(); - RULE_ACTIONS[499] = new Action499(); - RULE_ACTIONS[508] = new Action508(); - RULE_ACTIONS[509] = new Action509(); - RULE_ACTIONS[510] = new Action510(); - RULE_ACTIONS[513] = new Action513(); - RULE_ACTIONS[514] = new Action514(); - RULE_ACTIONS[515] = new Action515(); - RULE_ACTIONS[516] = new Action516(); - RULE_ACTIONS[517] = new Action517(); - // - // Make sure that all elements of ruleAction are properly initialized - // - for (int i = 0; i < RULE_ACTIONS.length; i++) { - if (RULE_ACTIONS[i] == null) { - RULE_ACTIONS[i] = emptyAction(); - } - } - } - - // - // Rule 1: <openscope-ast> ::= $Empty - // - static final class Action1 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - openASTScope(); - } - } - - // - // Rule 4: <placeholder> ::= $Empty - // - static final class Action4 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 5: <empty> ::= $Empty - // - static final class Action5 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 10: translation_unit ::= declaration_seq - // - static final class Action10 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTranslationUnit(); - } - } - - // - // Rule 11: translation_unit ::= $Empty - // - static final class Action11 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTranslationUnit(); - } - } - - // - // Rule 12: literal ::= integer - // - static final class Action12 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant); - } - } - - // - // Rule 13: literal ::= 0 - // - static final class Action13 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant); - } - } - - // - // Rule 14: literal ::= floating - // - static final class Action14 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_float_constant); - } - } - - // - // Rule 15: literal ::= charconst - // - static final class Action15 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_char_constant); - } - } - - // - // Rule 16: literal ::= stringlit - // - static final class Action16 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_string_literal); - } - } - - // - // Rule 17: literal ::= true - // - static final class Action17 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_true); - } - } - - // - // Rule 18: literal ::= false - // - static final class Action18 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_false); - } - } - - // - // Rule 19: literal ::= this - // - static final class Action19 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionLiteral(ICPPASTLiteralExpression.lk_this); - } - } - - // - // Rule 21: primary_expression ::= ( expression ) - // - static final class Action21 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBracketed(); - } - } - - // - // Rule 23: id_expression ::= qualified_or_unqualified_name - // - static final class Action23 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionName(); - } - } - - // - // Rule 30: unqualified_id_name ::= ~ class_name - // - static final class Action30 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDestructorName(); - } - } - - // - // Rule 31: identifier_name ::= identifier - // - static final class Action31 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeIdentifierName(); - } - } - - // - // Rule 32: template_opt ::= template - // - static final class Action32 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 33: template_opt ::= $Empty - // - static final class Action33 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 34: dcolon_opt ::= :: - // - static final class Action34 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 35: dcolon_opt ::= $Empty - // - static final class Action35 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 36: qualified_id_name ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name - // - static final class Action36 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(true); - } - } - - // - // Rule 37: qualified_id_name ::= :: identifier_name - // - static final class Action37 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeGlobalQualifiedId(); - } - } - - // - // Rule 38: qualified_id_name ::= :: operator_function_id_name - // - static final class Action38 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeGlobalQualifiedId(); - } - } - - // - // Rule 39: qualified_id_name ::= :: template_id_name - // - static final class Action39 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeGlobalQualifiedId(); - } - } - - // - // Rule 40: nested_name_specifier ::= class_or_namespace_name :: nested_name_specifier_with_template - // - static final class Action40 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNestedNameSpecifier(true); - } - } - - // - // Rule 41: nested_name_specifier ::= class_or_namespace_name :: - // - static final class Action41 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNestedNameSpecifier(false); - } - } - - // - // Rule 42: nested_name_specifier_with_template ::= class_or_namespace_name_with_template :: nested_name_specifier_with_template - // - static final class Action42 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNestedNameSpecifier(true); - } - } - - // - // Rule 43: nested_name_specifier_with_template ::= class_or_namespace_name_with_template :: - // - static final class Action43 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNestedNameSpecifier(false); - } - } - - // - // Rule 44: class_or_namespace_name_with_template ::= template_opt class_or_namespace_name - // - static final class Action44 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNameWithTemplateKeyword(); - } - } - - // - // Rule 46: nested_name_specifier_opt ::= $Empty - // - static final class Action46 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNestedNameSpecifierEmpty(); - } - } - - // - // Rule 50: postfix_expression ::= postfix_expression [ expression ] - // - static final class Action50 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionArraySubscript(); - } - } - - // - // Rule 51: postfix_expression ::= postfix_expression ( expression_list_opt ) - // - static final class Action51 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFunctionCall(); - } - } - - // - // Rule 52: postfix_expression ::= simple_type_specifier ( expression_list_opt ) - // - static final class Action52 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionSimpleTypeConstructor(); - } - } - - // - // Rule 53: postfix_expression ::= typename dcolon_opt nested_name_specifier <empty> identifier_name ( expression_list_opt ) - // - static final class Action53 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionTypeName(); - } - } - - // - // Rule 54: postfix_expression ::= typename dcolon_opt nested_name_specifier template_opt template_id_name ( expression_list_opt ) - // - static final class Action54 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionTypeName(); - } - } - - // - // Rule 55: postfix_expression ::= postfix_expression . qualified_or_unqualified_name - // - static final class Action55 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(false, false); - } - } - - // - // Rule 56: postfix_expression ::= postfix_expression -> qualified_or_unqualified_name - // - static final class Action56 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(true, false); - } - } - - // - // Rule 57: postfix_expression ::= postfix_expression . template qualified_or_unqualified_name - // - static final class Action57 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(false, true); - } - } - - // - // Rule 58: postfix_expression ::= postfix_expression -> template qualified_or_unqualified_name - // - static final class Action58 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(true, true); - } - } - - // - // Rule 59: postfix_expression ::= postfix_expression . pseudo_destructor_name - // - static final class Action59 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(false, false); - } - } - - // - // Rule 60: postfix_expression ::= postfix_expression -> pseudo_destructor_name - // - static final class Action60 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionFieldReference(true, false); - } - } - - // - // Rule 61: postfix_expression ::= postfix_expression ++ - // - static final class Action61 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); - } - } - - // - // Rule 62: postfix_expression ::= postfix_expression -- - // - static final class Action62 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); - } - } - - // - // Rule 63: postfix_expression ::= dynamic_cast < type_id > ( expression ) - // - static final class Action63 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionCast(ICPPASTCastExpression.op_dynamic_cast); - } - } - - // - // Rule 64: postfix_expression ::= static_cast < type_id > ( expression ) - // - static final class Action64 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionCast(ICPPASTCastExpression.op_static_cast); - } - } - - // - // Rule 65: postfix_expression ::= reinterpret_cast < type_id > ( expression ) - // - static final class Action65 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionCast(ICPPASTCastExpression.op_reinterpret_cast); - } - } - - // - // Rule 66: postfix_expression ::= const_cast < type_id > ( expression ) - // - static final class Action66 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionCast(ICPPASTCastExpression.op_const_cast); - } - } - - // - // Rule 67: postfix_expression ::= typeid ( expression ) - // - static final class Action67 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(ICPPASTUnaryExpression.op_typeid); - } - } - - // - // Rule 68: postfix_expression ::= typeid ( type_id ) - // - static final class Action68 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionTypeId(ICPPASTTypeIdExpression.op_typeid); - } - } - - // - // Rule 69: pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt type_name :: ~ type_name - // - static final class Action69 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePsudoDestructorName(true); - } - } - - // - // Rule 70: pseudo_destructor_name ::= dcolon_opt nested_name_specifier template template_id_name :: ~ type_name - // - static final class Action70 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePsudoDestructorName(true); - } - } - - // - // Rule 71: pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt ~ type_name - // - static final class Action71 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePsudoDestructorName(false); - } - } - - // - // Rule 75: unary_expression ::= ++ cast_expression - // - static final class Action75 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); - } - } - - // - // Rule 76: unary_expression ::= -- cast_expression - // - static final class Action76 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); - } - } - - // - // Rule 77: unary_expression ::= & cast_expression - // - static final class Action77 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); - } - } - - // - // Rule 78: unary_expression ::= * cast_expression - // - static final class Action78 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); - } - } - - // - // Rule 79: unary_expression ::= + cast_expression - // - static final class Action79 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); - } - } - - // - // Rule 80: unary_expression ::= - cast_expression - // - static final class Action80 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); - } - } - - // - // Rule 81: unary_expression ::= ~ cast_expression - // - static final class Action81 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); - } - } - - // - // Rule 82: unary_expression ::= ! cast_expression - // - static final class Action82 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); - } - } - - // - // Rule 83: unary_expression ::= sizeof unary_expression - // - static final class Action83 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); - } - } - - // - // Rule 84: unary_expression ::= sizeof ( type_id ) - // - static final class Action84 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionTypeId(ICPPASTTypeIdExpression.op_sizeof); - } - } - - // - // Rule 85: new_expression ::= dcolon_opt new new_placement_opt new_type_id <openscope-ast> new_array_expressions_opt new_initializer_opt - // - static final class Action85 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionNew(false); - } - } - - // - // Rule 86: new_expression ::= dcolon_opt new new_placement_opt ( type_id ) new_initializer_opt - // - static final class Action86 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionNew(true); - } - } - - // - // Rule 89: new_placement_opt ::= $Empty - // - static final class Action89 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 90: new_type_id ::= type_specifier_seq - // - static final class Action90 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(false); - } - } - - // - // Rule 91: new_type_id ::= type_specifier_seq new_declarator - // - static final class Action91 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(true); - } - } - - // - // Rule 92: new_declarator ::= <openscope-ast> new_pointer_operators - // - static final class Action92 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNewDeclarator(); - } - } - - // - // Rule 101: new_initializer_opt ::= $Empty - // - static final class Action101 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 102: delete_expression ::= dcolon_opt delete cast_expression - // - static final class Action102 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionDelete(false); - } - } - - // - // Rule 103: delete_expression ::= dcolon_opt delete [ ] cast_expression - // - static final class Action103 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionDelete(true); - } - } - - // - // Rule 105: cast_expression ::= ( type_id ) cast_expression - // - static final class Action105 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionCast(ICPPASTCastExpression.op_cast); - } - } - - // - // Rule 107: pm_expression ::= pm_expression .* cast_expression - // - static final class Action107 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmdot); - } - } - - // - // Rule 108: pm_expression ::= pm_expression ->* cast_expression - // - static final class Action108 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmarrow); - } - } - - // - // Rule 110: multiplicative_expression ::= multiplicative_expression * pm_expression - // - static final class Action110 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiply); - } - } - - // - // Rule 111: multiplicative_expression ::= multiplicative_expression / pm_expression - // - static final class Action111 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divide); - } - } - - // - // Rule 112: multiplicative_expression ::= multiplicative_expression % pm_expression - // - static final class Action112 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_modulo); - } - } - - // - // Rule 114: additive_expression ::= additive_expression + multiplicative_expression - // - static final class Action114 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plus); - } - } - - // - // Rule 115: additive_expression ::= additive_expression - multiplicative_expression - // - static final class Action115 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minus); - } - } - - // - // Rule 117: shift_expression ::= shift_expression << additive_expression - // - static final class Action117 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeft); - } - } - - // - // Rule 118: shift_expression ::= shift_expression >> additive_expression - // - static final class Action118 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRight); - } - } - - // - // Rule 120: relational_expression ::= relational_expression < shift_expression - // - static final class Action120 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessThan); - } - } - - // - // Rule 121: relational_expression ::= relational_expression > shift_expression - // - static final class Action121 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterThan); - } - } - - // - // Rule 122: relational_expression ::= relational_expression <= shift_expression - // - static final class Action122 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessEqual); - } - } - - // - // Rule 123: relational_expression ::= relational_expression >= shift_expression - // - static final class Action123 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterEqual); - } - } - - // - // Rule 125: equality_expression ::= equality_expression == relational_expression - // - static final class Action125 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_equals); - } - } - - // - // Rule 126: equality_expression ::= equality_expression != relational_expression - // - static final class Action126 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_notequals); - } - } - - // - // Rule 128: and_expression ::= and_expression & equality_expression - // - static final class Action128 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAnd); - } - } - - // - // Rule 130: exclusive_or_expression ::= exclusive_or_expression ^ and_expression - // - static final class Action130 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXor); - } - } - - // - // Rule 132: inclusive_or_expression ::= inclusive_or_expression | exclusive_or_expression - // - static final class Action132 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOr); - } - } - - // - // Rule 134: logical_and_expression ::= logical_and_expression && inclusive_or_expression - // - static final class Action134 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalAnd); - } - } - - // - // Rule 136: logical_or_expression ::= logical_or_expression || logical_and_expression - // - static final class Action136 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalOr); - } - } - - // - // Rule 138: conditional_expression ::= logical_or_expression ? expression : assignment_expression - // - static final class Action138 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionConditional(); - } - } - - // - // Rule 139: throw_expression ::= throw - // - static final class Action139 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionThrow(false); - } - } - - // - // Rule 140: throw_expression ::= throw assignment_expression - // - static final class Action140 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionThrow(true); - } - } - - // - // Rule 143: assignment_expression ::= logical_or_expression = assignment_expression - // - static final class Action143 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_assign); - } - } - - // - // Rule 144: assignment_expression ::= logical_or_expression *= assignment_expression - // - static final class Action144 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiplyAssign); - } - } - - // - // Rule 145: assignment_expression ::= logical_or_expression /= assignment_expression - // - static final class Action145 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divideAssign); - } - } - - // - // Rule 146: assignment_expression ::= logical_or_expression %= assignment_expression - // - static final class Action146 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_moduloAssign); - } - } - - // - // Rule 147: assignment_expression ::= logical_or_expression += assignment_expression - // - static final class Action147 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plusAssign); - } - } - - // - // Rule 148: assignment_expression ::= logical_or_expression -= assignment_expression - // - static final class Action148 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minusAssign); - } - } - - // - // Rule 149: assignment_expression ::= logical_or_expression >>= assignment_expression - // - static final class Action149 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRightAssign); - } - } - - // - // Rule 150: assignment_expression ::= logical_or_expression <<= assignment_expression - // - static final class Action150 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeftAssign); - } - } - - // - // Rule 151: assignment_expression ::= logical_or_expression &= assignment_expression - // - static final class Action151 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAndAssign); - } - } - - // - // Rule 152: assignment_expression ::= logical_or_expression ^= assignment_expression - // - static final class Action152 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXorAssign); - } - } - - // - // Rule 153: assignment_expression ::= logical_or_expression |= assignment_expression - // - static final class Action153 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOrAssign); - } - } - - // - // Rule 155: expression ::= ERROR_TOKEN - // - static final class Action155 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionProblem(); - } - } - - // - // Rule 156: expression_list ::= <openscope-ast> expression_list_actual - // - static final class Action156 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeExpressionList(); - } - } - - // - // Rule 160: expression_list_opt ::= $Empty - // - static final class Action160 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 162: expression_opt ::= $Empty - // - static final class Action162 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 165: constant_expression_opt ::= $Empty - // - static final class Action165 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 174: statement ::= ERROR_TOKEN - // - static final class Action174 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementProblem(); - } - } - - // - // Rule 175: labeled_statement ::= identifier : statement - // - static final class Action175 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementLabeled(); - } - } - - // - // Rule 176: labeled_statement ::= case constant_expression : - // - static final class Action176 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementCase(); - } - } - - // - // Rule 177: labeled_statement ::= default : - // - static final class Action177 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementDefault(); - } - } - - // - // Rule 178: expression_statement ::= expression ; - // - static final class Action178 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementExpression(); - } - } - - // - // Rule 179: expression_statement ::= ; - // - static final class Action179 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementNull(); - } - } - - // - // Rule 180: compound_statement ::= { <openscope-ast> statement_seq } - // - static final class Action180 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementCompoundStatement(true); - } - } - - // - // Rule 181: compound_statement ::= { } - // - static final class Action181 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementCompoundStatement(false); - } - } - - // - // Rule 184: selection_statement ::= if ( condition ) statement - // - static final class Action184 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementIf(false); - } - } - - // - // Rule 185: selection_statement ::= if ( condition ) statement else statement - // - static final class Action185 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementIf(true); - } - } - - // - // Rule 186: selection_statement ::= switch ( condition ) statement - // - static final class Action186 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementSwitch(); - } - } - - // - // Rule 188: condition ::= type_specifier_seq declarator = assignment_expression - // - static final class Action188 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeConditionDeclaration(); - } - } - - // - // Rule 189: iteration_statement ::= while ( condition ) statement - // - static final class Action189 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementWhileLoop(); - } - } - - // - // Rule 190: iteration_statement ::= do statement while ( expression ) ; - // - static final class Action190 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementDoLoop(); - } - } - - // - // Rule 191: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement - // - static final class Action191 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementForLoop(); - } - } - - // - // Rule 192: iteration_statement ::= for ( simple_declaration expression_opt ; expression_opt ) statement - // - static final class Action192 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementForLoop(); - } - } - - // - // Rule 193: jump_statement ::= break ; - // - static final class Action193 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementBreak(); - } - } - - // - // Rule 194: jump_statement ::= continue ; - // - static final class Action194 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementContinue(); - } - } - - // - // Rule 195: jump_statement ::= return expression ; - // - static final class Action195 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementReturn(true); - } - } - - // - // Rule 196: jump_statement ::= return ; - // - static final class Action196 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementReturn(false); - } - } - - // - // Rule 197: jump_statement ::= goto identifier ; - // - static final class Action197 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementGoto(); - } - } - - // - // Rule 198: declaration_statement ::= block_declaration - // - static final class Action198 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementDeclaration(); - } - } - - // - // Rule 215: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ; - // - static final class Action215 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(true); - } - } - - // - // Rule 216: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers - // - static final class Action216 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSpecifiersSimple(); - } - } - - // - // Rule 217: declaration_specifiers ::= <openscope-ast> class_declaration_specifiers - // - static final class Action217 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSpecifiersComposite(); - } - } - - // - // Rule 218: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers - // - static final class Action218 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSpecifiersComposite(); - } - } - - // - // Rule 219: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers - // - static final class Action219 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSpecifiersComposite(); - } - } - - // - // Rule 220: declaration_specifiers ::= <openscope-ast> type_name_declaration_specifiers - // - static final class Action220 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSpecifiersTypeName(); - } - } - - // - // Rule 222: declaration_specifiers_opt ::= $Empty - // - static final class Action222 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 226: no_type_declaration_specifier ::= friend - // - static final class Action226 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclSpecToken(); - } - } - - // - // Rule 227: no_type_declaration_specifier ::= typedef - // - static final class Action227 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclSpecToken(); - } - } - - // - // Rule 255: simple_type_specifier ::= simple_type_specifier_token - // - static final class Action255 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclSpecToken(); - } - } - - // - // Rule 271: type_name_specifier ::= dcolon_opt nested_name_specifier_opt type_name - // - static final class Action271 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(false); - } - } - - // - // Rule 272: type_name_specifier ::= dcolon_opt nested_name_specifier template template_id_name - // - static final class Action272 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(false); - } - } - - // - // Rule 273: type_name_specifier ::= typename dcolon_opt nested_name_specifier identifier_name - // - static final class Action273 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(false); - } - } - - // - // Rule 274: type_name_specifier ::= typename dcolon_opt nested_name_specifier template_opt template_id_name - // - static final class Action274 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(true); - } - } - - // - // Rule 275: elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt identifier_name - // - static final class Action275 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeSpecifierElaborated(false); - } - } - - // - // Rule 276: elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt template_opt template_id_name - // - static final class Action276 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeSpecifierElaborated(true); - } - } - - // - // Rule 277: elaborated_type_specifier ::= enum dcolon_opt nested_name_specifier_opt identifier_name - // - static final class Action277 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeSpecifierElaborated(false); - } - } - - // - // Rule 279: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt } - // - static final class Action279 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeSpecifierEnumeration(false); - } - } - - // - // Rule 280: enum_specifier ::= enum identifier { <openscope-ast> enumerator_list_opt } - // - static final class Action280 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeSpecifierEnumeration(true); - } - } - - // - // Rule 285: enumerator_definition ::= enumerator - // - static final class Action285 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEnumerator(false); - } - } - - // - // Rule 286: enumerator_definition ::= enumerator = constant_expression - // - static final class Action286 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEnumerator(true); - } - } - - // - // Rule 295: original_namespace_definition ::= namespace identifier_name { <openscope-ast> declaration_seq_opt } - // - static final class Action295 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNamespaceDefinition(true); - } - } - - // - // Rule 296: extension_namespace_definition ::= namespace original_namespace_name { <openscope-ast> declaration_seq_opt } - // - static final class Action296 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNamespaceDefinition(true); - } - } - - // - // Rule 297: unnamed_namespace_definition ::= namespace { <openscope-ast> declaration_seq_opt } - // - static final class Action297 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNamespaceDefinition(false); - } - } - - // - // Rule 299: namespace_alias_definition ::= namespace identifier = dcolon_opt nested_name_specifier_opt namespace_name ; - // - static final class Action299 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeNamespaceAliasDefinition(); - } - } - - // - // Rule 300: using_declaration ::= using typename_opt dcolon_opt nested_name_specifier_opt unqualified_id_name ; - // - static final class Action300 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeUsingDeclaration(); - } - } - - // - // Rule 301: typename_opt ::= typename - // - static final class Action301 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 302: typename_opt ::= $Empty - // - static final class Action302 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 303: using_directive ::= using namespace dcolon_opt nested_name_specifier_opt namespace_name ; - // - static final class Action303 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeUsingDirective(); - } - } - - // - // Rule 304: asm_definition ::= asm ( stringlit ) ; - // - static final class Action304 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationASM(); - } - } - - // - // Rule 305: linkage_specification ::= extern stringlit { <openscope-ast> declaration_seq_opt } - // - static final class Action305 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeLinkageSpecification(); - } - } - - // - // Rule 306: linkage_specification ::= extern stringlit <openscope-ast> declaration - // - static final class Action306 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeLinkageSpecification(); - } - } - - // - // Rule 312: init_declarator ::= declarator initializer - // - static final class Action312 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithInitializer(true); - } - } - - // - // Rule 314: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator - // - static final class Action314 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithPointer(true); - } - } - - // - // Rule 318: basic_direct_declarator ::= declarator_id_name - // - static final class Action318 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorIdentifier(); - } - } - - // - // Rule 319: basic_direct_declarator ::= ( declarator ) - // - static final class Action319 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorBracketed(); - } - } - - // - // Rule 320: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt - // - static final class Action320 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorFunctionDeclarator(true); - } - } - - // - // Rule 321: array_direct_declarator ::= array_direct_declarator array_modifier - // - static final class Action321 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayDeclarator(true); - } - } - - // - // Rule 322: array_direct_declarator ::= basic_direct_declarator array_modifier - // - static final class Action322 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayDeclarator(true); - } - } - - // - // Rule 323: array_modifier ::= [ constant_expression ] - // - static final class Action323 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayModifier(true); - } - } - - // - // Rule 324: array_modifier ::= [ ] - // - static final class Action324 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayModifier(false); - } - } - - // - // Rule 325: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt - // - static final class Action325 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePointer(); - } - } - - // - // Rule 326: ptr_operator ::= & - // - static final class Action326 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeReferenceOperator(); - } - } - - // - // Rule 327: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt - // - static final class Action327 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePointerToMember(); - } - } - - // - // Rule 333: cv_qualifier ::= const - // - static final class Action333 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclSpecToken(); - } - } - - // - // Rule 334: cv_qualifier ::= volatile - // - static final class Action334 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclSpecToken(); - } - } - - // - // Rule 336: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name - // - static final class Action336 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(false); - } - } - - // - // Rule 337: type_id ::= type_specifier_seq - // - static final class Action337 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(false); - } - } - - // - // Rule 338: type_id ::= type_specifier_seq abstract_declarator - // - static final class Action338 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(true); - } - } - - // - // Rule 341: abstract_declarator ::= <openscope-ast> ptr_operator_seq - // - static final class Action341 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithPointer(false); - } - } - - // - // Rule 342: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator - // - static final class Action342 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithPointer(true); - } - } - - // - // Rule 346: basic_direct_abstract_declarator ::= ( abstract_declarator ) - // - static final class Action346 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorBracketed(); - } - } - - // - // Rule 347: array_direct_abstract_declarator ::= array_modifier - // - static final class Action347 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayDeclarator(false); - } - } - - // - // Rule 348: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier - // - static final class Action348 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayDeclarator(true); - } - } - - // - // Rule 349: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier - // - static final class Action349 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorArrayDeclarator(true); - } - } - - // - // 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 - // - static final class Action350 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorFunctionDeclarator(true); - } - } - - // - // Rule 351: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt - // - static final class Action351 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorFunctionDeclarator(false); - } - } - - // - // Rule 352: parameter_declaration_clause ::= parameter_declaration_list_opt ... - // - static final class Action352 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 353: parameter_declaration_clause ::= parameter_declaration_list_opt - // - static final class Action353 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 354: parameter_declaration_clause ::= parameter_declaration_list , ... - // - static final class Action354 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 360: abstract_declarator_opt ::= $Empty - // - static final class Action360 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 361: parameter_declaration ::= declaration_specifiers parameter_init_declarator - // - static final class Action361 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeParameterDeclaration(); - } - } - - // - // Rule 362: parameter_declaration ::= declaration_specifiers - // - static final class Action362 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeParameterDeclarationWithoutDeclarator(); - } - } - - // - // Rule 364: parameter_init_declarator ::= declarator = parameter_initializer - // - static final class Action364 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithInitializer(true); - } - } - - // - // Rule 366: parameter_init_declarator ::= abstract_declarator = parameter_initializer - // - static final class Action366 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithInitializer(true); - } - } - - // - // Rule 367: parameter_init_declarator ::= = parameter_initializer - // - static final class Action367 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithInitializer(false); - } - } - - // - // Rule 368: parameter_initializer ::= assignment_expression - // - static final class Action368 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializer(); - } - } - - // - // Rule 369: function_definition ::= declaration_specifiers_opt function_direct_declarator <openscope-ast> ctor_initializer_list_opt function_body - // - static final class Action369 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeFunctionDefinition(false); - } - } - - // - // Rule 370: function_definition ::= declaration_specifiers_opt function_direct_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq - // - static final class Action370 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeFunctionDefinition(true); - } - } - - // - // Rule 373: initializer ::= ( expression_list ) - // - static final class Action373 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializerConstructor(); - } - } - - // - // Rule 374: initializer_clause ::= assignment_expression - // - static final class Action374 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializer(); - } - } - - // - // Rule 375: initializer_clause ::= { <openscope-ast> initializer_list , } - // - static final class Action375 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializerList(); - } - } - - // - // Rule 376: initializer_clause ::= { <openscope-ast> initializer_list } - // - static final class Action376 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializerList(); - } - } - - // - // Rule 377: initializer_clause ::= { <openscope-ast> } - // - static final class Action377 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeInitializerList(); - } - } - - // - // Rule 382: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt } - // - static final class Action382 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeClassSpecifier(); - } - } - - // - // Rule 383: class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt - // - static final class Action383 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeClassHead(false); - } - } - - // - // Rule 384: class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt - // - static final class Action384 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeClassHead(false); - } - } - - // - // Rule 385: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt - // - static final class Action385 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeClassHead(true); - } - } - - // - // Rule 386: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt - // - static final class Action386 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeClassHead(true); - } - } - - // - // Rule 390: identifier_name_opt ::= $Empty - // - static final class Action390 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 394: visibility_label ::= access_specifier_keyword : - // - static final class Action394 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeVisibilityLabel(); - } - } - - // - // Rule 395: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ; - // - static final class Action395 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(true); - } - } - - // - // Rule 396: member_declaration ::= declaration_specifiers_opt ; - // - static final class Action396 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(false); - } - } - - // - // Rule 399: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ; - // - static final class Action399 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeMemberDeclarationQualifiedId(); - } - } - - // - // Rule 410: member_declarator ::= declarator constant_initializer - // - static final class Action410 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeMemberDeclaratorWithInitializer(); - } - } - - // - // Rule 411: member_declarator ::= bit_field_declarator : constant_expression - // - static final class Action411 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeBitField(true); - } - } - - // - // Rule 412: member_declarator ::= : constant_expression - // - static final class Action412 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeBitField(false); - } - } - - // - // Rule 413: bit_field_declarator ::= identifier_name - // - static final class Action413 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDirectDeclaratorIdentifier(); - } - } - - // - // Rule 420: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name - // - static final class Action420 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeBaseSpecifier(false); - } - } - - // - // Rule 421: base_specifier ::= virtual_opt access_specifier_keyword virtual_opt dcolon_opt nested_name_specifier_opt class_name - // - static final class Action421 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeBaseSpecifier(true); - } - } - - // - // Rule 422: virtual_opt ::= virtual - // - static final class Action422 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 423: virtual_opt ::= $Empty - // - static final class Action423 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 429: conversion_function_id_name ::= operator conversion_type_id - // - static final class Action429 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeConversionName(); - } - } - - // - // Rule 430: conversion_type_id ::= type_specifier_seq conversion_declarator - // - static final class Action430 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(true); - } - } - - // - // Rule 431: conversion_type_id ::= type_specifier_seq - // - static final class Action431 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTypeId(false); - } - } - - // - // Rule 432: conversion_declarator ::= <openscope-ast> ptr_operator_seq - // - static final class Action432 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclaratorWithPointer(false); - } - } - - // - // Rule 438: mem_initializer ::= mem_initializer_name ( expression_list_opt ) - // - static final class Action438 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeConstructorChainInitializer(); - } - } - - // - // Rule 439: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name - // - static final class Action439 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeQualifiedId(false); - } - } - - // - // Rule 442: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt > - // - static final class Action442 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplateId(); - } - } - - // - // Rule 443: operator_id_name ::= operator overloadable_operator - // - static final class Action443 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeOperatorName(); - } - } - - // - // Rule 486: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration - // - static final class Action486 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplateDeclaration(); - } - } - - // - // Rule 487: export_opt ::= export - // - static final class Action487 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumePlaceHolder(); - } - } - - // - // Rule 488: export_opt ::= $Empty - // - static final class Action488 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeEmpty(); - } - } - - // - // Rule 493: type_parameter ::= class identifier_name_opt - // - static final class Action493 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeSimpleTypeTemplateParameter(false); - } - } - - // - // Rule 494: type_parameter ::= class identifier_name_opt = type_id - // - static final class Action494 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeSimpleTypeTemplateParameter(true); - } - } - - // - // Rule 495: type_parameter ::= typename identifier_name_opt - // - static final class Action495 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeSimpleTypeTemplateParameter(false); - } - } - - // - // Rule 496: type_parameter ::= typename identifier_name_opt = type_id - // - static final class Action496 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeSimpleTypeTemplateParameter(true); - } - } - - // - // Rule 497: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt - // - static final class Action497 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplatedTypeTemplateParameter(false); - } - } - - // - // Rule 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression - // - static final class Action498 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplatedTypeTemplateParameter(true); - } - } - - // - // Rule 499: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt > - // - static final class Action499 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplateId(); - } - } - - // - // Rule 508: explicit_instantiation ::= template declaration - // - static final class Action508 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplateExplicitInstantiation(); - } - } - - // - // Rule 509: explicit_specialization ::= template < > declaration - // - static final class Action509 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeTemplateExplicitSpecialization(); - } - } - - // - // Rule 510: try_block ::= try compound_statement <openscope-ast> handler_seq - // - static final class Action510 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementTryBlock(); - } - } - - // - // Rule 513: handler ::= catch ( exception_declaration ) compound_statement - // - static final class Action513 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementCatchHandler(false); - } - } - - // - // Rule 514: handler ::= catch ( ... ) compound_statement - // - static final class Action514 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeStatementCatchHandler(true); - } - } - - // - // Rule 515: exception_declaration ::= type_specifier_seq <openscope-ast> declarator - // - static final class Action515 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(true); - } - } - - // - // Rule 516: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator - // - static final class Action516 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(true); - } - } - - // - // Rule 517: exception_declaration ::= type_specifier_seq - // - static final class Action517 extends DeclaredAction< CPPParserAction , Object > { - - public void doFinal(ITrialUndoActionProvider< Object > provider, CPPParserAction action) { action.builder. - consumeDeclarationSimple(false); - } - } + public void ruleAction(int ruleNumber) + { + switch (ruleNumber) + { + + // + // Rule 1: <openscope-ast> ::= $Empty + // + case 1: { action.builder. + openASTScope(); break; + } + + // + // Rule 4: <placeholder> ::= $Empty + // + case 4: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 5: <empty> ::= $Empty + // + case 5: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 10: translation_unit ::= declaration_seq + // + case 10: { action.builder. + consumeTranslationUnit(); break; + } + + // + // Rule 11: translation_unit ::= $Empty + // + case 11: { action.builder. + consumeTranslationUnit(); break; + } + + // + // Rule 12: literal ::= integer + // + case 12: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant); break; + } + + // + // Rule 13: literal ::= 0 + // + case 13: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant); break; + } + + // + // Rule 14: literal ::= floating + // + case 14: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_float_constant); break; + } + + // + // Rule 15: literal ::= charconst + // + case 15: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_char_constant); break; + } + + // + // Rule 16: literal ::= stringlit + // + case 16: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_string_literal); break; + } + + // + // Rule 17: literal ::= true + // + case 17: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_true); break; + } + + // + // Rule 18: literal ::= false + // + case 18: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_false); break; + } + + // + // Rule 19: literal ::= this + // + case 19: { action.builder. + consumeExpressionLiteral(ICPPASTLiteralExpression.lk_this); break; + } + + // + // Rule 21: primary_expression ::= ( expression ) + // + case 21: { action.builder. + consumeExpressionBracketed(); break; + } + + // + // Rule 23: id_expression ::= qualified_or_unqualified_name + // + case 23: { action.builder. + consumeExpressionName(); break; + } + + // + // Rule 30: unqualified_id_name ::= ~ class_name + // + case 30: { action.builder. + consumeDestructorName(); break; + } + + // + // Rule 31: identifier_name ::= identifier + // + case 31: { action.builder. + consumeIdentifierName(); break; + } + + // + // Rule 32: template_opt ::= template + // + case 32: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 33: template_opt ::= $Empty + // + case 33: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 34: dcolon_opt ::= :: + // + case 34: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 35: dcolon_opt ::= $Empty + // + case 35: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 36: qualified_id_name ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name + // + case 36: { action.builder. + consumeQualifiedId(true); break; + } + + // + // Rule 37: qualified_id_name ::= :: identifier_name + // + case 37: { action.builder. + consumeGlobalQualifiedId(); break; + } + + // + // Rule 38: qualified_id_name ::= :: operator_function_id_name + // + case 38: { action.builder. + consumeGlobalQualifiedId(); break; + } + + // + // Rule 39: qualified_id_name ::= :: template_id_name + // + case 39: { action.builder. + consumeGlobalQualifiedId(); break; + } + + // + // Rule 40: nested_name_specifier ::= class_or_namespace_name :: nested_name_specifier_with_template + // + case 40: { action.builder. + consumeNestedNameSpecifier(true); break; + } + + // + // Rule 41: nested_name_specifier ::= class_or_namespace_name :: + // + case 41: { action.builder. + consumeNestedNameSpecifier(false); break; + } + + // + // Rule 42: nested_name_specifier_with_template ::= class_or_namespace_name_with_template :: nested_name_specifier_with_template + // + case 42: { action.builder. + consumeNestedNameSpecifier(true); break; + } + + // + // Rule 43: nested_name_specifier_with_template ::= class_or_namespace_name_with_template :: + // + case 43: { action.builder. + consumeNestedNameSpecifier(false); break; + } + + // + // Rule 44: class_or_namespace_name_with_template ::= template_opt class_or_namespace_name + // + case 44: { action.builder. + consumeNameWithTemplateKeyword(); break; + } + + // + // Rule 46: nested_name_specifier_opt ::= $Empty + // + case 46: { action.builder. + consumeNestedNameSpecifierEmpty(); break; + } + + // + // Rule 50: postfix_expression ::= postfix_expression [ expression ] + // + case 50: { action.builder. + consumeExpressionArraySubscript(); break; + } + + // + // Rule 51: postfix_expression ::= postfix_expression ( expression_list_opt ) + // + case 51: { action.builder. + consumeExpressionFunctionCall(); break; + } + + // + // Rule 52: postfix_expression ::= simple_type_specifier ( expression_list_opt ) + // + case 52: { action.builder. + consumeExpressionSimpleTypeConstructor(); break; + } + + // + // Rule 53: postfix_expression ::= typename dcolon_opt nested_name_specifier <empty> identifier_name ( expression_list_opt ) + // + case 53: { action.builder. + consumeExpressionTypeName(); break; + } + + // + // Rule 54: postfix_expression ::= typename dcolon_opt nested_name_specifier template_opt template_id_name ( expression_list_opt ) + // + case 54: { action.builder. + consumeExpressionTypeName(); break; + } + + // + // Rule 55: postfix_expression ::= postfix_expression . qualified_or_unqualified_name + // + case 55: { action.builder. + consumeExpressionFieldReference(false, false); break; + } + + // + // Rule 56: postfix_expression ::= postfix_expression -> qualified_or_unqualified_name + // + case 56: { action.builder. + consumeExpressionFieldReference(true, false); break; + } + + // + // Rule 57: postfix_expression ::= postfix_expression . template qualified_or_unqualified_name + // + case 57: { action.builder. + consumeExpressionFieldReference(false, true); break; + } + + // + // Rule 58: postfix_expression ::= postfix_expression -> template qualified_or_unqualified_name + // + case 58: { action.builder. + consumeExpressionFieldReference(true, true); break; + } + + // + // Rule 59: postfix_expression ::= postfix_expression . pseudo_destructor_name + // + case 59: { action.builder. + consumeExpressionFieldReference(false, false); break; + } + + // + // Rule 60: postfix_expression ::= postfix_expression -> pseudo_destructor_name + // + case 60: { action.builder. + consumeExpressionFieldReference(true, false); break; + } + + // + // Rule 61: postfix_expression ::= postfix_expression ++ + // + case 61: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break; + } + + // + // Rule 62: postfix_expression ::= postfix_expression -- + // + case 62: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break; + } + + // + // Rule 63: postfix_expression ::= dynamic_cast < type_id > ( expression ) + // + case 63: { action.builder. + consumeExpressionCast(ICPPASTCastExpression.op_dynamic_cast); break; + } + + // + // Rule 64: postfix_expression ::= static_cast < type_id > ( expression ) + // + case 64: { action.builder. + consumeExpressionCast(ICPPASTCastExpression.op_static_cast); break; + } + + // + // Rule 65: postfix_expression ::= reinterpret_cast < type_id > ( expression ) + // + case 65: { action.builder. + consumeExpressionCast(ICPPASTCastExpression.op_reinterpret_cast); break; + } + + // + // Rule 66: postfix_expression ::= const_cast < type_id > ( expression ) + // + case 66: { action.builder. + consumeExpressionCast(ICPPASTCastExpression.op_const_cast); break; + } + + // + // Rule 67: postfix_expression ::= typeid ( expression ) + // + case 67: { action.builder. + consumeExpressionUnaryOperator(ICPPASTUnaryExpression.op_typeid); break; + } + + // + // Rule 68: postfix_expression ::= typeid ( type_id ) + // + case 68: { action.builder. + consumeExpressionTypeId(ICPPASTTypeIdExpression.op_typeid); break; + } + + // + // Rule 69: pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt type_name :: ~ type_name + // + case 69: { action.builder. + consumePsudoDestructorName(true); break; + } + + // + // Rule 70: pseudo_destructor_name ::= dcolon_opt nested_name_specifier template template_id_name :: ~ type_name + // + case 70: { action.builder. + consumePsudoDestructorName(true); break; + } + + // + // Rule 71: pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt ~ type_name + // + case 71: { action.builder. + consumePsudoDestructorName(false); break; + } + + // + // Rule 75: unary_expression ::= ++ cast_expression + // + case 75: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr); break; + } + + // + // Rule 76: unary_expression ::= -- cast_expression + // + case 76: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr); break; + } + + // + // Rule 77: unary_expression ::= & cast_expression + // + case 77: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper); break; + } + + // + // Rule 78: unary_expression ::= * cast_expression + // + case 78: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_star); break; + } + + // + // Rule 79: unary_expression ::= + cast_expression + // + case 79: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus); break; + } + + // + // Rule 80: unary_expression ::= - cast_expression + // + case 80: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus); break; + } + + // + // Rule 81: unary_expression ::= ~ cast_expression + // + case 81: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde); break; + } + + // + // Rule 82: unary_expression ::= ! cast_expression + // + case 82: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_not); break; + } + + // + // Rule 83: unary_expression ::= sizeof unary_expression + // + case 83: { action.builder. + consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof); break; + } + + // + // Rule 84: unary_expression ::= sizeof ( type_id ) + // + case 84: { action.builder. + consumeExpressionTypeId(ICPPASTTypeIdExpression.op_sizeof); break; + } + + // + // Rule 85: new_expression ::= dcolon_opt new new_placement_opt new_type_id <openscope-ast> new_array_expressions_opt new_initializer_opt + // + case 85: { action.builder. + consumeExpressionNew(false); break; + } + + // + // Rule 86: new_expression ::= dcolon_opt new new_placement_opt ( type_id ) new_initializer_opt + // + case 86: { action.builder. + consumeExpressionNew(true); break; + } + + // + // Rule 89: new_placement_opt ::= $Empty + // + case 89: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 90: new_type_id ::= type_specifier_seq + // + case 90: { action.builder. + consumeTypeId(false); break; + } + + // + // Rule 91: new_type_id ::= type_specifier_seq new_declarator + // + case 91: { action.builder. + consumeTypeId(true); break; + } + + // + // Rule 92: new_declarator ::= <openscope-ast> new_pointer_operators + // + case 92: { action.builder. + consumeNewDeclarator(); break; + } + + // + // Rule 101: new_initializer_opt ::= $Empty + // + case 101: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 102: delete_expression ::= dcolon_opt delete cast_expression + // + case 102: { action.builder. + consumeExpressionDelete(false); break; + } + + // + // Rule 103: delete_expression ::= dcolon_opt delete [ ] cast_expression + // + case 103: { action.builder. + consumeExpressionDelete(true); break; + } + + // + // Rule 105: cast_expression ::= ( type_id ) cast_expression + // + case 105: { action.builder. + consumeExpressionCast(ICPPASTCastExpression.op_cast); break; + } + + // + // Rule 107: pm_expression ::= pm_expression .* cast_expression + // + case 107: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmdot); break; + } + + // + // Rule 108: pm_expression ::= pm_expression ->* cast_expression + // + case 108: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmarrow); break; + } + + // + // Rule 110: multiplicative_expression ::= multiplicative_expression * pm_expression + // + case 110: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiply); break; + } + + // + // Rule 111: multiplicative_expression ::= multiplicative_expression / pm_expression + // + case 111: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divide); break; + } + + // + // Rule 112: multiplicative_expression ::= multiplicative_expression % pm_expression + // + case 112: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_modulo); break; + } + + // + // Rule 114: additive_expression ::= additive_expression + multiplicative_expression + // + case 114: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plus); break; + } + + // + // Rule 115: additive_expression ::= additive_expression - multiplicative_expression + // + case 115: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minus); break; + } + + // + // Rule 117: shift_expression ::= shift_expression << additive_expression + // + case 117: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeft); break; + } + + // + // Rule 118: shift_expression ::= shift_expression >> additive_expression + // + case 118: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRight); break; + } + + // + // Rule 120: relational_expression ::= relational_expression < shift_expression + // + case 120: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessThan); break; + } + + // + // Rule 121: relational_expression ::= relational_expression > shift_expression + // + case 121: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterThan); break; + } + + // + // Rule 122: relational_expression ::= relational_expression <= shift_expression + // + case 122: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessEqual); break; + } + + // + // Rule 123: relational_expression ::= relational_expression >= shift_expression + // + case 123: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterEqual); break; + } + + // + // Rule 125: equality_expression ::= equality_expression == relational_expression + // + case 125: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_equals); break; + } + + // + // Rule 126: equality_expression ::= equality_expression != relational_expression + // + case 126: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_notequals); break; + } + + // + // Rule 128: and_expression ::= and_expression & equality_expression + // + case 128: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAnd); break; + } + + // + // Rule 130: exclusive_or_expression ::= exclusive_or_expression ^ and_expression + // + case 130: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXor); break; + } + + // + // Rule 132: inclusive_or_expression ::= inclusive_or_expression | exclusive_or_expression + // + case 132: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOr); break; + } + + // + // Rule 134: logical_and_expression ::= logical_and_expression && inclusive_or_expression + // + case 134: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalAnd); break; + } + + // + // Rule 136: logical_or_expression ::= logical_or_expression || logical_and_expression + // + case 136: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalOr); break; + } + + // + // Rule 138: conditional_expression ::= logical_or_expression ? expression : assignment_expression + // + case 138: { action.builder. + consumeExpressionConditional(); break; + } + + // + // Rule 139: throw_expression ::= throw + // + case 139: { action.builder. + consumeExpressionThrow(false); break; + } + + // + // Rule 140: throw_expression ::= throw assignment_expression + // + case 140: { action.builder. + consumeExpressionThrow(true); break; + } + + // + // Rule 143: assignment_expression ::= logical_or_expression = assignment_expression + // + case 143: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_assign); break; + } + + // + // Rule 144: assignment_expression ::= logical_or_expression *= assignment_expression + // + case 144: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiplyAssign); break; + } + + // + // Rule 145: assignment_expression ::= logical_or_expression /= assignment_expression + // + case 145: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divideAssign); break; + } + + // + // Rule 146: assignment_expression ::= logical_or_expression %= assignment_expression + // + case 146: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_moduloAssign); break; + } + + // + // Rule 147: assignment_expression ::= logical_or_expression += assignment_expression + // + case 147: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plusAssign); break; + } + + // + // Rule 148: assignment_expression ::= logical_or_expression -= assignment_expression + // + case 148: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minusAssign); break; + } + + // + // Rule 149: assignment_expression ::= logical_or_expression >>= assignment_expression + // + case 149: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRightAssign); break; + } + + // + // Rule 150: assignment_expression ::= logical_or_expression <<= assignment_expression + // + case 150: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeftAssign); break; + } + + // + // Rule 151: assignment_expression ::= logical_or_expression &= assignment_expression + // + case 151: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAndAssign); break; + } + + // + // Rule 152: assignment_expression ::= logical_or_expression ^= assignment_expression + // + case 152: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXorAssign); break; + } + + // + // Rule 153: assignment_expression ::= logical_or_expression |= assignment_expression + // + case 153: { action.builder. + consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOrAssign); break; + } + + // + // Rule 155: expression ::= ERROR_TOKEN + // + case 155: { action.builder. + consumeExpressionProblem(); break; + } + + // + // Rule 156: expression_list ::= <openscope-ast> expression_list_actual + // + case 156: { action.builder. + consumeExpressionList(); break; + } + + // + // Rule 160: expression_list_opt ::= $Empty + // + case 160: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 162: expression_opt ::= $Empty + // + case 162: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 165: constant_expression_opt ::= $Empty + // + case 165: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 174: statement ::= ERROR_TOKEN + // + case 174: { action.builder. + consumeStatementProblem(); break; + } + + // + // Rule 175: labeled_statement ::= identifier : statement + // + case 175: { action.builder. + consumeStatementLabeled(); break; + } + + // + // Rule 176: labeled_statement ::= case constant_expression : + // + case 176: { action.builder. + consumeStatementCase(); break; + } + + // + // Rule 177: labeled_statement ::= default : + // + case 177: { action.builder. + consumeStatementDefault(); break; + } + + // + // Rule 178: expression_statement ::= expression ; + // + case 178: { action.builder. + consumeStatementExpression(); break; + } + + // + // Rule 179: expression_statement ::= ; + // + case 179: { action.builder. + consumeStatementNull(); break; + } + + // + // Rule 180: compound_statement ::= { <openscope-ast> statement_seq } + // + case 180: { action.builder. + consumeStatementCompoundStatement(true); break; + } + + // + // Rule 181: compound_statement ::= { } + // + case 181: { action.builder. + consumeStatementCompoundStatement(false); break; + } + + // + // Rule 184: selection_statement ::= if ( condition ) statement + // + case 184: { action.builder. + consumeStatementIf(false); break; + } + + // + // Rule 185: selection_statement ::= if ( condition ) statement else statement + // + case 185: { action.builder. + consumeStatementIf(true); break; + } + + // + // Rule 186: selection_statement ::= switch ( condition ) statement + // + case 186: { action.builder. + consumeStatementSwitch(); break; + } + + // + // Rule 188: condition ::= type_specifier_seq declarator = assignment_expression + // + case 188: { action.builder. + consumeConditionDeclaration(); break; + } + + // + // Rule 189: iteration_statement ::= while ( condition ) statement + // + case 189: { action.builder. + consumeStatementWhileLoop(); break; + } + + // + // Rule 190: iteration_statement ::= do statement while ( expression ) ; + // + case 190: { action.builder. + consumeStatementDoLoop(); break; + } + + // + // Rule 191: iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement + // + case 191: { action.builder. + consumeStatementForLoop(); break; + } + + // + // Rule 192: iteration_statement ::= for ( simple_declaration expression_opt ; expression_opt ) statement + // + case 192: { action.builder. + consumeStatementForLoop(); break; + } + + // + // Rule 193: jump_statement ::= break ; + // + case 193: { action.builder. + consumeStatementBreak(); break; + } + + // + // Rule 194: jump_statement ::= continue ; + // + case 194: { action.builder. + consumeStatementContinue(); break; + } + + // + // Rule 195: jump_statement ::= return expression ; + // + case 195: { action.builder. + consumeStatementReturn(true); break; + } + + // + // Rule 196: jump_statement ::= return ; + // + case 196: { action.builder. + consumeStatementReturn(false); break; + } + + // + // Rule 197: jump_statement ::= goto identifier ; + // + case 197: { action.builder. + consumeStatementGoto(); break; + } + + // + // Rule 198: declaration_statement ::= block_declaration + // + case 198: { action.builder. + consumeStatementDeclaration(); break; + } + + // + // Rule 215: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ; + // + case 215: { action.builder. + consumeDeclarationSimple(true); break; + } + + // + // Rule 216: declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers + // + case 216: { action.builder. + consumeDeclarationSpecifiersSimple(); break; + } + + // + // Rule 217: declaration_specifiers ::= <openscope-ast> class_declaration_specifiers + // + case 217: { action.builder. + consumeDeclarationSpecifiersComposite(); break; + } + + // + // Rule 218: declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers + // + case 218: { action.builder. + consumeDeclarationSpecifiersComposite(); break; + } + + // + // Rule 219: declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers + // + case 219: { action.builder. + consumeDeclarationSpecifiersComposite(); break; + } + + // + // Rule 220: declaration_specifiers ::= <openscope-ast> type_name_declaration_specifiers + // + case 220: { action.builder. + consumeDeclarationSpecifiersTypeName(); break; + } + + // + // Rule 222: declaration_specifiers_opt ::= $Empty + // + case 222: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 226: no_type_declaration_specifier ::= friend + // + case 226: { action.builder. + consumeDeclSpecToken(); break; + } + + // + // Rule 227: no_type_declaration_specifier ::= typedef + // + case 227: { action.builder. + consumeDeclSpecToken(); break; + } + + // + // Rule 255: simple_type_specifier ::= simple_type_specifier_token + // + case 255: { action.builder. + consumeDeclSpecToken(); break; + } + + // + // Rule 271: type_name_specifier ::= dcolon_opt nested_name_specifier_opt type_name + // + case 271: { action.builder. + consumeQualifiedId(false); break; + } + + // + // Rule 272: type_name_specifier ::= dcolon_opt nested_name_specifier template template_id_name + // + case 272: { action.builder. + consumeQualifiedId(false); break; + } + + // + // Rule 273: type_name_specifier ::= typename dcolon_opt nested_name_specifier identifier_name + // + case 273: { action.builder. + consumeQualifiedId(false); break; + } + + // + // Rule 274: type_name_specifier ::= typename dcolon_opt nested_name_specifier template_opt template_id_name + // + case 274: { action.builder. + consumeQualifiedId(true); break; + } + + // + // Rule 275: elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt identifier_name + // + case 275: { action.builder. + consumeTypeSpecifierElaborated(false); break; + } + + // + // Rule 276: elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt template_opt template_id_name + // + case 276: { action.builder. + consumeTypeSpecifierElaborated(true); break; + } + + // + // Rule 277: elaborated_type_specifier ::= enum dcolon_opt nested_name_specifier_opt identifier_name + // + case 277: { action.builder. + consumeTypeSpecifierElaborated(false); break; + } + + // + // Rule 279: enum_specifier ::= enum { <openscope-ast> enumerator_list_opt } + // + case 279: { action.builder. + consumeTypeSpecifierEnumeration(false); break; + } + + // + // Rule 280: enum_specifier ::= enum identifier { <openscope-ast> enumerator_list_opt } + // + case 280: { action.builder. + consumeTypeSpecifierEnumeration(true); break; + } + + // + // Rule 285: enumerator_definition ::= enumerator + // + case 285: { action.builder. + consumeEnumerator(false); break; + } + + // + // Rule 286: enumerator_definition ::= enumerator = constant_expression + // + case 286: { action.builder. + consumeEnumerator(true); break; + } + + // + // Rule 295: original_namespace_definition ::= namespace identifier_name { <openscope-ast> declaration_seq_opt } + // + case 295: { action.builder. + consumeNamespaceDefinition(true); break; + } + + // + // Rule 296: extension_namespace_definition ::= namespace original_namespace_name { <openscope-ast> declaration_seq_opt } + // + case 296: { action.builder. + consumeNamespaceDefinition(true); break; + } + + // + // Rule 297: unnamed_namespace_definition ::= namespace { <openscope-ast> declaration_seq_opt } + // + case 297: { action.builder. + consumeNamespaceDefinition(false); break; + } + + // + // Rule 299: namespace_alias_definition ::= namespace identifier = dcolon_opt nested_name_specifier_opt namespace_name ; + // + case 299: { action.builder. + consumeNamespaceAliasDefinition(); break; + } + + // + // Rule 300: using_declaration ::= using typename_opt dcolon_opt nested_name_specifier_opt unqualified_id_name ; + // + case 300: { action.builder. + consumeUsingDeclaration(); break; + } + + // + // Rule 301: typename_opt ::= typename + // + case 301: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 302: typename_opt ::= $Empty + // + case 302: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 303: using_directive ::= using namespace dcolon_opt nested_name_specifier_opt namespace_name ; + // + case 303: { action.builder. + consumeUsingDirective(); break; + } + + // + // Rule 304: asm_definition ::= asm ( stringlit ) ; + // + case 304: { action.builder. + consumeDeclarationASM(); break; + } + + // + // Rule 305: linkage_specification ::= extern stringlit { <openscope-ast> declaration_seq_opt } + // + case 305: { action.builder. + consumeLinkageSpecification(); break; + } + + // + // Rule 306: linkage_specification ::= extern stringlit <openscope-ast> declaration + // + case 306: { action.builder. + consumeLinkageSpecification(); break; + } + + // + // Rule 312: init_declarator ::= declarator initializer + // + case 312: { action.builder. + consumeDeclaratorWithInitializer(true); break; + } + + // + // Rule 314: declarator ::= <openscope-ast> ptr_operator_seq direct_declarator + // + case 314: { action.builder. + consumeDeclaratorWithPointer(true); break; + } + + // + // Rule 318: basic_direct_declarator ::= declarator_id_name + // + case 318: { action.builder. + consumeDirectDeclaratorIdentifier(); break; + } + + // + // Rule 319: basic_direct_declarator ::= ( declarator ) + // + case 319: { 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 + // + case 320: { 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 + // + case 322: { action.builder. + consumeDirectDeclaratorArrayDeclarator(true); break; + } + + // + // Rule 323: array_modifier ::= [ constant_expression ] + // + case 323: { action.builder. + consumeDirectDeclaratorArrayModifier(true); break; + } + + // + // Rule 324: array_modifier ::= [ ] + // + case 324: { action.builder. + consumeDirectDeclaratorArrayModifier(false); break; + } + + // + // Rule 325: ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt + // + case 325: { action.builder. + consumePointer(); break; + } + + // + // Rule 326: ptr_operator ::= & + // + case 326: { action.builder. + consumeReferenceOperator(); break; + } + + // + // Rule 327: ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt + // + case 327: { action.builder. + consumePointerToMember(); break; + } + + // + // Rule 333: cv_qualifier ::= const + // + case 333: { action.builder. + consumeDeclSpecToken(); break; + } + + // + // Rule 334: cv_qualifier ::= volatile + // + case 334: { action.builder. + consumeDeclSpecToken(); break; + } + + // + // Rule 336: declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name + // + case 336: { action.builder. + consumeQualifiedId(false); break; + } + + // + // Rule 337: type_id ::= type_specifier_seq + // + case 337: { action.builder. + consumeTypeId(false); break; + } + + // + // Rule 338: type_id ::= type_specifier_seq abstract_declarator + // + case 338: { action.builder. + consumeTypeId(true); break; + } + + // + // Rule 341: abstract_declarator ::= <openscope-ast> ptr_operator_seq + // + case 341: { action.builder. + consumeDeclaratorWithPointer(false); break; + } + + // + // Rule 342: abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator + // + case 342: { action.builder. + consumeDeclaratorWithPointer(true); break; + } + + // + // Rule 346: basic_direct_abstract_declarator ::= ( abstract_declarator ) + // + case 346: { action.builder. + consumeDirectDeclaratorBracketed(); break; + } + + // + // Rule 347: array_direct_abstract_declarator ::= array_modifier + // + case 347: { 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 + // + 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 + // + case 350: { 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 + // + case 351: { 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 + // + 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 + // + case 360: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 361: parameter_declaration ::= declaration_specifiers parameter_init_declarator + // + case 361: { action.builder. + consumeParameterDeclaration(); break; + } + + // + // Rule 362: parameter_declaration ::= declaration_specifiers + // + case 362: { action.builder. + consumeParameterDeclarationWithoutDeclarator(); break; + } + + // + // Rule 364: parameter_init_declarator ::= declarator = parameter_initializer + // + case 364: { 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 + // + case 367: { action.builder. + consumeDeclaratorWithInitializer(false); break; + } + + // + // Rule 368: parameter_initializer ::= assignment_expression + // + case 368: { action.builder. + consumeInitializer(); break; + } + + // + // Rule 369: function_definition ::= declaration_specifiers_opt function_direct_declarator <openscope-ast> ctor_initializer_list_opt function_body + // + case 369: { action.builder. + consumeFunctionDefinition(false); break; + } + + // + // Rule 370: function_definition ::= declaration_specifiers_opt function_direct_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq + // + case 370: { action.builder. + consumeFunctionDefinition(true); break; + } + + // + // Rule 373: initializer ::= ( expression_list ) + // + case 373: { action.builder. + consumeInitializerConstructor(); break; + } + + // + // Rule 374: initializer_clause ::= assignment_expression + // + case 374: { 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 } + // + case 376: { action.builder. + consumeInitializerList(); break; + } + + // + // Rule 377: initializer_clause ::= { <openscope-ast> } + // + case 377: { action.builder. + consumeInitializerList(); break; + } + + // + // Rule 382: class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt } + // + case 382: { 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 + // + case 384: { action.builder. + consumeClassHead(false); break; + } + + // + // Rule 385: class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt + // + case 385: { action.builder. + consumeClassHead(true); break; + } + + // + // Rule 386: class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt + // + case 386: { action.builder. + consumeClassHead(true); break; + } + + // + // Rule 390: identifier_name_opt ::= $Empty + // + case 390: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 394: visibility_label ::= access_specifier_keyword : + // + case 394: { 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 ; + // + case 396: { action.builder. + consumeDeclarationSimple(false); break; + } + + // + // Rule 399: member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ; + // + case 399: { action.builder. + consumeMemberDeclarationQualifiedId(); break; + } + + // + // Rule 410: member_declarator ::= declarator constant_initializer + // + case 410: { action.builder. + consumeMemberDeclaratorWithInitializer(); break; + } + + // + // Rule 411: member_declarator ::= bit_field_declarator : constant_expression + // + case 411: { action.builder. + consumeBitField(true); break; + } + + // + // Rule 412: member_declarator ::= : constant_expression + // + case 412: { action.builder. + consumeBitField(false); break; + } + + // + // Rule 413: bit_field_declarator ::= identifier_name + // + case 413: { action.builder. + consumeDirectDeclaratorIdentifier(); break; + } + + // + // Rule 420: base_specifier ::= dcolon_opt nested_name_specifier_opt class_name + // + case 420: { action.builder. + consumeBaseSpecifier(false); break; + } + + // + // Rule 421: base_specifier ::= virtual_opt access_specifier_keyword virtual_opt dcolon_opt nested_name_specifier_opt class_name + // + case 421: { action.builder. + consumeBaseSpecifier(true); break; + } + + // + // Rule 422: virtual_opt ::= virtual + // + case 422: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 423: virtual_opt ::= $Empty + // + case 423: { action.builder. + consumeEmpty(); break; + } + + // + // Rule 429: conversion_function_id_name ::= operator conversion_type_id + // + case 429: { action.builder. + consumeConversionName(); break; + } + + // + // Rule 430: conversion_type_id ::= type_specifier_seq conversion_declarator + // + case 430: { action.builder. + consumeTypeId(true); break; + } + + // + // Rule 431: conversion_type_id ::= type_specifier_seq + // + case 431: { action.builder. + consumeTypeId(false); break; + } + + // + // Rule 432: conversion_declarator ::= <openscope-ast> ptr_operator_seq + // + case 432: { action.builder. + consumeDeclaratorWithPointer(false); break; + } + + // + // Rule 438: mem_initializer ::= mem_initializer_name ( expression_list_opt ) + // + case 438: { action.builder. + consumeConstructorChainInitializer(); break; + } + + // + // Rule 439: mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name + // + case 439: { action.builder. + consumeQualifiedId(false); break; + } + + // + // Rule 442: operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt > + // + case 442: { action.builder. + consumeTemplateId(); break; + } + + // + // Rule 443: operator_id_name ::= operator overloadable_operator + // + case 443: { action.builder. + consumeOperatorName(); break; + } + + // + // Rule 486: template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration + // + case 486: { action.builder. + consumeTemplateDeclaration(); break; + } + + // + // Rule 487: export_opt ::= export + // + case 487: { action.builder. + consumePlaceHolder(); break; + } + + // + // Rule 488: export_opt ::= $Empty + // + case 488: { 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 + // + 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 + // + 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 498: type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression + // + case 498: { action.builder. + consumeTemplatedTypeTemplateParameter(true); break; + } + + // + // Rule 499: template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt > + // + case 499: { action.builder. + consumeTemplateId(); break; + } + + // + // Rule 508: explicit_instantiation ::= template declaration + // + case 508: { action.builder. + consumeTemplateExplicitInstantiation(); break; + } + + // + // Rule 509: explicit_specialization ::= template < > declaration + // + case 509: { action.builder. + consumeTemplateExplicitSpecialization(); break; + } + + // + // Rule 510: try_block ::= try compound_statement <openscope-ast> handler_seq + // + case 510: { action.builder. + consumeStatementTryBlock(); break; + } + + // + // Rule 513: handler ::= catch ( exception_declaration ) compound_statement + // + case 513: { action.builder. + consumeStatementCatchHandler(false); break; + } + + // + // Rule 514: handler ::= catch ( ... ) compound_statement + // + case 514: { 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 + // + case 516: { action.builder. + consumeDeclarationSimple(true); break; + } + + // + // Rule 517: exception_declaration ::= type_specifier_seq + // + case 517: { action.builder. + consumeDeclarationSimple(false); break; + } + + default: + break; + } + return; + } } |