chapi.ast.antlr.CPP14Parser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chapi-ast-cpp Show documentation
Show all versions of chapi-ast-cpp Show documentation
Chapi is A common language meta information convertor, convert different languages to same meta-data model
The newest version!
// Generated from CPP14Parser.g4 by ANTLR 4.13.1
package chapi.ast.antlr;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
public class CPP14Parser extends CPP14ParserBase {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
IntegerLiteral=1, CharacterLiteral=2, FloatingLiteral=3, StringLiteral=4,
BooleanLiteral=5, PointerLiteral=6, UserDefinedLiteral=7, MultiLineMacro=8,
Directive=9, Alignas=10, Alignof=11, Asm=12, Auto=13, Bool=14, Break=15,
Case=16, Catch=17, Char=18, Char16=19, Char32=20, Class=21, Const=22,
Constexpr=23, Const_cast=24, Continue=25, Decltype=26, Default=27, Delete=28,
Do=29, Double=30, Dynamic_cast=31, Else=32, Enum=33, Explicit=34, Export=35,
Extern=36, False_=37, Final=38, Float=39, For=40, Friend=41, Goto=42,
If=43, Inline=44, Int=45, Long=46, Mutable=47, Namespace=48, New=49, Noexcept=50,
Nullptr=51, Operator=52, Override=53, Private=54, Protected=55, Public=56,
Register=57, Reinterpret_cast=58, Return=59, Short=60, Signed=61, Sizeof=62,
Static=63, Static_assert=64, Static_cast=65, Struct=66, Switch=67, Template=68,
This=69, Thread_local=70, Throw=71, True_=72, Try=73, Typedef=74, Typeid_=75,
Typename_=76, Union=77, Unsigned=78, Using=79, Virtual=80, Void=81, Volatile=82,
Wchar=83, While=84, LeftParen=85, RightParen=86, LeftBracket=87, RightBracket=88,
LeftBrace=89, RightBrace=90, Plus=91, Minus=92, Star=93, Div=94, Mod=95,
Caret=96, And=97, Or=98, Tilde=99, Not=100, Assign=101, Less=102, Greater=103,
PlusAssign=104, MinusAssign=105, StarAssign=106, DivAssign=107, ModAssign=108,
XorAssign=109, AndAssign=110, OrAssign=111, LeftShiftAssign=112, RightShiftAssign=113,
Equal=114, NotEqual=115, LessEqual=116, GreaterEqual=117, AndAnd=118,
OrOr=119, PlusPlus=120, MinusMinus=121, Comma=122, ArrowStar=123, Arrow=124,
Question=125, Colon=126, Doublecolon=127, Semi=128, Dot=129, DotStar=130,
Ellipsis=131, Identifier=132, DecimalLiteral=133, OctalLiteral=134, HexadecimalLiteral=135,
BinaryLiteral=136, Integersuffix=137, UserDefinedIntegerLiteral=138, UserDefinedFloatingLiteral=139,
UserDefinedStringLiteral=140, UserDefinedCharacterLiteral=141, Whitespace=142,
Newline=143, BlockComment=144, LineComment=145;
public static final int
RULE_translationUnit = 0, RULE_primaryExpression = 1, RULE_idExpression = 2,
RULE_unqualifiedId = 3, RULE_qualifiedId = 4, RULE_nestedNameSpecifier = 5,
RULE_lambdaExpression = 6, RULE_lambdaIntroducer = 7, RULE_lambdaCapture = 8,
RULE_captureDefault = 9, RULE_captureList = 10, RULE_capture = 11, RULE_simpleCapture = 12,
RULE_initcapture = 13, RULE_lambdaDeclarator = 14, RULE_postfixExpression = 15,
RULE_typeIdOfTheTypeId = 16, RULE_expressionList = 17, RULE_pseudoDestructorName = 18,
RULE_unaryExpression = 19, RULE_unaryOperator = 20, RULE_newExpression_ = 21,
RULE_newPlacement = 22, RULE_newTypeId = 23, RULE_newDeclarator_ = 24,
RULE_noPointerNewDeclarator = 25, RULE_newInitializer_ = 26, RULE_deleteExpression = 27,
RULE_noExceptExpression = 28, RULE_castExpression = 29, RULE_pointerMemberExpression = 30,
RULE_multiplicativeExpression = 31, RULE_additiveExpression = 32, RULE_shiftExpression = 33,
RULE_shiftOperator = 34, RULE_relationalExpression = 35, RULE_equalityExpression = 36,
RULE_andExpression = 37, RULE_exclusiveOrExpression = 38, RULE_inclusiveOrExpression = 39,
RULE_logicalAndExpression = 40, RULE_logicalOrExpression = 41, RULE_conditionalExpression = 42,
RULE_assignmentExpression = 43, RULE_assignmentOperator = 44, RULE_expression = 45,
RULE_constantExpression = 46, RULE_statement = 47, RULE_labeledStatement = 48,
RULE_expressionStatement = 49, RULE_compoundStatement = 50, RULE_statementSeq = 51,
RULE_selectionStatement = 52, RULE_condition = 53, RULE_iterationStatement = 54,
RULE_forInitStatement = 55, RULE_forRangeDeclaration = 56, RULE_forRangeInitializer = 57,
RULE_jumpStatement = 58, RULE_declarationStatement = 59, RULE_declarationseq = 60,
RULE_declaration = 61, RULE_blockDeclaration = 62, RULE_aliasDeclaration = 63,
RULE_simpleDeclaration = 64, RULE_staticAssertDeclaration = 65, RULE_emptyDeclaration_ = 66,
RULE_attributeDeclaration = 67, RULE_declSpecifier = 68, RULE_declSpecifierSeq = 69,
RULE_storageClassSpecifier = 70, RULE_functionSpecifier = 71, RULE_typedefName = 72,
RULE_typeSpecifier = 73, RULE_trailingTypeSpecifier = 74, RULE_typeSpecifierSeq = 75,
RULE_trailingTypeSpecifierSeq = 76, RULE_simpleTypeLengthModifier = 77,
RULE_simpleTypeSignednessModifier = 78, RULE_simpleTypeSpecifier = 79,
RULE_theTypeName = 80, RULE_decltypeSpecifier = 81, RULE_elaboratedTypeSpecifier = 82,
RULE_enumName = 83, RULE_enumSpecifier = 84, RULE_enumHead = 85, RULE_opaqueEnumDeclaration = 86,
RULE_enumkey = 87, RULE_enumbase = 88, RULE_enumeratorList = 89, RULE_enumeratorDefinition = 90,
RULE_enumerator = 91, RULE_namespaceName = 92, RULE_originalNamespaceName = 93,
RULE_namespaceDefinition = 94, RULE_namespaceAlias = 95, RULE_namespaceAliasDefinition = 96,
RULE_qualifiednamespacespecifier = 97, RULE_usingDeclaration = 98, RULE_usingDirective = 99,
RULE_asmDefinition = 100, RULE_linkageSpecification = 101, RULE_attributeSpecifierSeq = 102,
RULE_attributeSpecifier = 103, RULE_alignmentspecifier = 104, RULE_attributeList = 105,
RULE_attribute = 106, RULE_attributeNamespace = 107, RULE_attributeArgumentClause = 108,
RULE_balancedTokenSeq = 109, RULE_balancedtoken = 110, RULE_initDeclaratorList = 111,
RULE_initDeclarator = 112, RULE_declarator = 113, RULE_pointerDeclarator = 114,
RULE_noPointerDeclarator = 115, RULE_parametersAndQualifiers = 116, RULE_trailingReturnType = 117,
RULE_pointerOperator = 118, RULE_cvqualifierseq = 119, RULE_cvQualifier = 120,
RULE_refqualifier = 121, RULE_declaratorid = 122, RULE_theTypeId = 123,
RULE_abstractDeclarator = 124, RULE_pointerAbstractDeclarator = 125, RULE_noPointerAbstractDeclarator = 126,
RULE_abstractPackDeclarator = 127, RULE_noPointerAbstractPackDeclarator = 128,
RULE_parameterDeclarationClause = 129, RULE_parameterDeclarationList = 130,
RULE_parameterDeclaration = 131, RULE_functionDefinition = 132, RULE_functionBody = 133,
RULE_initializer = 134, RULE_braceOrEqualInitializer = 135, RULE_initializerClause = 136,
RULE_initializerList = 137, RULE_bracedInitList = 138, RULE_className = 139,
RULE_classSpecifier = 140, RULE_classHead = 141, RULE_classHeadName = 142,
RULE_classVirtSpecifier = 143, RULE_classKey = 144, RULE_memberSpecification = 145,
RULE_memberdeclaration = 146, RULE_memberDeclaratorList = 147, RULE_memberDeclarator = 148,
RULE_virtualSpecifierSeq = 149, RULE_virtualSpecifier = 150, RULE_pureSpecifier = 151,
RULE_baseClause = 152, RULE_baseSpecifierList = 153, RULE_baseSpecifier = 154,
RULE_classOrDeclType = 155, RULE_baseTypeSpecifier = 156, RULE_accessSpecifier = 157,
RULE_conversionFunctionId = 158, RULE_conversionTypeId = 159, RULE_conversionDeclarator = 160,
RULE_constructorInitializer = 161, RULE_memInitializerList = 162, RULE_memInitializer = 163,
RULE_meminitializerid = 164, RULE_operatorFunctionId = 165, RULE_literalOperatorId = 166,
RULE_templateDeclaration = 167, RULE_templateparameterList = 168, RULE_templateParameter = 169,
RULE_typeParameter = 170, RULE_simpleTemplateId = 171, RULE_templateId = 172,
RULE_templateName = 173, RULE_templateArgumentList = 174, RULE_templateArgument = 175,
RULE_typeNameSpecifier = 176, RULE_explicitInstantiation = 177, RULE_explicitSpecialization = 178,
RULE_tryBlock = 179, RULE_functionTryBlock = 180, RULE_handlerSeq = 181,
RULE_handler = 182, RULE_exceptionDeclaration = 183, RULE_throwExpression = 184,
RULE_exceptionSpecification = 185, RULE_dynamicExceptionSpecification = 186,
RULE_typeIdList = 187, RULE_noeExceptSpecification = 188, RULE_theOperator = 189,
RULE_literal = 190;
private static String[] makeRuleNames() {
return new String[] {
"translationUnit", "primaryExpression", "idExpression", "unqualifiedId",
"qualifiedId", "nestedNameSpecifier", "lambdaExpression", "lambdaIntroducer",
"lambdaCapture", "captureDefault", "captureList", "capture", "simpleCapture",
"initcapture", "lambdaDeclarator", "postfixExpression", "typeIdOfTheTypeId",
"expressionList", "pseudoDestructorName", "unaryExpression", "unaryOperator",
"newExpression_", "newPlacement", "newTypeId", "newDeclarator_", "noPointerNewDeclarator",
"newInitializer_", "deleteExpression", "noExceptExpression", "castExpression",
"pointerMemberExpression", "multiplicativeExpression", "additiveExpression",
"shiftExpression", "shiftOperator", "relationalExpression", "equalityExpression",
"andExpression", "exclusiveOrExpression", "inclusiveOrExpression", "logicalAndExpression",
"logicalOrExpression", "conditionalExpression", "assignmentExpression",
"assignmentOperator", "expression", "constantExpression", "statement",
"labeledStatement", "expressionStatement", "compoundStatement", "statementSeq",
"selectionStatement", "condition", "iterationStatement", "forInitStatement",
"forRangeDeclaration", "forRangeInitializer", "jumpStatement", "declarationStatement",
"declarationseq", "declaration", "blockDeclaration", "aliasDeclaration",
"simpleDeclaration", "staticAssertDeclaration", "emptyDeclaration_",
"attributeDeclaration", "declSpecifier", "declSpecifierSeq", "storageClassSpecifier",
"functionSpecifier", "typedefName", "typeSpecifier", "trailingTypeSpecifier",
"typeSpecifierSeq", "trailingTypeSpecifierSeq", "simpleTypeLengthModifier",
"simpleTypeSignednessModifier", "simpleTypeSpecifier", "theTypeName",
"decltypeSpecifier", "elaboratedTypeSpecifier", "enumName", "enumSpecifier",
"enumHead", "opaqueEnumDeclaration", "enumkey", "enumbase", "enumeratorList",
"enumeratorDefinition", "enumerator", "namespaceName", "originalNamespaceName",
"namespaceDefinition", "namespaceAlias", "namespaceAliasDefinition",
"qualifiednamespacespecifier", "usingDeclaration", "usingDirective",
"asmDefinition", "linkageSpecification", "attributeSpecifierSeq", "attributeSpecifier",
"alignmentspecifier", "attributeList", "attribute", "attributeNamespace",
"attributeArgumentClause", "balancedTokenSeq", "balancedtoken", "initDeclaratorList",
"initDeclarator", "declarator", "pointerDeclarator", "noPointerDeclarator",
"parametersAndQualifiers", "trailingReturnType", "pointerOperator", "cvqualifierseq",
"cvQualifier", "refqualifier", "declaratorid", "theTypeId", "abstractDeclarator",
"pointerAbstractDeclarator", "noPointerAbstractDeclarator", "abstractPackDeclarator",
"noPointerAbstractPackDeclarator", "parameterDeclarationClause", "parameterDeclarationList",
"parameterDeclaration", "functionDefinition", "functionBody", "initializer",
"braceOrEqualInitializer", "initializerClause", "initializerList", "bracedInitList",
"className", "classSpecifier", "classHead", "classHeadName", "classVirtSpecifier",
"classKey", "memberSpecification", "memberdeclaration", "memberDeclaratorList",
"memberDeclarator", "virtualSpecifierSeq", "virtualSpecifier", "pureSpecifier",
"baseClause", "baseSpecifierList", "baseSpecifier", "classOrDeclType",
"baseTypeSpecifier", "accessSpecifier", "conversionFunctionId", "conversionTypeId",
"conversionDeclarator", "constructorInitializer", "memInitializerList",
"memInitializer", "meminitializerid", "operatorFunctionId", "literalOperatorId",
"templateDeclaration", "templateparameterList", "templateParameter",
"typeParameter", "simpleTemplateId", "templateId", "templateName", "templateArgumentList",
"templateArgument", "typeNameSpecifier", "explicitInstantiation", "explicitSpecialization",
"tryBlock", "functionTryBlock", "handlerSeq", "handler", "exceptionDeclaration",
"throwExpression", "exceptionSpecification", "dynamicExceptionSpecification",
"typeIdList", "noeExceptSpecification", "theOperator", "literal"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, "'alignas'",
"'alignof'", "'asm'", "'auto'", "'bool'", "'break'", "'case'", "'catch'",
"'char'", "'char16_t'", "'char32_t'", "'class'", "'const'", "'constexpr'",
"'const_cast'", "'continue'", "'decltype'", "'default'", "'delete'",
"'do'", "'double'", "'dynamic_cast'", "'else'", "'enum'", "'explicit'",
"'export'", "'extern'", "'false'", "'final'", "'float'", "'for'", "'friend'",
"'goto'", "'if'", "'inline'", "'int'", "'long'", "'mutable'", "'namespace'",
"'new'", "'noexcept'", "'nullptr'", "'operator'", "'override'", "'private'",
"'protected'", "'public'", "'register'", "'reinterpret_cast'", "'return'",
"'short'", "'signed'", "'sizeof'", "'static'", "'static_assert'", "'static_cast'",
"'struct'", "'switch'", "'template'", "'this'", "'thread_local'", "'throw'",
"'true'", "'try'", "'typedef'", "'typeid'", "'typename'", "'union'",
"'unsigned'", "'using'", "'virtual'", "'void'", "'volatile'", "'wchar_t'",
"'while'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'+'", "'-'", "'*'",
"'/'", "'%'", "'^'", "'&'", "'|'", "'~'", null, "'='", "'<'", "'>'",
"'+='", "'-='", "'*='", "'/='", "'%='", "'^='", "'&='", "'|='", "'<<='",
"'>>='", "'=='", "'!='", "'<='", "'>='", null, null, "'++'", "'--'",
"','", "'->*'", "'->'", "'?'", "':'", "'::'", "';'", "'.'", "'.*'", "'...'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "IntegerLiteral", "CharacterLiteral", "FloatingLiteral", "StringLiteral",
"BooleanLiteral", "PointerLiteral", "UserDefinedLiteral", "MultiLineMacro",
"Directive", "Alignas", "Alignof", "Asm", "Auto", "Bool", "Break", "Case",
"Catch", "Char", "Char16", "Char32", "Class", "Const", "Constexpr", "Const_cast",
"Continue", "Decltype", "Default", "Delete", "Do", "Double", "Dynamic_cast",
"Else", "Enum", "Explicit", "Export", "Extern", "False_", "Final", "Float",
"For", "Friend", "Goto", "If", "Inline", "Int", "Long", "Mutable", "Namespace",
"New", "Noexcept", "Nullptr", "Operator", "Override", "Private", "Protected",
"Public", "Register", "Reinterpret_cast", "Return", "Short", "Signed",
"Sizeof", "Static", "Static_assert", "Static_cast", "Struct", "Switch",
"Template", "This", "Thread_local", "Throw", "True_", "Try", "Typedef",
"Typeid_", "Typename_", "Union", "Unsigned", "Using", "Virtual", "Void",
"Volatile", "Wchar", "While", "LeftParen", "RightParen", "LeftBracket",
"RightBracket", "LeftBrace", "RightBrace", "Plus", "Minus", "Star", "Div",
"Mod", "Caret", "And", "Or", "Tilde", "Not", "Assign", "Less", "Greater",
"PlusAssign", "MinusAssign", "StarAssign", "DivAssign", "ModAssign",
"XorAssign", "AndAssign", "OrAssign", "LeftShiftAssign", "RightShiftAssign",
"Equal", "NotEqual", "LessEqual", "GreaterEqual", "AndAnd", "OrOr", "PlusPlus",
"MinusMinus", "Comma", "ArrowStar", "Arrow", "Question", "Colon", "Doublecolon",
"Semi", "Dot", "DotStar", "Ellipsis", "Identifier", "DecimalLiteral",
"OctalLiteral", "HexadecimalLiteral", "BinaryLiteral", "Integersuffix",
"UserDefinedIntegerLiteral", "UserDefinedFloatingLiteral", "UserDefinedStringLiteral",
"UserDefinedCharacterLiteral", "Whitespace", "Newline", "BlockComment",
"LineComment"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "CPP14Parser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public CPP14Parser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@SuppressWarnings("CheckReturnValue")
public static class TranslationUnitContext extends ParserRuleContext {
public TerminalNode EOF() { return getToken(CPP14Parser.EOF, 0); }
public DeclarationseqContext declarationseq() {
return getRuleContext(DeclarationseqContext.class,0);
}
public TranslationUnitContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_translationUnit; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTranslationUnit(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTranslationUnit(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTranslationUnit(this);
else return visitor.visitChildren(this);
}
}
public final TranslationUnitContext translationUnit() throws RecognitionException {
TranslationUnitContext _localctx = new TranslationUnitContext(_ctx, getState());
enterRule(_localctx, 0, RULE_translationUnit);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(383);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543754443169808157L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 459384754220313597L) != 0)) {
{
setState(382);
declarationseq();
}
}
setState(385);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PrimaryExpressionContext extends ParserRuleContext {
public List literal() {
return getRuleContexts(LiteralContext.class);
}
public LiteralContext literal(int i) {
return getRuleContext(LiteralContext.class,i);
}
public TerminalNode This() { return getToken(CPP14Parser.This, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public IdExpressionContext idExpression() {
return getRuleContext(IdExpressionContext.class,0);
}
public LambdaExpressionContext lambdaExpression() {
return getRuleContext(LambdaExpressionContext.class,0);
}
public PrimaryExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPrimaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPrimaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPrimaryExpression(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryExpressionContext primaryExpression() throws RecognitionException {
PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, getState());
enterRule(_localctx, 2, RULE_primaryExpression);
try {
int _alt;
setState(399);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
enterOuterAlt(_localctx, 1);
{
setState(388);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(387);
literal();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(390);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,1,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
break;
case This:
enterOuterAlt(_localctx, 2);
{
setState(392);
match(This);
}
break;
case LeftParen:
enterOuterAlt(_localctx, 3);
{
setState(393);
match(LeftParen);
setState(394);
expression();
setState(395);
match(RightParen);
}
break;
case Decltype:
case Operator:
case Tilde:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 4);
{
setState(397);
idExpression();
}
break;
case LeftBracket:
enterOuterAlt(_localctx, 5);
{
setState(398);
lambdaExpression();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IdExpressionContext extends ParserRuleContext {
public UnqualifiedIdContext unqualifiedId() {
return getRuleContext(UnqualifiedIdContext.class,0);
}
public QualifiedIdContext qualifiedId() {
return getRuleContext(QualifiedIdContext.class,0);
}
public IdExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_idExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterIdExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitIdExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitIdExpression(this);
else return visitor.visitChildren(this);
}
}
public final IdExpressionContext idExpression() throws RecognitionException {
IdExpressionContext _localctx = new IdExpressionContext(_ctx, getState());
enterRule(_localctx, 4, RULE_idExpression);
try {
setState(403);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(401);
unqualifiedId();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(402);
qualifiedId();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class UnqualifiedIdContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public OperatorFunctionIdContext operatorFunctionId() {
return getRuleContext(OperatorFunctionIdContext.class,0);
}
public ConversionFunctionIdContext conversionFunctionId() {
return getRuleContext(ConversionFunctionIdContext.class,0);
}
public LiteralOperatorIdContext literalOperatorId() {
return getRuleContext(LiteralOperatorIdContext.class,0);
}
public TerminalNode Tilde() { return getToken(CPP14Parser.Tilde, 0); }
public ClassNameContext className() {
return getRuleContext(ClassNameContext.class,0);
}
public DecltypeSpecifierContext decltypeSpecifier() {
return getRuleContext(DecltypeSpecifierContext.class,0);
}
public TemplateIdContext templateId() {
return getRuleContext(TemplateIdContext.class,0);
}
public UnqualifiedIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unqualifiedId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterUnqualifiedId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitUnqualifiedId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitUnqualifiedId(this);
else return visitor.visitChildren(this);
}
}
public final UnqualifiedIdContext unqualifiedId() throws RecognitionException {
UnqualifiedIdContext _localctx = new UnqualifiedIdContext(_ctx, getState());
enterRule(_localctx, 6, RULE_unqualifiedId);
try {
setState(415);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(405);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(406);
operatorFunctionId();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(407);
conversionFunctionId();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(408);
literalOperatorId();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(409);
match(Tilde);
setState(412);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Identifier:
{
setState(410);
className();
}
break;
case Decltype:
{
setState(411);
decltypeSpecifier();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(414);
templateId();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class QualifiedIdContext extends ParserRuleContext {
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public UnqualifiedIdContext unqualifiedId() {
return getRuleContext(UnqualifiedIdContext.class,0);
}
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public QualifiedIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_qualifiedId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterQualifiedId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitQualifiedId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitQualifiedId(this);
else return visitor.visitChildren(this);
}
}
public final QualifiedIdContext qualifiedId() throws RecognitionException {
QualifiedIdContext _localctx = new QualifiedIdContext(_ctx, getState());
enterRule(_localctx, 8, RULE_qualifiedId);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(417);
nestedNameSpecifier(0);
setState(419);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Template) {
{
setState(418);
match(Template);
}
}
setState(421);
unqualifiedId();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NestedNameSpecifierContext extends ParserRuleContext {
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public TheTypeNameContext theTypeName() {
return getRuleContext(TheTypeNameContext.class,0);
}
public NamespaceNameContext namespaceName() {
return getRuleContext(NamespaceNameContext.class,0);
}
public DecltypeSpecifierContext decltypeSpecifier() {
return getRuleContext(DecltypeSpecifierContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public NestedNameSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_nestedNameSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNestedNameSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNestedNameSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNestedNameSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final NestedNameSpecifierContext nestedNameSpecifier() throws RecognitionException {
return nestedNameSpecifier(0);
}
private NestedNameSpecifierContext nestedNameSpecifier(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NestedNameSpecifierContext _localctx = new NestedNameSpecifierContext(_ctx, _parentState);
NestedNameSpecifierContext _prevctx = _localctx;
int _startState = 10;
enterRecursionRule(_localctx, 10, RULE_nestedNameSpecifier, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(427);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
{
setState(424);
theTypeName();
}
break;
case 2:
{
setState(425);
namespaceName();
}
break;
case 3:
{
setState(426);
decltypeSpecifier();
}
break;
}
setState(429);
match(Doublecolon);
}
_ctx.stop = _input.LT(-1);
setState(442);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new NestedNameSpecifierContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_nestedNameSpecifier);
setState(431);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(437);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
{
setState(432);
match(Identifier);
}
break;
case 2:
{
setState(434);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Template) {
{
setState(433);
match(Template);
}
}
setState(436);
simpleTemplateId();
}
break;
}
setState(439);
match(Doublecolon);
}
}
}
setState(444);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,10,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LambdaExpressionContext extends ParserRuleContext {
public LambdaIntroducerContext lambdaIntroducer() {
return getRuleContext(LambdaIntroducerContext.class,0);
}
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public LambdaDeclaratorContext lambdaDeclarator() {
return getRuleContext(LambdaDeclaratorContext.class,0);
}
public LambdaExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lambdaExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLambdaExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLambdaExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLambdaExpression(this);
else return visitor.visitChildren(this);
}
}
public final LambdaExpressionContext lambdaExpression() throws RecognitionException {
LambdaExpressionContext _localctx = new LambdaExpressionContext(_ctx, getState());
enterRule(_localctx, 12, RULE_lambdaExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(445);
lambdaIntroducer();
setState(447);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LeftParen) {
{
setState(446);
lambdaDeclarator();
}
}
setState(449);
compoundStatement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LambdaIntroducerContext extends ParserRuleContext {
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public LambdaCaptureContext lambdaCapture() {
return getRuleContext(LambdaCaptureContext.class,0);
}
public LambdaIntroducerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lambdaIntroducer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLambdaIntroducer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLambdaIntroducer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLambdaIntroducer(this);
else return visitor.visitChildren(this);
}
}
public final LambdaIntroducerContext lambdaIntroducer() throws RecognitionException {
LambdaIntroducerContext _localctx = new LambdaIntroducerContext(_ctx, getState());
enterRule(_localctx, 14, RULE_lambdaIntroducer);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(451);
match(LeftBracket);
setState(453);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 69)) & ~0x3f) == 0 && ((1L << (_la - 69)) & -9223372032291373055L) != 0)) {
{
setState(452);
lambdaCapture();
}
}
setState(455);
match(RightBracket);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LambdaCaptureContext extends ParserRuleContext {
public CaptureListContext captureList() {
return getRuleContext(CaptureListContext.class,0);
}
public CaptureDefaultContext captureDefault() {
return getRuleContext(CaptureDefaultContext.class,0);
}
public TerminalNode Comma() { return getToken(CPP14Parser.Comma, 0); }
public LambdaCaptureContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lambdaCapture; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLambdaCapture(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLambdaCapture(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLambdaCapture(this);
else return visitor.visitChildren(this);
}
}
public final LambdaCaptureContext lambdaCapture() throws RecognitionException {
LambdaCaptureContext _localctx = new LambdaCaptureContext(_ctx, getState());
enterRule(_localctx, 16, RULE_lambdaCapture);
int _la;
try {
setState(463);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(457);
captureList();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(458);
captureDefault();
setState(461);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Comma) {
{
setState(459);
match(Comma);
setState(460);
captureList();
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CaptureDefaultContext extends ParserRuleContext {
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public CaptureDefaultContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_captureDefault; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCaptureDefault(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCaptureDefault(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCaptureDefault(this);
else return visitor.visitChildren(this);
}
}
public final CaptureDefaultContext captureDefault() throws RecognitionException {
CaptureDefaultContext _localctx = new CaptureDefaultContext(_ctx, getState());
enterRule(_localctx, 18, RULE_captureDefault);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(465);
_la = _input.LA(1);
if ( !(_la==And || _la==Assign) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CaptureListContext extends ParserRuleContext {
public List capture() {
return getRuleContexts(CaptureContext.class);
}
public CaptureContext capture(int i) {
return getRuleContext(CaptureContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public CaptureListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_captureList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCaptureList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCaptureList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCaptureList(this);
else return visitor.visitChildren(this);
}
}
public final CaptureListContext captureList() throws RecognitionException {
CaptureListContext _localctx = new CaptureListContext(_ctx, getState());
enterRule(_localctx, 20, RULE_captureList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(467);
capture();
setState(472);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(468);
match(Comma);
setState(469);
capture();
}
}
setState(474);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(476);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(475);
match(Ellipsis);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CaptureContext extends ParserRuleContext {
public SimpleCaptureContext simpleCapture() {
return getRuleContext(SimpleCaptureContext.class,0);
}
public InitcaptureContext initcapture() {
return getRuleContext(InitcaptureContext.class,0);
}
public CaptureContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_capture; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCapture(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCapture(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCapture(this);
else return visitor.visitChildren(this);
}
}
public final CaptureContext capture() throws RecognitionException {
CaptureContext _localctx = new CaptureContext(_ctx, getState());
enterRule(_localctx, 22, RULE_capture);
try {
setState(480);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(478);
simpleCapture();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(479);
initcapture();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleCaptureContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public TerminalNode This() { return getToken(CPP14Parser.This, 0); }
public SimpleCaptureContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleCapture; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSimpleCapture(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSimpleCapture(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSimpleCapture(this);
else return visitor.visitChildren(this);
}
}
public final SimpleCaptureContext simpleCapture() throws RecognitionException {
SimpleCaptureContext _localctx = new SimpleCaptureContext(_ctx, getState());
enterRule(_localctx, 24, RULE_simpleCapture);
int _la;
try {
setState(487);
_errHandler.sync(this);
switch (_input.LA(1)) {
case And:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(483);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==And) {
{
setState(482);
match(And);
}
}
setState(485);
match(Identifier);
}
break;
case This:
enterOuterAlt(_localctx, 2);
{
setState(486);
match(This);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitcaptureContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public InitializerContext initializer() {
return getRuleContext(InitializerContext.class,0);
}
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public InitcaptureContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initcapture; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitcapture(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitcapture(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitcapture(this);
else return visitor.visitChildren(this);
}
}
public final InitcaptureContext initcapture() throws RecognitionException {
InitcaptureContext _localctx = new InitcaptureContext(_ctx, getState());
enterRule(_localctx, 26, RULE_initcapture);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(490);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==And) {
{
setState(489);
match(And);
}
}
setState(492);
match(Identifier);
setState(493);
initializer();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LambdaDeclaratorContext extends ParserRuleContext {
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public ParameterDeclarationClauseContext parameterDeclarationClause() {
return getRuleContext(ParameterDeclarationClauseContext.class,0);
}
public TerminalNode Mutable() { return getToken(CPP14Parser.Mutable, 0); }
public ExceptionSpecificationContext exceptionSpecification() {
return getRuleContext(ExceptionSpecificationContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TrailingReturnTypeContext trailingReturnType() {
return getRuleContext(TrailingReturnTypeContext.class,0);
}
public LambdaDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lambdaDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLambdaDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLambdaDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLambdaDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final LambdaDeclaratorContext lambdaDeclarator() throws RecognitionException {
LambdaDeclaratorContext _localctx = new LambdaDeclaratorContext(_ctx, getState());
enterRule(_localctx, 28, RULE_lambdaDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(495);
match(LeftParen);
setState(497);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1237504995584196377L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 297237575406461917L) != 0)) {
{
setState(496);
parameterDeclarationClause();
}
}
setState(499);
match(RightParen);
setState(501);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Mutable) {
{
setState(500);
match(Mutable);
}
}
setState(504);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Noexcept || _la==Throw) {
{
setState(503);
exceptionSpecification();
}
}
setState(507);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(506);
attributeSpecifierSeq();
}
}
setState(510);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Arrow) {
{
setState(509);
trailingReturnType();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PostfixExpressionContext extends ParserRuleContext {
public PrimaryExpressionContext primaryExpression() {
return getRuleContext(PrimaryExpressionContext.class,0);
}
public SimpleTypeSpecifierContext simpleTypeSpecifier() {
return getRuleContext(SimpleTypeSpecifierContext.class,0);
}
public TypeNameSpecifierContext typeNameSpecifier() {
return getRuleContext(TypeNameSpecifierContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public ExpressionListContext expressionList() {
return getRuleContext(ExpressionListContext.class,0);
}
public TerminalNode Less() { return getToken(CPP14Parser.Less, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public TerminalNode Greater() { return getToken(CPP14Parser.Greater, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode Dynamic_cast() { return getToken(CPP14Parser.Dynamic_cast, 0); }
public TerminalNode Static_cast() { return getToken(CPP14Parser.Static_cast, 0); }
public TerminalNode Reinterpret_cast() { return getToken(CPP14Parser.Reinterpret_cast, 0); }
public TerminalNode Const_cast() { return getToken(CPP14Parser.Const_cast, 0); }
public TypeIdOfTheTypeIdContext typeIdOfTheTypeId() {
return getRuleContext(TypeIdOfTheTypeIdContext.class,0);
}
public PostfixExpressionContext postfixExpression() {
return getRuleContext(PostfixExpressionContext.class,0);
}
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public TerminalNode Dot() { return getToken(CPP14Parser.Dot, 0); }
public TerminalNode Arrow() { return getToken(CPP14Parser.Arrow, 0); }
public IdExpressionContext idExpression() {
return getRuleContext(IdExpressionContext.class,0);
}
public PseudoDestructorNameContext pseudoDestructorName() {
return getRuleContext(PseudoDestructorNameContext.class,0);
}
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public TerminalNode PlusPlus() { return getToken(CPP14Parser.PlusPlus, 0); }
public TerminalNode MinusMinus() { return getToken(CPP14Parser.MinusMinus, 0); }
public PostfixExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_postfixExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPostfixExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPostfixExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPostfixExpression(this);
else return visitor.visitChildren(this);
}
}
public final PostfixExpressionContext postfixExpression() throws RecognitionException {
return postfixExpression(0);
}
private PostfixExpressionContext postfixExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PostfixExpressionContext _localctx = new PostfixExpressionContext(_ctx, _parentState);
PostfixExpressionContext _prevctx = _localctx;
int _startState = 30;
enterRecursionRule(_localctx, 30, RULE_postfixExpression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(542);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
case 1:
{
setState(513);
primaryExpression();
}
break;
case 2:
{
setState(516);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Decltype:
case Double:
case Float:
case Int:
case Long:
case Short:
case Signed:
case Unsigned:
case Void:
case Wchar:
case Doublecolon:
case Identifier:
{
setState(514);
simpleTypeSpecifier();
}
break;
case Typename_:
{
setState(515);
typeNameSpecifier();
}
break;
default:
throw new NoViableAltException(this);
}
setState(524);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
{
setState(518);
match(LeftParen);
setState(520);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474400910417L) != 0) || _la==Identifier) {
{
setState(519);
expressionList();
}
}
setState(522);
match(RightParen);
}
break;
case LeftBrace:
{
setState(523);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
case 3:
{
setState(526);
_la = _input.LA(1);
if ( !(((((_la - 24)) & ~0x3f) == 0 && ((1L << (_la - 24)) & 2216203124865L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(527);
match(Less);
setState(528);
theTypeId();
setState(529);
match(Greater);
setState(530);
match(LeftParen);
setState(531);
expression();
setState(532);
match(RightParen);
}
break;
case 4:
{
setState(534);
typeIdOfTheTypeId();
setState(535);
match(LeftParen);
setState(538);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
case 1:
{
setState(536);
expression();
}
break;
case 2:
{
setState(537);
theTypeId();
}
break;
}
setState(540);
match(RightParen);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(571);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,36,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(569);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
_localctx = new PostfixExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression);
setState(544);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(545);
match(LeftBracket);
setState(548);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case Alignof:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Const_cast:
case Decltype:
case Delete:
case Double:
case Dynamic_cast:
case Float:
case Int:
case Long:
case New:
case Noexcept:
case Operator:
case Reinterpret_cast:
case Short:
case Signed:
case Sizeof:
case Static_cast:
case This:
case Throw:
case Typeid_:
case Typename_:
case Unsigned:
case Void:
case Wchar:
case LeftParen:
case LeftBracket:
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
case PlusPlus:
case MinusMinus:
case Doublecolon:
case Identifier:
{
setState(546);
expression();
}
break;
case LeftBrace:
{
setState(547);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
setState(550);
match(RightBracket);
}
break;
case 2:
{
_localctx = new PostfixExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression);
setState(552);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(553);
match(LeftParen);
setState(555);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474400910417L) != 0) || _la==Identifier) {
{
setState(554);
expressionList();
}
}
setState(557);
match(RightParen);
}
break;
case 3:
{
_localctx = new PostfixExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression);
setState(558);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(559);
_la = _input.LA(1);
if ( !(_la==Arrow || _la==Dot) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(565);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
case 1:
{
setState(561);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Template) {
{
setState(560);
match(Template);
}
}
setState(563);
idExpression();
}
break;
case 2:
{
setState(564);
pseudoDestructorName();
}
break;
}
}
break;
case 4:
{
_localctx = new PostfixExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression);
setState(567);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(568);
_la = _input.LA(1);
if ( !(_la==PlusPlus || _la==MinusMinus) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
}
}
}
setState(573);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,36,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TypeIdOfTheTypeIdContext extends ParserRuleContext {
public TerminalNode Typeid_() { return getToken(CPP14Parser.Typeid_, 0); }
public TypeIdOfTheTypeIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeIdOfTheTypeId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTypeIdOfTheTypeId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTypeIdOfTheTypeId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTypeIdOfTheTypeId(this);
else return visitor.visitChildren(this);
}
}
public final TypeIdOfTheTypeIdContext typeIdOfTheTypeId() throws RecognitionException {
TypeIdOfTheTypeIdContext _localctx = new TypeIdOfTheTypeIdContext(_ctx, getState());
enterRule(_localctx, 32, RULE_typeIdOfTheTypeId);
try {
enterOuterAlt(_localctx, 1);
{
setState(574);
match(Typeid_);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExpressionListContext extends ParserRuleContext {
public InitializerListContext initializerList() {
return getRuleContext(InitializerListContext.class,0);
}
public ExpressionListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressionList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterExpressionList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitExpressionList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitExpressionList(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionListContext expressionList() throws RecognitionException {
ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState());
enterRule(_localctx, 34, RULE_expressionList);
try {
enterOuterAlt(_localctx, 1);
{
setState(576);
initializerList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PseudoDestructorNameContext extends ParserRuleContext {
public TerminalNode Tilde() { return getToken(CPP14Parser.Tilde, 0); }
public List theTypeName() {
return getRuleContexts(TheTypeNameContext.class);
}
public TheTypeNameContext theTypeName(int i) {
return getRuleContext(TheTypeNameContext.class,i);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public DecltypeSpecifierContext decltypeSpecifier() {
return getRuleContext(DecltypeSpecifierContext.class,0);
}
public PseudoDestructorNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pseudoDestructorName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPseudoDestructorName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPseudoDestructorName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPseudoDestructorName(this);
else return visitor.visitChildren(this);
}
}
public final PseudoDestructorNameContext pseudoDestructorName() throws RecognitionException {
PseudoDestructorNameContext _localctx = new PseudoDestructorNameContext(_ctx, getState());
enterRule(_localctx, 36, RULE_pseudoDestructorName);
int _la;
try {
setState(597);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(579);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
{
setState(578);
nestedNameSpecifier(0);
}
break;
}
setState(584);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(581);
theTypeName();
setState(582);
match(Doublecolon);
}
}
setState(586);
match(Tilde);
setState(587);
theTypeName();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(588);
nestedNameSpecifier(0);
setState(589);
match(Template);
setState(590);
simpleTemplateId();
setState(591);
match(Doublecolon);
setState(592);
match(Tilde);
setState(593);
theTypeName();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(595);
match(Tilde);
setState(596);
decltypeSpecifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class UnaryExpressionContext extends ParserRuleContext {
public PostfixExpressionContext postfixExpression() {
return getRuleContext(PostfixExpressionContext.class,0);
}
public UnaryExpressionContext unaryExpression() {
return getRuleContext(UnaryExpressionContext.class,0);
}
public TerminalNode PlusPlus() { return getToken(CPP14Parser.PlusPlus, 0); }
public TerminalNode MinusMinus() { return getToken(CPP14Parser.MinusMinus, 0); }
public UnaryOperatorContext unaryOperator() {
return getRuleContext(UnaryOperatorContext.class,0);
}
public TerminalNode Sizeof() { return getToken(CPP14Parser.Sizeof, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode Alignof() { return getToken(CPP14Parser.Alignof, 0); }
public NoExceptExpressionContext noExceptExpression() {
return getRuleContext(NoExceptExpressionContext.class,0);
}
public NewExpression_Context newExpression_() {
return getRuleContext(NewExpression_Context.class,0);
}
public DeleteExpressionContext deleteExpression() {
return getRuleContext(DeleteExpressionContext.class,0);
}
public UnaryExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterUnaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitUnaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitUnaryExpression(this);
else return visitor.visitChildren(this);
}
}
public final UnaryExpressionContext unaryExpression() throws RecognitionException {
UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
enterRule(_localctx, 38, RULE_unaryExpression);
try {
setState(626);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(599);
postfixExpression(0);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(604);
_errHandler.sync(this);
switch (_input.LA(1)) {
case PlusPlus:
{
setState(600);
match(PlusPlus);
}
break;
case MinusMinus:
{
setState(601);
match(MinusMinus);
}
break;
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
{
setState(602);
unaryOperator();
}
break;
case Sizeof:
{
setState(603);
match(Sizeof);
}
break;
default:
throw new NoViableAltException(this);
}
setState(606);
unaryExpression();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(607);
match(Sizeof);
setState(616);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
{
setState(608);
match(LeftParen);
setState(609);
theTypeId();
setState(610);
match(RightParen);
}
break;
case Ellipsis:
{
setState(612);
match(Ellipsis);
setState(613);
match(LeftParen);
setState(614);
match(Identifier);
setState(615);
match(RightParen);
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(618);
match(Alignof);
setState(619);
match(LeftParen);
setState(620);
theTypeId();
setState(621);
match(RightParen);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(623);
noExceptExpression();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(624);
newExpression_();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(625);
deleteExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class UnaryOperatorContext extends ParserRuleContext {
public TerminalNode Or() { return getToken(CPP14Parser.Or, 0); }
public TerminalNode Star() { return getToken(CPP14Parser.Star, 0); }
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public TerminalNode Plus() { return getToken(CPP14Parser.Plus, 0); }
public TerminalNode Tilde() { return getToken(CPP14Parser.Tilde, 0); }
public TerminalNode Minus() { return getToken(CPP14Parser.Minus, 0); }
public TerminalNode Not() { return getToken(CPP14Parser.Not, 0); }
public UnaryOperatorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unaryOperator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterUnaryOperator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitUnaryOperator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitUnaryOperator(this);
else return visitor.visitChildren(this);
}
}
public final UnaryOperatorContext unaryOperator() throws RecognitionException {
UnaryOperatorContext _localctx = new UnaryOperatorContext(_ctx, getState());
enterRule(_localctx, 40, RULE_unaryOperator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(628);
_la = _input.LA(1);
if ( !(((((_la - 91)) & ~0x3f) == 0 && ((1L << (_la - 91)) & 967L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NewExpression_Context extends ParserRuleContext {
public TerminalNode New() { return getToken(CPP14Parser.New, 0); }
public NewTypeIdContext newTypeId() {
return getRuleContext(NewTypeIdContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public NewPlacementContext newPlacement() {
return getRuleContext(NewPlacementContext.class,0);
}
public NewInitializer_Context newInitializer_() {
return getRuleContext(NewInitializer_Context.class,0);
}
public NewExpression_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_newExpression_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNewExpression_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNewExpression_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNewExpression_(this);
else return visitor.visitChildren(this);
}
}
public final NewExpression_Context newExpression_() throws RecognitionException {
NewExpression_Context _localctx = new NewExpression_Context(_ctx, getState());
enterRule(_localctx, 42, RULE_newExpression_);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(631);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Doublecolon) {
{
setState(630);
match(Doublecolon);
}
}
setState(633);
match(New);
setState(635);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) {
case 1:
{
setState(634);
newPlacement();
}
break;
}
setState(642);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Decltype:
case Double:
case Enum:
case Float:
case Int:
case Long:
case Short:
case Signed:
case Struct:
case Typename_:
case Union:
case Unsigned:
case Void:
case Volatile:
case Wchar:
case Doublecolon:
case Identifier:
{
setState(637);
newTypeId();
}
break;
case LeftParen:
{
setState(638);
match(LeftParen);
setState(639);
theTypeId();
setState(640);
match(RightParen);
}
break;
default:
throw new NoViableAltException(this);
}
setState(645);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LeftParen || _la==LeftBrace) {
{
setState(644);
newInitializer_();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NewPlacementContext extends ParserRuleContext {
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ExpressionListContext expressionList() {
return getRuleContext(ExpressionListContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public NewPlacementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_newPlacement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNewPlacement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNewPlacement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNewPlacement(this);
else return visitor.visitChildren(this);
}
}
public final NewPlacementContext newPlacement() throws RecognitionException {
NewPlacementContext _localctx = new NewPlacementContext(_ctx, getState());
enterRule(_localctx, 44, RULE_newPlacement);
try {
enterOuterAlt(_localctx, 1);
{
setState(647);
match(LeftParen);
setState(648);
expressionList();
setState(649);
match(RightParen);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NewTypeIdContext extends ParserRuleContext {
public TypeSpecifierSeqContext typeSpecifierSeq() {
return getRuleContext(TypeSpecifierSeqContext.class,0);
}
public NewDeclarator_Context newDeclarator_() {
return getRuleContext(NewDeclarator_Context.class,0);
}
public NewTypeIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_newTypeId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNewTypeId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNewTypeId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNewTypeId(this);
else return visitor.visitChildren(this);
}
}
public final NewTypeIdContext newTypeId() throws RecognitionException {
NewTypeIdContext _localctx = new NewTypeIdContext(_ctx, getState());
enterRule(_localctx, 46, RULE_newTypeId);
try {
enterOuterAlt(_localctx, 1);
{
setState(651);
typeSpecifierSeq();
setState(653);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) {
case 1:
{
setState(652);
newDeclarator_();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NewDeclarator_Context extends ParserRuleContext {
public PointerOperatorContext pointerOperator() {
return getRuleContext(PointerOperatorContext.class,0);
}
public NewDeclarator_Context newDeclarator_() {
return getRuleContext(NewDeclarator_Context.class,0);
}
public NoPointerNewDeclaratorContext noPointerNewDeclarator() {
return getRuleContext(NoPointerNewDeclaratorContext.class,0);
}
public NewDeclarator_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_newDeclarator_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNewDeclarator_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNewDeclarator_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNewDeclarator_(this);
else return visitor.visitChildren(this);
}
}
public final NewDeclarator_Context newDeclarator_() throws RecognitionException {
NewDeclarator_Context _localctx = new NewDeclarator_Context(_ctx, getState());
enterRule(_localctx, 48, RULE_newDeclarator_);
try {
setState(660);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Decltype:
case Star:
case And:
case AndAnd:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(655);
pointerOperator();
setState(657);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,48,_ctx) ) {
case 1:
{
setState(656);
newDeclarator_();
}
break;
}
}
break;
case LeftBracket:
enterOuterAlt(_localctx, 2);
{
setState(659);
noPointerNewDeclarator(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NoPointerNewDeclaratorContext extends ParserRuleContext {
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public NoPointerNewDeclaratorContext noPointerNewDeclarator() {
return getRuleContext(NoPointerNewDeclaratorContext.class,0);
}
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public NoPointerNewDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_noPointerNewDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNoPointerNewDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNoPointerNewDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNoPointerNewDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final NoPointerNewDeclaratorContext noPointerNewDeclarator() throws RecognitionException {
return noPointerNewDeclarator(0);
}
private NoPointerNewDeclaratorContext noPointerNewDeclarator(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NoPointerNewDeclaratorContext _localctx = new NoPointerNewDeclaratorContext(_ctx, _parentState);
NoPointerNewDeclaratorContext _prevctx = _localctx;
int _startState = 50;
enterRecursionRule(_localctx, 50, RULE_noPointerNewDeclarator, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(663);
match(LeftBracket);
setState(664);
expression();
setState(665);
match(RightBracket);
setState(667);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
{
setState(666);
attributeSpecifierSeq();
}
break;
}
}
_ctx.stop = _input.LT(-1);
setState(678);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,52,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new NoPointerNewDeclaratorContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_noPointerNewDeclarator);
setState(669);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(670);
match(LeftBracket);
setState(671);
constantExpression();
setState(672);
match(RightBracket);
setState(674);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) {
case 1:
{
setState(673);
attributeSpecifierSeq();
}
break;
}
}
}
}
setState(680);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,52,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NewInitializer_Context extends ParserRuleContext {
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public ExpressionListContext expressionList() {
return getRuleContext(ExpressionListContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public NewInitializer_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_newInitializer_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNewInitializer_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNewInitializer_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNewInitializer_(this);
else return visitor.visitChildren(this);
}
}
public final NewInitializer_Context newInitializer_() throws RecognitionException {
NewInitializer_Context _localctx = new NewInitializer_Context(_ctx, getState());
enterRule(_localctx, 52, RULE_newInitializer_);
int _la;
try {
setState(687);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
enterOuterAlt(_localctx, 1);
{
setState(681);
match(LeftParen);
setState(683);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474400910417L) != 0) || _la==Identifier) {
{
setState(682);
expressionList();
}
}
setState(685);
match(RightParen);
}
break;
case LeftBrace:
enterOuterAlt(_localctx, 2);
{
setState(686);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeleteExpressionContext extends ParserRuleContext {
public TerminalNode Delete() { return getToken(CPP14Parser.Delete, 0); }
public CastExpressionContext castExpression() {
return getRuleContext(CastExpressionContext.class,0);
}
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public DeleteExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_deleteExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeleteExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeleteExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeleteExpression(this);
else return visitor.visitChildren(this);
}
}
public final DeleteExpressionContext deleteExpression() throws RecognitionException {
DeleteExpressionContext _localctx = new DeleteExpressionContext(_ctx, getState());
enterRule(_localctx, 54, RULE_deleteExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(690);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Doublecolon) {
{
setState(689);
match(Doublecolon);
}
}
setState(692);
match(Delete);
setState(695);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) {
case 1:
{
setState(693);
match(LeftBracket);
setState(694);
match(RightBracket);
}
break;
}
setState(697);
castExpression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NoExceptExpressionContext extends ParserRuleContext {
public TerminalNode Noexcept() { return getToken(CPP14Parser.Noexcept, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public NoExceptExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_noExceptExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNoExceptExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNoExceptExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNoExceptExpression(this);
else return visitor.visitChildren(this);
}
}
public final NoExceptExpressionContext noExceptExpression() throws RecognitionException {
NoExceptExpressionContext _localctx = new NoExceptExpressionContext(_ctx, getState());
enterRule(_localctx, 56, RULE_noExceptExpression);
try {
enterOuterAlt(_localctx, 1);
{
setState(699);
match(Noexcept);
setState(700);
match(LeftParen);
setState(701);
expression();
setState(702);
match(RightParen);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CastExpressionContext extends ParserRuleContext {
public UnaryExpressionContext unaryExpression() {
return getRuleContext(UnaryExpressionContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public CastExpressionContext castExpression() {
return getRuleContext(CastExpressionContext.class,0);
}
public CastExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_castExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCastExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCastExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCastExpression(this);
else return visitor.visitChildren(this);
}
}
public final CastExpressionContext castExpression() throws RecognitionException {
CastExpressionContext _localctx = new CastExpressionContext(_ctx, getState());
enterRule(_localctx, 58, RULE_castExpression);
try {
setState(710);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(704);
unaryExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(705);
match(LeftParen);
setState(706);
theTypeId();
setState(707);
match(RightParen);
setState(708);
castExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PointerMemberExpressionContext extends ParserRuleContext {
public List castExpression() {
return getRuleContexts(CastExpressionContext.class);
}
public CastExpressionContext castExpression(int i) {
return getRuleContext(CastExpressionContext.class,i);
}
public List DotStar() { return getTokens(CPP14Parser.DotStar); }
public TerminalNode DotStar(int i) {
return getToken(CPP14Parser.DotStar, i);
}
public List ArrowStar() { return getTokens(CPP14Parser.ArrowStar); }
public TerminalNode ArrowStar(int i) {
return getToken(CPP14Parser.ArrowStar, i);
}
public PointerMemberExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pointerMemberExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPointerMemberExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPointerMemberExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPointerMemberExpression(this);
else return visitor.visitChildren(this);
}
}
public final PointerMemberExpressionContext pointerMemberExpression() throws RecognitionException {
PointerMemberExpressionContext _localctx = new PointerMemberExpressionContext(_ctx, getState());
enterRule(_localctx, 60, RULE_pointerMemberExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(712);
castExpression();
setState(717);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==ArrowStar || _la==DotStar) {
{
{
setState(713);
_la = _input.LA(1);
if ( !(_la==ArrowStar || _la==DotStar) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(714);
castExpression();
}
}
setState(719);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MultiplicativeExpressionContext extends ParserRuleContext {
public List pointerMemberExpression() {
return getRuleContexts(PointerMemberExpressionContext.class);
}
public PointerMemberExpressionContext pointerMemberExpression(int i) {
return getRuleContext(PointerMemberExpressionContext.class,i);
}
public List Star() { return getTokens(CPP14Parser.Star); }
public TerminalNode Star(int i) {
return getToken(CPP14Parser.Star, i);
}
public List Div() { return getTokens(CPP14Parser.Div); }
public TerminalNode Div(int i) {
return getToken(CPP14Parser.Div, i);
}
public List Mod() { return getTokens(CPP14Parser.Mod); }
public TerminalNode Mod(int i) {
return getToken(CPP14Parser.Mod, i);
}
public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiplicativeExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMultiplicativeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMultiplicativeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMultiplicativeExpression(this);
else return visitor.visitChildren(this);
}
}
public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException {
MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, getState());
enterRule(_localctx, 62, RULE_multiplicativeExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(720);
pointerMemberExpression();
setState(725);
_errHandler.sync(this);
_la = _input.LA(1);
while (((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & 7L) != 0)) {
{
{
setState(721);
_la = _input.LA(1);
if ( !(((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & 7L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(722);
pointerMemberExpression();
}
}
setState(727);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AdditiveExpressionContext extends ParserRuleContext {
public List multiplicativeExpression() {
return getRuleContexts(MultiplicativeExpressionContext.class);
}
public MultiplicativeExpressionContext multiplicativeExpression(int i) {
return getRuleContext(MultiplicativeExpressionContext.class,i);
}
public List Plus() { return getTokens(CPP14Parser.Plus); }
public TerminalNode Plus(int i) {
return getToken(CPP14Parser.Plus, i);
}
public List Minus() { return getTokens(CPP14Parser.Minus); }
public TerminalNode Minus(int i) {
return getToken(CPP14Parser.Minus, i);
}
public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_additiveExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAdditiveExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAdditiveExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAdditiveExpression(this);
else return visitor.visitChildren(this);
}
}
public final AdditiveExpressionContext additiveExpression() throws RecognitionException {
AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, getState());
enterRule(_localctx, 64, RULE_additiveExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(728);
multiplicativeExpression();
setState(733);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Plus || _la==Minus) {
{
{
setState(729);
_la = _input.LA(1);
if ( !(_la==Plus || _la==Minus) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(730);
multiplicativeExpression();
}
}
setState(735);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ShiftExpressionContext extends ParserRuleContext {
public List additiveExpression() {
return getRuleContexts(AdditiveExpressionContext.class);
}
public AdditiveExpressionContext additiveExpression(int i) {
return getRuleContext(AdditiveExpressionContext.class,i);
}
public List shiftOperator() {
return getRuleContexts(ShiftOperatorContext.class);
}
public ShiftOperatorContext shiftOperator(int i) {
return getRuleContext(ShiftOperatorContext.class,i);
}
public ShiftExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_shiftExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterShiftExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitShiftExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitShiftExpression(this);
else return visitor.visitChildren(this);
}
}
public final ShiftExpressionContext shiftExpression() throws RecognitionException {
ShiftExpressionContext _localctx = new ShiftExpressionContext(_ctx, getState());
enterRule(_localctx, 66, RULE_shiftExpression);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(736);
additiveExpression();
setState(742);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,61,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(737);
shiftOperator();
setState(738);
additiveExpression();
}
}
}
setState(744);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,61,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ShiftOperatorContext extends ParserRuleContext {
public List Greater() { return getTokens(CPP14Parser.Greater); }
public TerminalNode Greater(int i) {
return getToken(CPP14Parser.Greater, i);
}
public List Less() { return getTokens(CPP14Parser.Less); }
public TerminalNode Less(int i) {
return getToken(CPP14Parser.Less, i);
}
public ShiftOperatorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_shiftOperator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterShiftOperator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitShiftOperator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitShiftOperator(this);
else return visitor.visitChildren(this);
}
}
public final ShiftOperatorContext shiftOperator() throws RecognitionException {
ShiftOperatorContext _localctx = new ShiftOperatorContext(_ctx, getState());
enterRule(_localctx, 68, RULE_shiftOperator);
try {
setState(749);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Greater:
enterOuterAlt(_localctx, 1);
{
setState(745);
match(Greater);
setState(746);
match(Greater);
}
break;
case Less:
enterOuterAlt(_localctx, 2);
{
setState(747);
match(Less);
setState(748);
match(Less);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class RelationalExpressionContext extends ParserRuleContext {
public List shiftExpression() {
return getRuleContexts(ShiftExpressionContext.class);
}
public ShiftExpressionContext shiftExpression(int i) {
return getRuleContext(ShiftExpressionContext.class,i);
}
public List Less() { return getTokens(CPP14Parser.Less); }
public TerminalNode Less(int i) {
return getToken(CPP14Parser.Less, i);
}
public List Greater() { return getTokens(CPP14Parser.Greater); }
public TerminalNode Greater(int i) {
return getToken(CPP14Parser.Greater, i);
}
public List LessEqual() { return getTokens(CPP14Parser.LessEqual); }
public TerminalNode LessEqual(int i) {
return getToken(CPP14Parser.LessEqual, i);
}
public List GreaterEqual() { return getTokens(CPP14Parser.GreaterEqual); }
public TerminalNode GreaterEqual(int i) {
return getToken(CPP14Parser.GreaterEqual, i);
}
public RelationalExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_relationalExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterRelationalExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitRelationalExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitRelationalExpression(this);
else return visitor.visitChildren(this);
}
}
public final RelationalExpressionContext relationalExpression() throws RecognitionException {
RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, getState());
enterRule(_localctx, 70, RULE_relationalExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(751);
shiftExpression();
setState(756);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,63,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(752);
_la = _input.LA(1);
if ( !(((((_la - 102)) & ~0x3f) == 0 && ((1L << (_la - 102)) & 49155L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(753);
shiftExpression();
}
}
}
setState(758);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,63,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EqualityExpressionContext extends ParserRuleContext {
public List relationalExpression() {
return getRuleContexts(RelationalExpressionContext.class);
}
public RelationalExpressionContext relationalExpression(int i) {
return getRuleContext(RelationalExpressionContext.class,i);
}
public List Equal() { return getTokens(CPP14Parser.Equal); }
public TerminalNode Equal(int i) {
return getToken(CPP14Parser.Equal, i);
}
public List NotEqual() { return getTokens(CPP14Parser.NotEqual); }
public TerminalNode NotEqual(int i) {
return getToken(CPP14Parser.NotEqual, i);
}
public EqualityExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_equalityExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEqualityExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEqualityExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEqualityExpression(this);
else return visitor.visitChildren(this);
}
}
public final EqualityExpressionContext equalityExpression() throws RecognitionException {
EqualityExpressionContext _localctx = new EqualityExpressionContext(_ctx, getState());
enterRule(_localctx, 72, RULE_equalityExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(759);
relationalExpression();
setState(764);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Equal || _la==NotEqual) {
{
{
setState(760);
_la = _input.LA(1);
if ( !(_la==Equal || _la==NotEqual) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(761);
relationalExpression();
}
}
setState(766);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AndExpressionContext extends ParserRuleContext {
public List equalityExpression() {
return getRuleContexts(EqualityExpressionContext.class);
}
public EqualityExpressionContext equalityExpression(int i) {
return getRuleContext(EqualityExpressionContext.class,i);
}
public List And() { return getTokens(CPP14Parser.And); }
public TerminalNode And(int i) {
return getToken(CPP14Parser.And, i);
}
public AndExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_andExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAndExpression(this);
else return visitor.visitChildren(this);
}
}
public final AndExpressionContext andExpression() throws RecognitionException {
AndExpressionContext _localctx = new AndExpressionContext(_ctx, getState());
enterRule(_localctx, 74, RULE_andExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(767);
equalityExpression();
setState(772);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==And) {
{
{
setState(768);
match(And);
setState(769);
equalityExpression();
}
}
setState(774);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExclusiveOrExpressionContext extends ParserRuleContext {
public List andExpression() {
return getRuleContexts(AndExpressionContext.class);
}
public AndExpressionContext andExpression(int i) {
return getRuleContext(AndExpressionContext.class,i);
}
public List Caret() { return getTokens(CPP14Parser.Caret); }
public TerminalNode Caret(int i) {
return getToken(CPP14Parser.Caret, i);
}
public ExclusiveOrExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exclusiveOrExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterExclusiveOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitExclusiveOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitExclusiveOrExpression(this);
else return visitor.visitChildren(this);
}
}
public final ExclusiveOrExpressionContext exclusiveOrExpression() throws RecognitionException {
ExclusiveOrExpressionContext _localctx = new ExclusiveOrExpressionContext(_ctx, getState());
enterRule(_localctx, 76, RULE_exclusiveOrExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(775);
andExpression();
setState(780);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Caret) {
{
{
setState(776);
match(Caret);
setState(777);
andExpression();
}
}
setState(782);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InclusiveOrExpressionContext extends ParserRuleContext {
public List exclusiveOrExpression() {
return getRuleContexts(ExclusiveOrExpressionContext.class);
}
public ExclusiveOrExpressionContext exclusiveOrExpression(int i) {
return getRuleContext(ExclusiveOrExpressionContext.class,i);
}
public List Or() { return getTokens(CPP14Parser.Or); }
public TerminalNode Or(int i) {
return getToken(CPP14Parser.Or, i);
}
public InclusiveOrExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_inclusiveOrExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInclusiveOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInclusiveOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInclusiveOrExpression(this);
else return visitor.visitChildren(this);
}
}
public final InclusiveOrExpressionContext inclusiveOrExpression() throws RecognitionException {
InclusiveOrExpressionContext _localctx = new InclusiveOrExpressionContext(_ctx, getState());
enterRule(_localctx, 78, RULE_inclusiveOrExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(783);
exclusiveOrExpression();
setState(788);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Or) {
{
{
setState(784);
match(Or);
setState(785);
exclusiveOrExpression();
}
}
setState(790);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LogicalAndExpressionContext extends ParserRuleContext {
public List inclusiveOrExpression() {
return getRuleContexts(InclusiveOrExpressionContext.class);
}
public InclusiveOrExpressionContext inclusiveOrExpression(int i) {
return getRuleContext(InclusiveOrExpressionContext.class,i);
}
public List AndAnd() { return getTokens(CPP14Parser.AndAnd); }
public TerminalNode AndAnd(int i) {
return getToken(CPP14Parser.AndAnd, i);
}
public LogicalAndExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_logicalAndExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLogicalAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLogicalAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLogicalAndExpression(this);
else return visitor.visitChildren(this);
}
}
public final LogicalAndExpressionContext logicalAndExpression() throws RecognitionException {
LogicalAndExpressionContext _localctx = new LogicalAndExpressionContext(_ctx, getState());
enterRule(_localctx, 80, RULE_logicalAndExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(791);
inclusiveOrExpression();
setState(796);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AndAnd) {
{
{
setState(792);
match(AndAnd);
setState(793);
inclusiveOrExpression();
}
}
setState(798);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LogicalOrExpressionContext extends ParserRuleContext {
public List logicalAndExpression() {
return getRuleContexts(LogicalAndExpressionContext.class);
}
public LogicalAndExpressionContext logicalAndExpression(int i) {
return getRuleContext(LogicalAndExpressionContext.class,i);
}
public List OrOr() { return getTokens(CPP14Parser.OrOr); }
public TerminalNode OrOr(int i) {
return getToken(CPP14Parser.OrOr, i);
}
public LogicalOrExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_logicalOrExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLogicalOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLogicalOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLogicalOrExpression(this);
else return visitor.visitChildren(this);
}
}
public final LogicalOrExpressionContext logicalOrExpression() throws RecognitionException {
LogicalOrExpressionContext _localctx = new LogicalOrExpressionContext(_ctx, getState());
enterRule(_localctx, 82, RULE_logicalOrExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(799);
logicalAndExpression();
setState(804);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==OrOr) {
{
{
setState(800);
match(OrOr);
setState(801);
logicalAndExpression();
}
}
setState(806);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConditionalExpressionContext extends ParserRuleContext {
public LogicalOrExpressionContext logicalOrExpression() {
return getRuleContext(LogicalOrExpressionContext.class,0);
}
public TerminalNode Question() { return getToken(CPP14Parser.Question, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public AssignmentExpressionContext assignmentExpression() {
return getRuleContext(AssignmentExpressionContext.class,0);
}
public ConditionalExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conditionalExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConditionalExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConditionalExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConditionalExpression(this);
else return visitor.visitChildren(this);
}
}
public final ConditionalExpressionContext conditionalExpression() throws RecognitionException {
ConditionalExpressionContext _localctx = new ConditionalExpressionContext(_ctx, getState());
enterRule(_localctx, 84, RULE_conditionalExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(807);
logicalOrExpression();
setState(813);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Question) {
{
setState(808);
match(Question);
setState(809);
expression();
setState(810);
match(Colon);
setState(811);
assignmentExpression();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AssignmentExpressionContext extends ParserRuleContext {
public ConditionalExpressionContext conditionalExpression() {
return getRuleContext(ConditionalExpressionContext.class,0);
}
public LogicalOrExpressionContext logicalOrExpression() {
return getRuleContext(LogicalOrExpressionContext.class,0);
}
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public InitializerClauseContext initializerClause() {
return getRuleContext(InitializerClauseContext.class,0);
}
public ThrowExpressionContext throwExpression() {
return getRuleContext(ThrowExpressionContext.class,0);
}
public AssignmentExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignmentExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public final AssignmentExpressionContext assignmentExpression() throws RecognitionException {
AssignmentExpressionContext _localctx = new AssignmentExpressionContext(_ctx, getState());
enterRule(_localctx, 86, RULE_assignmentExpression);
try {
setState(821);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(815);
conditionalExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(816);
logicalOrExpression();
setState(817);
assignmentOperator();
setState(818);
initializerClause();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(820);
throwExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AssignmentOperatorContext extends ParserRuleContext {
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public TerminalNode StarAssign() { return getToken(CPP14Parser.StarAssign, 0); }
public TerminalNode DivAssign() { return getToken(CPP14Parser.DivAssign, 0); }
public TerminalNode ModAssign() { return getToken(CPP14Parser.ModAssign, 0); }
public TerminalNode PlusAssign() { return getToken(CPP14Parser.PlusAssign, 0); }
public TerminalNode MinusAssign() { return getToken(CPP14Parser.MinusAssign, 0); }
public TerminalNode RightShiftAssign() { return getToken(CPP14Parser.RightShiftAssign, 0); }
public TerminalNode LeftShiftAssign() { return getToken(CPP14Parser.LeftShiftAssign, 0); }
public TerminalNode AndAssign() { return getToken(CPP14Parser.AndAssign, 0); }
public TerminalNode XorAssign() { return getToken(CPP14Parser.XorAssign, 0); }
public TerminalNode OrAssign() { return getToken(CPP14Parser.OrAssign, 0); }
public AssignmentOperatorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignmentOperator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAssignmentOperator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAssignmentOperator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAssignmentOperator(this);
else return visitor.visitChildren(this);
}
}
public final AssignmentOperatorContext assignmentOperator() throws RecognitionException {
AssignmentOperatorContext _localctx = new AssignmentOperatorContext(_ctx, getState());
enterRule(_localctx, 88, RULE_assignmentOperator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(823);
_la = _input.LA(1);
if ( !(((((_la - 101)) & ~0x3f) == 0 && ((1L << (_la - 101)) & 8185L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExpressionContext extends ParserRuleContext {
public List assignmentExpression() {
return getRuleContexts(AssignmentExpressionContext.class);
}
public AssignmentExpressionContext assignmentExpression(int i) {
return getRuleContext(AssignmentExpressionContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public ExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitExpression(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionContext expression() throws RecognitionException {
ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
enterRule(_localctx, 90, RULE_expression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(825);
assignmentExpression();
setState(830);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(826);
match(Comma);
setState(827);
assignmentExpression();
}
}
setState(832);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConstantExpressionContext extends ParserRuleContext {
public ConditionalExpressionContext conditionalExpression() {
return getRuleContext(ConditionalExpressionContext.class,0);
}
public ConstantExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constantExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConstantExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConstantExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConstantExpression(this);
else return visitor.visitChildren(this);
}
}
public final ConstantExpressionContext constantExpression() throws RecognitionException {
ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState());
enterRule(_localctx, 92, RULE_constantExpression);
try {
enterOuterAlt(_localctx, 1);
{
setState(833);
conditionalExpression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class StatementContext extends ParserRuleContext {
public LabeledStatementContext labeledStatement() {
return getRuleContext(LabeledStatementContext.class,0);
}
public DeclarationStatementContext declarationStatement() {
return getRuleContext(DeclarationStatementContext.class,0);
}
public ExpressionStatementContext expressionStatement() {
return getRuleContext(ExpressionStatementContext.class,0);
}
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public SelectionStatementContext selectionStatement() {
return getRuleContext(SelectionStatementContext.class,0);
}
public IterationStatementContext iterationStatement() {
return getRuleContext(IterationStatementContext.class,0);
}
public JumpStatementContext jumpStatement() {
return getRuleContext(JumpStatementContext.class,0);
}
public TryBlockContext tryBlock() {
return getRuleContext(TryBlockContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public StatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitStatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementContext statement() throws RecognitionException {
StatementContext _localctx = new StatementContext(_ctx, getState());
enterRule(_localctx, 94, RULE_statement);
try {
setState(848);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(835);
labeledStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(836);
declarationStatement();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(838);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) {
case 1:
{
setState(837);
attributeSpecifierSeq();
}
break;
}
setState(846);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case Alignof:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Const_cast:
case Decltype:
case Delete:
case Double:
case Dynamic_cast:
case Float:
case Int:
case Long:
case New:
case Noexcept:
case Operator:
case Reinterpret_cast:
case Short:
case Signed:
case Sizeof:
case Static_cast:
case This:
case Throw:
case Typeid_:
case Typename_:
case Unsigned:
case Void:
case Wchar:
case LeftParen:
case LeftBracket:
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
case PlusPlus:
case MinusMinus:
case Doublecolon:
case Semi:
case Identifier:
{
setState(840);
expressionStatement();
}
break;
case LeftBrace:
{
setState(841);
compoundStatement();
}
break;
case If:
case Switch:
{
setState(842);
selectionStatement();
}
break;
case Do:
case For:
case While:
{
setState(843);
iterationStatement();
}
break;
case Break:
case Continue:
case Goto:
case Return:
{
setState(844);
jumpStatement();
}
break;
case Try:
{
setState(845);
tryBlock();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LabeledStatementContext extends ParserRuleContext {
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode Case() { return getToken(CPP14Parser.Case, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public TerminalNode Default() { return getToken(CPP14Parser.Default, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public LabeledStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_labeledStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLabeledStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLabeledStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLabeledStatement(this);
else return visitor.visitChildren(this);
}
}
public final LabeledStatementContext labeledStatement() throws RecognitionException {
LabeledStatementContext _localctx = new LabeledStatementContext(_ctx, getState());
enterRule(_localctx, 96, RULE_labeledStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(851);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(850);
attributeSpecifierSeq();
}
}
setState(857);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Identifier:
{
setState(853);
match(Identifier);
}
break;
case Case:
{
setState(854);
match(Case);
setState(855);
constantExpression();
}
break;
case Default:
{
setState(856);
match(Default);
}
break;
default:
throw new NoViableAltException(this);
}
setState(859);
match(Colon);
setState(860);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ExpressionStatementContext extends ParserRuleContext {
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ExpressionStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressionStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterExpressionStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitExpressionStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitExpressionStatement(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionStatementContext expressionStatement() throws RecognitionException {
ExpressionStatementContext _localctx = new ExpressionStatementContext(_ctx, getState());
enterRule(_localctx, 98, RULE_expressionStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(863);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133201L) != 0) || _la==Identifier) {
{
setState(862);
expression();
}
}
setState(865);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CompoundStatementContext extends ParserRuleContext {
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public StatementSeqContext statementSeq() {
return getRuleContext(StatementSeqContext.class,0);
}
public CompoundStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_compoundStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCompoundStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCompoundStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCompoundStatement(this);
else return visitor.visitChildren(this);
}
}
public final CompoundStatementContext compoundStatement() throws RecognitionException {
CompoundStatementContext _localctx = new CompoundStatementContext(_ctx, getState());
enterRule(_localctx, 100, RULE_compoundStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(867);
match(LeftBrace);
setState(869);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -137360239606498050L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & -8989184726396829969L) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & 25L) != 0)) {
{
setState(868);
statementSeq();
}
}
setState(871);
match(RightBrace);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class StatementSeqContext extends ParserRuleContext {
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
public StatementSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statementSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterStatementSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitStatementSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitStatementSeq(this);
else return visitor.visitChildren(this);
}
}
public final StatementSeqContext statementSeq() throws RecognitionException {
StatementSeqContext _localctx = new StatementSeqContext(_ctx, getState());
enterRule(_localctx, 102, RULE_statementSeq);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(874);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(873);
statement();
}
}
setState(876);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & -137360239606498050L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & -8989184726396829969L) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & 25L) != 0) );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SelectionStatementContext extends ParserRuleContext {
public TerminalNode If() { return getToken(CPP14Parser.If, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ConditionContext condition() {
return getRuleContext(ConditionContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
public TerminalNode Else() { return getToken(CPP14Parser.Else, 0); }
public TerminalNode Switch() { return getToken(CPP14Parser.Switch, 0); }
public SelectionStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_selectionStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSelectionStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSelectionStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSelectionStatement(this);
else return visitor.visitChildren(this);
}
}
public final SelectionStatementContext selectionStatement() throws RecognitionException {
SelectionStatementContext _localctx = new SelectionStatementContext(_ctx, getState());
enterRule(_localctx, 104, RULE_selectionStatement);
try {
setState(893);
_errHandler.sync(this);
switch (_input.LA(1)) {
case If:
enterOuterAlt(_localctx, 1);
{
setState(878);
match(If);
setState(879);
match(LeftParen);
setState(880);
condition();
setState(881);
match(RightParen);
setState(882);
statement();
setState(885);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
{
setState(883);
match(Else);
setState(884);
statement();
}
break;
}
}
break;
case Switch:
enterOuterAlt(_localctx, 2);
{
setState(887);
match(Switch);
setState(888);
match(LeftParen);
setState(889);
condition();
setState(890);
match(RightParen);
setState(891);
statement();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConditionContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public InitializerClauseContext initializerClause() {
return getRuleContext(InitializerClauseContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public ConditionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_condition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCondition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCondition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCondition(this);
else return visitor.visitChildren(this);
}
}
public final ConditionContext condition() throws RecognitionException {
ConditionContext _localctx = new ConditionContext(_ctx, getState());
enterRule(_localctx, 106, RULE_condition);
int _la;
try {
setState(906);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(895);
expression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(897);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(896);
attributeSpecifierSeq();
}
}
setState(899);
declSpecifierSeq();
setState(900);
declarator();
setState(904);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Assign:
{
setState(901);
match(Assign);
setState(902);
initializerClause();
}
break;
case LeftBrace:
{
setState(903);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class IterationStatementContext extends ParserRuleContext {
public TerminalNode While() { return getToken(CPP14Parser.While, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ConditionContext condition() {
return getRuleContext(ConditionContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public TerminalNode Do() { return getToken(CPP14Parser.Do, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public TerminalNode For() { return getToken(CPP14Parser.For, 0); }
public ForInitStatementContext forInitStatement() {
return getRuleContext(ForInitStatementContext.class,0);
}
public ForRangeDeclarationContext forRangeDeclaration() {
return getRuleContext(ForRangeDeclarationContext.class,0);
}
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public ForRangeInitializerContext forRangeInitializer() {
return getRuleContext(ForRangeInitializerContext.class,0);
}
public IterationStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_iterationStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterIterationStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitIterationStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitIterationStatement(this);
else return visitor.visitChildren(this);
}
}
public final IterationStatementContext iterationStatement() throws RecognitionException {
IterationStatementContext _localctx = new IterationStatementContext(_ctx, getState());
enterRule(_localctx, 108, RULE_iterationStatement);
int _la;
try {
setState(941);
_errHandler.sync(this);
switch (_input.LA(1)) {
case While:
enterOuterAlt(_localctx, 1);
{
setState(908);
match(While);
setState(909);
match(LeftParen);
setState(910);
condition();
setState(911);
match(RightParen);
setState(912);
statement();
}
break;
case Do:
enterOuterAlt(_localctx, 2);
{
setState(914);
match(Do);
setState(915);
statement();
setState(916);
match(While);
setState(917);
match(LeftParen);
setState(918);
expression();
setState(919);
match(RightParen);
setState(920);
match(Semi);
}
break;
case For:
enterOuterAlt(_localctx, 3);
{
setState(922);
match(For);
setState(923);
match(LeftParen);
setState(936);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) {
case 1:
{
setState(924);
forInitStatement();
setState(926);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -714116761242538754L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384301683L) != 0) || _la==Identifier) {
{
setState(925);
condition();
}
}
setState(928);
match(Semi);
setState(930);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133201L) != 0) || _la==Identifier) {
{
setState(929);
expression();
}
}
}
break;
case 2:
{
setState(932);
forRangeDeclaration();
setState(933);
match(Colon);
setState(934);
forRangeInitializer();
}
break;
}
setState(938);
match(RightParen);
setState(939);
statement();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ForInitStatementContext extends ParserRuleContext {
public ExpressionStatementContext expressionStatement() {
return getRuleContext(ExpressionStatementContext.class,0);
}
public SimpleDeclarationContext simpleDeclaration() {
return getRuleContext(SimpleDeclarationContext.class,0);
}
public ForInitStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forInitStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterForInitStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitForInitStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitForInitStatement(this);
else return visitor.visitChildren(this);
}
}
public final ForInitStatementContext forInitStatement() throws RecognitionException {
ForInitStatementContext _localctx = new ForInitStatementContext(_ctx, getState());
enterRule(_localctx, 110, RULE_forInitStatement);
try {
setState(945);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(943);
expressionStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(944);
simpleDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ForRangeDeclarationContext extends ParserRuleContext {
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public ForRangeDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forRangeDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterForRangeDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitForRangeDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitForRangeDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ForRangeDeclarationContext forRangeDeclaration() throws RecognitionException {
ForRangeDeclarationContext _localctx = new ForRangeDeclarationContext(_ctx, getState());
enterRule(_localctx, 112, RULE_forRangeDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(948);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(947);
attributeSpecifierSeq();
}
}
setState(950);
declSpecifierSeq();
setState(951);
declarator();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ForRangeInitializerContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public ForRangeInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forRangeInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterForRangeInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitForRangeInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitForRangeInitializer(this);
else return visitor.visitChildren(this);
}
}
public final ForRangeInitializerContext forRangeInitializer() throws RecognitionException {
ForRangeInitializerContext _localctx = new ForRangeInitializerContext(_ctx, getState());
enterRule(_localctx, 114, RULE_forRangeInitializer);
try {
setState(955);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case Alignof:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Const_cast:
case Decltype:
case Delete:
case Double:
case Dynamic_cast:
case Float:
case Int:
case Long:
case New:
case Noexcept:
case Operator:
case Reinterpret_cast:
case Short:
case Signed:
case Sizeof:
case Static_cast:
case This:
case Throw:
case Typeid_:
case Typename_:
case Unsigned:
case Void:
case Wchar:
case LeftParen:
case LeftBracket:
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
case PlusPlus:
case MinusMinus:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(953);
expression();
}
break;
case LeftBrace:
enterOuterAlt(_localctx, 2);
{
setState(954);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class JumpStatementContext extends ParserRuleContext {
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public TerminalNode Break() { return getToken(CPP14Parser.Break, 0); }
public TerminalNode Continue() { return getToken(CPP14Parser.Continue, 0); }
public TerminalNode Return() { return getToken(CPP14Parser.Return, 0); }
public TerminalNode Goto() { return getToken(CPP14Parser.Goto, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public JumpStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_jumpStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterJumpStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitJumpStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitJumpStatement(this);
else return visitor.visitChildren(this);
}
}
public final JumpStatementContext jumpStatement() throws RecognitionException {
JumpStatementContext _localctx = new JumpStatementContext(_ctx, getState());
enterRule(_localctx, 116, RULE_jumpStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(966);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Break:
{
setState(957);
match(Break);
}
break;
case Continue:
{
setState(958);
match(Continue);
}
break;
case Return:
{
setState(959);
match(Return);
setState(962);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case Alignof:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Const_cast:
case Decltype:
case Delete:
case Double:
case Dynamic_cast:
case Float:
case Int:
case Long:
case New:
case Noexcept:
case Operator:
case Reinterpret_cast:
case Short:
case Signed:
case Sizeof:
case Static_cast:
case This:
case Throw:
case Typeid_:
case Typename_:
case Unsigned:
case Void:
case Wchar:
case LeftParen:
case LeftBracket:
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
case PlusPlus:
case MinusMinus:
case Doublecolon:
case Identifier:
{
setState(960);
expression();
}
break;
case LeftBrace:
{
setState(961);
bracedInitList();
}
break;
case Semi:
break;
default:
break;
}
}
break;
case Goto:
{
setState(964);
match(Goto);
setState(965);
match(Identifier);
}
break;
default:
throw new NoViableAltException(this);
}
setState(968);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclarationStatementContext extends ParserRuleContext {
public BlockDeclarationContext blockDeclaration() {
return getRuleContext(BlockDeclarationContext.class,0);
}
public DeclarationStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declarationStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclarationStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclarationStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclarationStatement(this);
else return visitor.visitChildren(this);
}
}
public final DeclarationStatementContext declarationStatement() throws RecognitionException {
DeclarationStatementContext _localctx = new DeclarationStatementContext(_ctx, getState());
enterRule(_localctx, 118, RULE_declarationStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(970);
blockDeclaration();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclarationseqContext extends ParserRuleContext {
public List declaration() {
return getRuleContexts(DeclarationContext.class);
}
public DeclarationContext declaration(int i) {
return getRuleContext(DeclarationContext.class,i);
}
public DeclarationseqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declarationseq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclarationseq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclarationseq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclarationseq(this);
else return visitor.visitChildren(this);
}
}
public final DeclarationseqContext declarationseq() throws RecognitionException {
DeclarationseqContext _localctx = new DeclarationseqContext(_ctx, getState());
enterRule(_localctx, 120, RULE_declarationseq);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(973);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(972);
declaration();
}
}
setState(975);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543754443169808157L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 459384754220313597L) != 0) );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclarationContext extends ParserRuleContext {
public BlockDeclarationContext blockDeclaration() {
return getRuleContext(BlockDeclarationContext.class,0);
}
public FunctionDefinitionContext functionDefinition() {
return getRuleContext(FunctionDefinitionContext.class,0);
}
public TemplateDeclarationContext templateDeclaration() {
return getRuleContext(TemplateDeclarationContext.class,0);
}
public ExplicitInstantiationContext explicitInstantiation() {
return getRuleContext(ExplicitInstantiationContext.class,0);
}
public ExplicitSpecializationContext explicitSpecialization() {
return getRuleContext(ExplicitSpecializationContext.class,0);
}
public LinkageSpecificationContext linkageSpecification() {
return getRuleContext(LinkageSpecificationContext.class,0);
}
public NamespaceDefinitionContext namespaceDefinition() {
return getRuleContext(NamespaceDefinitionContext.class,0);
}
public EmptyDeclaration_Context emptyDeclaration_() {
return getRuleContext(EmptyDeclaration_Context.class,0);
}
public AttributeDeclarationContext attributeDeclaration() {
return getRuleContext(AttributeDeclarationContext.class,0);
}
public DeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final DeclarationContext declaration() throws RecognitionException {
DeclarationContext _localctx = new DeclarationContext(_ctx, getState());
enterRule(_localctx, 122, RULE_declaration);
try {
setState(986);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(977);
blockDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(978);
functionDefinition();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(979);
templateDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(980);
explicitInstantiation();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(981);
explicitSpecialization();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(982);
linkageSpecification();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(983);
namespaceDefinition();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(984);
emptyDeclaration_();
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(985);
attributeDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BlockDeclarationContext extends ParserRuleContext {
public SimpleDeclarationContext simpleDeclaration() {
return getRuleContext(SimpleDeclarationContext.class,0);
}
public AsmDefinitionContext asmDefinition() {
return getRuleContext(AsmDefinitionContext.class,0);
}
public NamespaceAliasDefinitionContext namespaceAliasDefinition() {
return getRuleContext(NamespaceAliasDefinitionContext.class,0);
}
public UsingDeclarationContext usingDeclaration() {
return getRuleContext(UsingDeclarationContext.class,0);
}
public UsingDirectiveContext usingDirective() {
return getRuleContext(UsingDirectiveContext.class,0);
}
public StaticAssertDeclarationContext staticAssertDeclaration() {
return getRuleContext(StaticAssertDeclarationContext.class,0);
}
public AliasDeclarationContext aliasDeclaration() {
return getRuleContext(AliasDeclarationContext.class,0);
}
public OpaqueEnumDeclarationContext opaqueEnumDeclaration() {
return getRuleContext(OpaqueEnumDeclarationContext.class,0);
}
public BlockDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBlockDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBlockDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBlockDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final BlockDeclarationContext blockDeclaration() throws RecognitionException {
BlockDeclarationContext _localctx = new BlockDeclarationContext(_ctx, getState());
enterRule(_localctx, 124, RULE_blockDeclaration);
try {
setState(996);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(988);
simpleDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(989);
asmDefinition();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(990);
namespaceAliasDefinition();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(991);
usingDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(992);
usingDirective();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(993);
staticAssertDeclaration();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(994);
aliasDeclaration();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(995);
opaqueEnumDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AliasDeclarationContext extends ParserRuleContext {
public TerminalNode Using() { return getToken(CPP14Parser.Using, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public AliasDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_aliasDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAliasDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAliasDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAliasDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final AliasDeclarationContext aliasDeclaration() throws RecognitionException {
AliasDeclarationContext _localctx = new AliasDeclarationContext(_ctx, getState());
enterRule(_localctx, 126, RULE_aliasDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(998);
match(Using);
setState(999);
match(Identifier);
setState(1001);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1000);
attributeSpecifierSeq();
}
}
setState(1003);
match(Assign);
setState(1004);
theTypeId();
setState(1005);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleDeclarationContext extends ParserRuleContext {
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public InitDeclaratorListContext initDeclaratorList() {
return getRuleContext(InitDeclaratorListContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public SimpleDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSimpleDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSimpleDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSimpleDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final SimpleDeclarationContext simpleDeclaration() throws RecognitionException {
SimpleDeclarationContext _localctx = new SimpleDeclarationContext(_ctx, getState());
enterRule(_localctx, 128, RULE_simpleDeclaration);
int _la;
try {
setState(1021);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Constexpr:
case Decltype:
case Double:
case Enum:
case Explicit:
case Extern:
case Float:
case Friend:
case Inline:
case Int:
case Long:
case Mutable:
case Operator:
case Register:
case Short:
case Signed:
case Static:
case Struct:
case Thread_local:
case Typedef:
case Typename_:
case Union:
case Unsigned:
case Virtual:
case Void:
case Volatile:
case Wchar:
case LeftParen:
case Star:
case And:
case Tilde:
case AndAnd:
case Doublecolon:
case Semi:
case Ellipsis:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1008);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
{
setState(1007);
declSpecifierSeq();
}
break;
}
setState(1011);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Decltype || _la==Operator || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 215512868999425L) != 0)) {
{
setState(1010);
initDeclaratorList();
}
}
setState(1013);
match(Semi);
}
break;
case Alignas:
case LeftBracket:
enterOuterAlt(_localctx, 2);
{
setState(1014);
attributeSpecifierSeq();
setState(1016);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) {
case 1:
{
setState(1015);
declSpecifierSeq();
}
break;
}
setState(1018);
initDeclaratorList();
setState(1019);
match(Semi);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class StaticAssertDeclarationContext extends ParserRuleContext {
public TerminalNode Static_assert() { return getToken(CPP14Parser.Static_assert, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public TerminalNode Comma() { return getToken(CPP14Parser.Comma, 0); }
public TerminalNode StringLiteral() { return getToken(CPP14Parser.StringLiteral, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public StaticAssertDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_staticAssertDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterStaticAssertDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitStaticAssertDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitStaticAssertDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final StaticAssertDeclarationContext staticAssertDeclaration() throws RecognitionException {
StaticAssertDeclarationContext _localctx = new StaticAssertDeclarationContext(_ctx, getState());
enterRule(_localctx, 130, RULE_staticAssertDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(1023);
match(Static_assert);
setState(1024);
match(LeftParen);
setState(1025);
constantExpression();
setState(1026);
match(Comma);
setState(1027);
match(StringLiteral);
setState(1028);
match(RightParen);
setState(1029);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EmptyDeclaration_Context extends ParserRuleContext {
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public EmptyDeclaration_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_emptyDeclaration_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEmptyDeclaration_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEmptyDeclaration_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEmptyDeclaration_(this);
else return visitor.visitChildren(this);
}
}
public final EmptyDeclaration_Context emptyDeclaration_() throws RecognitionException {
EmptyDeclaration_Context _localctx = new EmptyDeclaration_Context(_ctx, getState());
enterRule(_localctx, 132, RULE_emptyDeclaration_);
try {
enterOuterAlt(_localctx, 1);
{
setState(1031);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeDeclarationContext extends ParserRuleContext {
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AttributeDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final AttributeDeclarationContext attributeDeclaration() throws RecognitionException {
AttributeDeclarationContext _localctx = new AttributeDeclarationContext(_ctx, getState());
enterRule(_localctx, 134, RULE_attributeDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(1033);
attributeSpecifierSeq();
setState(1034);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclSpecifierContext extends ParserRuleContext {
public StorageClassSpecifierContext storageClassSpecifier() {
return getRuleContext(StorageClassSpecifierContext.class,0);
}
public TypeSpecifierContext typeSpecifier() {
return getRuleContext(TypeSpecifierContext.class,0);
}
public FunctionSpecifierContext functionSpecifier() {
return getRuleContext(FunctionSpecifierContext.class,0);
}
public TerminalNode Friend() { return getToken(CPP14Parser.Friend, 0); }
public TerminalNode Typedef() { return getToken(CPP14Parser.Typedef, 0); }
public TerminalNode Constexpr() { return getToken(CPP14Parser.Constexpr, 0); }
public DeclSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final DeclSpecifierContext declSpecifier() throws RecognitionException {
DeclSpecifierContext _localctx = new DeclSpecifierContext(_ctx, getState());
enterRule(_localctx, 136, RULE_declSpecifier);
try {
setState(1042);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Extern:
case Mutable:
case Register:
case Static:
case Thread_local:
enterOuterAlt(_localctx, 1);
{
setState(1036);
storageClassSpecifier();
}
break;
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Decltype:
case Double:
case Enum:
case Float:
case Int:
case Long:
case Short:
case Signed:
case Struct:
case Typename_:
case Union:
case Unsigned:
case Void:
case Volatile:
case Wchar:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 2);
{
setState(1037);
typeSpecifier();
}
break;
case Explicit:
case Inline:
case Virtual:
enterOuterAlt(_localctx, 3);
{
setState(1038);
functionSpecifier();
}
break;
case Friend:
enterOuterAlt(_localctx, 4);
{
setState(1039);
match(Friend);
}
break;
case Typedef:
enterOuterAlt(_localctx, 5);
{
setState(1040);
match(Typedef);
}
break;
case Constexpr:
enterOuterAlt(_localctx, 6);
{
setState(1041);
match(Constexpr);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclSpecifierSeqContext extends ParserRuleContext {
public List declSpecifier() {
return getRuleContexts(DeclSpecifierContext.class);
}
public DeclSpecifierContext declSpecifier(int i) {
return getRuleContext(DeclSpecifierContext.class,i);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public DeclSpecifierSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declSpecifierSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclSpecifierSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclSpecifierSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclSpecifierSeq(this);
else return visitor.visitChildren(this);
}
}
public final DeclSpecifierSeqContext declSpecifierSeq() throws RecognitionException {
DeclSpecifierSeqContext _localctx = new DeclSpecifierSeqContext(_ctx, getState());
enterRule(_localctx, 138, RULE_declSpecifierSeq);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1045);
_errHandler.sync(this);
_alt = 1+1;
do {
switch (_alt) {
case 1+1:
{
{
setState(1044);
declSpecifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1047);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,104,_ctx);
} while ( _alt!=1 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1050);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) {
case 1:
{
setState(1049);
attributeSpecifierSeq();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class StorageClassSpecifierContext extends ParserRuleContext {
public TerminalNode Register() { return getToken(CPP14Parser.Register, 0); }
public TerminalNode Static() { return getToken(CPP14Parser.Static, 0); }
public TerminalNode Thread_local() { return getToken(CPP14Parser.Thread_local, 0); }
public TerminalNode Extern() { return getToken(CPP14Parser.Extern, 0); }
public TerminalNode Mutable() { return getToken(CPP14Parser.Mutable, 0); }
public StorageClassSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_storageClassSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterStorageClassSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitStorageClassSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitStorageClassSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final StorageClassSpecifierContext storageClassSpecifier() throws RecognitionException {
StorageClassSpecifierContext _localctx = new StorageClassSpecifierContext(_ctx, getState());
enterRule(_localctx, 140, RULE_storageClassSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1052);
_la = _input.LA(1);
if ( !(((((_la - 36)) & ~0x3f) == 0 && ((1L << (_la - 36)) & 17316186113L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FunctionSpecifierContext extends ParserRuleContext {
public TerminalNode Inline() { return getToken(CPP14Parser.Inline, 0); }
public TerminalNode Virtual() { return getToken(CPP14Parser.Virtual, 0); }
public TerminalNode Explicit() { return getToken(CPP14Parser.Explicit, 0); }
public FunctionSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterFunctionSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitFunctionSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitFunctionSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final FunctionSpecifierContext functionSpecifier() throws RecognitionException {
FunctionSpecifierContext _localctx = new FunctionSpecifierContext(_ctx, getState());
enterRule(_localctx, 142, RULE_functionSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1054);
_la = _input.LA(1);
if ( !(((((_la - 34)) & ~0x3f) == 0 && ((1L << (_la - 34)) & 70368744178689L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TypedefNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TypedefNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typedefName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTypedefName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTypedefName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTypedefName(this);
else return visitor.visitChildren(this);
}
}
public final TypedefNameContext typedefName() throws RecognitionException {
TypedefNameContext _localctx = new TypedefNameContext(_ctx, getState());
enterRule(_localctx, 144, RULE_typedefName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1056);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TypeSpecifierContext extends ParserRuleContext {
public TrailingTypeSpecifierContext trailingTypeSpecifier() {
return getRuleContext(TrailingTypeSpecifierContext.class,0);
}
public ClassSpecifierContext classSpecifier() {
return getRuleContext(ClassSpecifierContext.class,0);
}
public EnumSpecifierContext enumSpecifier() {
return getRuleContext(EnumSpecifierContext.class,0);
}
public TypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final TypeSpecifierContext typeSpecifier() throws RecognitionException {
TypeSpecifierContext _localctx = new TypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 146, RULE_typeSpecifier);
try {
setState(1061);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1058);
trailingTypeSpecifier();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1059);
classSpecifier();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1060);
enumSpecifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TrailingTypeSpecifierContext extends ParserRuleContext {
public SimpleTypeSpecifierContext simpleTypeSpecifier() {
return getRuleContext(SimpleTypeSpecifierContext.class,0);
}
public ElaboratedTypeSpecifierContext elaboratedTypeSpecifier() {
return getRuleContext(ElaboratedTypeSpecifierContext.class,0);
}
public TypeNameSpecifierContext typeNameSpecifier() {
return getRuleContext(TypeNameSpecifierContext.class,0);
}
public CvQualifierContext cvQualifier() {
return getRuleContext(CvQualifierContext.class,0);
}
public TrailingTypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_trailingTypeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTrailingTypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTrailingTypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTrailingTypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final TrailingTypeSpecifierContext trailingTypeSpecifier() throws RecognitionException {
TrailingTypeSpecifierContext _localctx = new TrailingTypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 148, RULE_trailingTypeSpecifier);
try {
setState(1067);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Decltype:
case Double:
case Float:
case Int:
case Long:
case Short:
case Signed:
case Unsigned:
case Void:
case Wchar:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1063);
simpleTypeSpecifier();
}
break;
case Class:
case Enum:
case Struct:
enterOuterAlt(_localctx, 2);
{
setState(1064);
elaboratedTypeSpecifier();
}
break;
case Typename_:
enterOuterAlt(_localctx, 3);
{
setState(1065);
typeNameSpecifier();
}
break;
case Const:
case Volatile:
enterOuterAlt(_localctx, 4);
{
setState(1066);
cvQualifier();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TypeSpecifierSeqContext extends ParserRuleContext {
public List typeSpecifier() {
return getRuleContexts(TypeSpecifierContext.class);
}
public TypeSpecifierContext typeSpecifier(int i) {
return getRuleContext(TypeSpecifierContext.class,i);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TypeSpecifierSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeSpecifierSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTypeSpecifierSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTypeSpecifierSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTypeSpecifierSeq(this);
else return visitor.visitChildren(this);
}
}
public final TypeSpecifierSeqContext typeSpecifierSeq() throws RecognitionException {
TypeSpecifierSeqContext _localctx = new TypeSpecifierSeqContext(_ctx, getState());
enterRule(_localctx, 150, RULE_typeSpecifierSeq);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1070);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1069);
typeSpecifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1072);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,108,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1075);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,109,_ctx) ) {
case 1:
{
setState(1074);
attributeSpecifierSeq();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TrailingTypeSpecifierSeqContext extends ParserRuleContext {
public List trailingTypeSpecifier() {
return getRuleContexts(TrailingTypeSpecifierContext.class);
}
public TrailingTypeSpecifierContext trailingTypeSpecifier(int i) {
return getRuleContext(TrailingTypeSpecifierContext.class,i);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TrailingTypeSpecifierSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_trailingTypeSpecifierSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTrailingTypeSpecifierSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTrailingTypeSpecifierSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTrailingTypeSpecifierSeq(this);
else return visitor.visitChildren(this);
}
}
public final TrailingTypeSpecifierSeqContext trailingTypeSpecifierSeq() throws RecognitionException {
TrailingTypeSpecifierSeqContext _localctx = new TrailingTypeSpecifierSeqContext(_ctx, getState());
enterRule(_localctx, 152, RULE_trailingTypeSpecifierSeq);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1078);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1077);
trailingTypeSpecifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1080);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,110,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1083);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,111,_ctx) ) {
case 1:
{
setState(1082);
attributeSpecifierSeq();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleTypeLengthModifierContext extends ParserRuleContext {
public TerminalNode Short() { return getToken(CPP14Parser.Short, 0); }
public TerminalNode Long() { return getToken(CPP14Parser.Long, 0); }
public SimpleTypeLengthModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleTypeLengthModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSimpleTypeLengthModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSimpleTypeLengthModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSimpleTypeLengthModifier(this);
else return visitor.visitChildren(this);
}
}
public final SimpleTypeLengthModifierContext simpleTypeLengthModifier() throws RecognitionException {
SimpleTypeLengthModifierContext _localctx = new SimpleTypeLengthModifierContext(_ctx, getState());
enterRule(_localctx, 154, RULE_simpleTypeLengthModifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1085);
_la = _input.LA(1);
if ( !(_la==Long || _la==Short) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleTypeSignednessModifierContext extends ParserRuleContext {
public TerminalNode Unsigned() { return getToken(CPP14Parser.Unsigned, 0); }
public TerminalNode Signed() { return getToken(CPP14Parser.Signed, 0); }
public SimpleTypeSignednessModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleTypeSignednessModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSimpleTypeSignednessModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSimpleTypeSignednessModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSimpleTypeSignednessModifier(this);
else return visitor.visitChildren(this);
}
}
public final SimpleTypeSignednessModifierContext simpleTypeSignednessModifier() throws RecognitionException {
SimpleTypeSignednessModifierContext _localctx = new SimpleTypeSignednessModifierContext(_ctx, getState());
enterRule(_localctx, 156, RULE_simpleTypeSignednessModifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1087);
_la = _input.LA(1);
if ( !(_la==Signed || _la==Unsigned) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class SimpleTypeSpecifierContext extends ParserRuleContext {
public TheTypeNameContext theTypeName() {
return getRuleContext(TheTypeNameContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public TerminalNode Char() { return getToken(CPP14Parser.Char, 0); }
public TerminalNode Char16() { return getToken(CPP14Parser.Char16, 0); }
public TerminalNode Char32() { return getToken(CPP14Parser.Char32, 0); }
public TerminalNode Wchar() { return getToken(CPP14Parser.Wchar, 0); }
public TerminalNode Bool() { return getToken(CPP14Parser.Bool, 0); }
public TerminalNode Short() { return getToken(CPP14Parser.Short, 0); }
public TerminalNode Int() { return getToken(CPP14Parser.Int, 0); }
public TerminalNode Long() { return getToken(CPP14Parser.Long, 0); }
public TerminalNode Float() { return getToken(CPP14Parser.Float, 0); }
public TerminalNode Signed() { return getToken(CPP14Parser.Signed, 0); }
public TerminalNode Unsigned() { return getToken(CPP14Parser.Unsigned, 0); }
public TerminalNode Double() { return getToken(CPP14Parser.Double, 0); }
public TerminalNode Void() { return getToken(CPP14Parser.Void, 0); }
public TerminalNode Auto() { return getToken(CPP14Parser.Auto, 0); }
public DecltypeSpecifierContext decltypeSpecifier() {
return getRuleContext(DecltypeSpecifierContext.class,0);
}
public SimpleTypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleTypeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterSimpleTypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitSimpleTypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitSimpleTypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final SimpleTypeSpecifierContext simpleTypeSpecifier() throws RecognitionException {
SimpleTypeSpecifierContext _localctx = new SimpleTypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 158, RULE_simpleTypeSpecifier);
try {
setState(1113);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,113,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1090);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,112,_ctx) ) {
case 1:
{
setState(1089);
nestedNameSpecifier(0);
}
break;
}
setState(1092);
theTypeName();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1093);
nestedNameSpecifier(0);
setState(1094);
match(Template);
setState(1095);
simpleTemplateId();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1097);
match(Char);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1098);
match(Char16);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1099);
match(Char32);
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1100);
match(Wchar);
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1101);
match(Bool);
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(1102);
match(Short);
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(1103);
match(Int);
}
break;
case 10:
enterOuterAlt(_localctx, 10);
{
setState(1104);
match(Long);
}
break;
case 11:
enterOuterAlt(_localctx, 11);
{
setState(1105);
match(Float);
}
break;
case 12:
enterOuterAlt(_localctx, 12);
{
setState(1106);
match(Signed);
}
break;
case 13:
enterOuterAlt(_localctx, 13);
{
setState(1107);
match(Unsigned);
}
break;
case 14:
enterOuterAlt(_localctx, 14);
{
setState(1108);
match(Float);
}
break;
case 15:
enterOuterAlt(_localctx, 15);
{
setState(1109);
match(Double);
}
break;
case 16:
enterOuterAlt(_localctx, 16);
{
setState(1110);
match(Void);
}
break;
case 17:
enterOuterAlt(_localctx, 17);
{
setState(1111);
match(Auto);
}
break;
case 18:
enterOuterAlt(_localctx, 18);
{
setState(1112);
decltypeSpecifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TheTypeNameContext extends ParserRuleContext {
public ClassNameContext className() {
return getRuleContext(ClassNameContext.class,0);
}
public EnumNameContext enumName() {
return getRuleContext(EnumNameContext.class,0);
}
public TypedefNameContext typedefName() {
return getRuleContext(TypedefNameContext.class,0);
}
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public TheTypeNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_theTypeName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTheTypeName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTheTypeName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTheTypeName(this);
else return visitor.visitChildren(this);
}
}
public final TheTypeNameContext theTypeName() throws RecognitionException {
TheTypeNameContext _localctx = new TheTypeNameContext(_ctx, getState());
enterRule(_localctx, 160, RULE_theTypeName);
try {
setState(1119);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1115);
className();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1116);
enumName();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1117);
typedefName();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1118);
simpleTemplateId();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DecltypeSpecifierContext extends ParserRuleContext {
public TerminalNode Decltype() { return getToken(CPP14Parser.Decltype, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode Auto() { return getToken(CPP14Parser.Auto, 0); }
public DecltypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_decltypeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDecltypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDecltypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDecltypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final DecltypeSpecifierContext decltypeSpecifier() throws RecognitionException {
DecltypeSpecifierContext _localctx = new DecltypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 162, RULE_decltypeSpecifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1121);
match(Decltype);
setState(1122);
match(LeftParen);
setState(1125);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) {
case 1:
{
setState(1123);
expression();
}
break;
case 2:
{
setState(1124);
match(Auto);
}
break;
}
setState(1127);
match(RightParen);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ElaboratedTypeSpecifierContext extends ParserRuleContext {
public ClassKeyContext classKey() {
return getRuleContext(ClassKeyContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public TerminalNode Enum() { return getToken(CPP14Parser.Enum, 0); }
public ElaboratedTypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elaboratedTypeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterElaboratedTypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitElaboratedTypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitElaboratedTypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final ElaboratedTypeSpecifierContext elaboratedTypeSpecifier() throws RecognitionException {
ElaboratedTypeSpecifierContext _localctx = new ElaboratedTypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 164, RULE_elaboratedTypeSpecifier);
int _la;
try {
setState(1151);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Class:
case Struct:
enterOuterAlt(_localctx, 1);
{
setState(1129);
classKey();
setState(1144);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) {
case 1:
{
setState(1131);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1130);
attributeSpecifierSeq();
}
}
setState(1134);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) {
case 1:
{
setState(1133);
nestedNameSpecifier(0);
}
break;
}
setState(1136);
match(Identifier);
}
break;
case 2:
{
setState(1137);
simpleTemplateId();
}
break;
case 3:
{
setState(1138);
nestedNameSpecifier(0);
setState(1140);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Template) {
{
setState(1139);
match(Template);
}
}
setState(1142);
simpleTemplateId();
}
break;
}
}
break;
case Enum:
enterOuterAlt(_localctx, 2);
{
setState(1146);
match(Enum);
setState(1148);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) {
case 1:
{
setState(1147);
nestedNameSpecifier(0);
}
break;
}
setState(1150);
match(Identifier);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public EnumNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumName(this);
else return visitor.visitChildren(this);
}
}
public final EnumNameContext enumName() throws RecognitionException {
EnumNameContext _localctx = new EnumNameContext(_ctx, getState());
enterRule(_localctx, 166, RULE_enumName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1153);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumSpecifierContext extends ParserRuleContext {
public EnumHeadContext enumHead() {
return getRuleContext(EnumHeadContext.class,0);
}
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public EnumeratorListContext enumeratorList() {
return getRuleContext(EnumeratorListContext.class,0);
}
public TerminalNode Comma() { return getToken(CPP14Parser.Comma, 0); }
public EnumSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final EnumSpecifierContext enumSpecifier() throws RecognitionException {
EnumSpecifierContext _localctx = new EnumSpecifierContext(_ctx, getState());
enterRule(_localctx, 168, RULE_enumSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1155);
enumHead();
setState(1156);
match(LeftBrace);
setState(1161);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1157);
enumeratorList();
setState(1159);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Comma) {
{
setState(1158);
match(Comma);
}
}
}
}
setState(1163);
match(RightBrace);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumHeadContext extends ParserRuleContext {
public EnumkeyContext enumkey() {
return getRuleContext(EnumkeyContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public EnumbaseContext enumbase() {
return getRuleContext(EnumbaseContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public EnumHeadContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumHead; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumHead(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumHead(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumHead(this);
else return visitor.visitChildren(this);
}
}
public final EnumHeadContext enumHead() throws RecognitionException {
EnumHeadContext _localctx = new EnumHeadContext(_ctx, getState());
enterRule(_localctx, 170, RULE_enumHead);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1165);
enumkey();
setState(1167);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1166);
attributeSpecifierSeq();
}
}
setState(1173);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Decltype || _la==Doublecolon || _la==Identifier) {
{
setState(1170);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,125,_ctx) ) {
case 1:
{
setState(1169);
nestedNameSpecifier(0);
}
break;
}
setState(1172);
match(Identifier);
}
}
setState(1176);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Colon) {
{
setState(1175);
enumbase();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class OpaqueEnumDeclarationContext extends ParserRuleContext {
public EnumkeyContext enumkey() {
return getRuleContext(EnumkeyContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public EnumbaseContext enumbase() {
return getRuleContext(EnumbaseContext.class,0);
}
public OpaqueEnumDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_opaqueEnumDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterOpaqueEnumDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitOpaqueEnumDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitOpaqueEnumDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final OpaqueEnumDeclarationContext opaqueEnumDeclaration() throws RecognitionException {
OpaqueEnumDeclarationContext _localctx = new OpaqueEnumDeclarationContext(_ctx, getState());
enterRule(_localctx, 172, RULE_opaqueEnumDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1178);
enumkey();
setState(1180);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1179);
attributeSpecifierSeq();
}
}
setState(1182);
match(Identifier);
setState(1184);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Colon) {
{
setState(1183);
enumbase();
}
}
setState(1186);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumkeyContext extends ParserRuleContext {
public TerminalNode Enum() { return getToken(CPP14Parser.Enum, 0); }
public TerminalNode Class() { return getToken(CPP14Parser.Class, 0); }
public TerminalNode Struct() { return getToken(CPP14Parser.Struct, 0); }
public EnumkeyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumkey; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumkey(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumkey(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumkey(this);
else return visitor.visitChildren(this);
}
}
public final EnumkeyContext enumkey() throws RecognitionException {
EnumkeyContext _localctx = new EnumkeyContext(_ctx, getState());
enterRule(_localctx, 174, RULE_enumkey);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1188);
match(Enum);
setState(1190);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Class || _la==Struct) {
{
setState(1189);
_la = _input.LA(1);
if ( !(_la==Class || _la==Struct) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumbaseContext extends ParserRuleContext {
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public TypeSpecifierSeqContext typeSpecifierSeq() {
return getRuleContext(TypeSpecifierSeqContext.class,0);
}
public EnumbaseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumbase; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumbase(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumbase(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumbase(this);
else return visitor.visitChildren(this);
}
}
public final EnumbaseContext enumbase() throws RecognitionException {
EnumbaseContext _localctx = new EnumbaseContext(_ctx, getState());
enterRule(_localctx, 176, RULE_enumbase);
try {
enterOuterAlt(_localctx, 1);
{
setState(1192);
match(Colon);
setState(1193);
typeSpecifierSeq();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumeratorListContext extends ParserRuleContext {
public List enumeratorDefinition() {
return getRuleContexts(EnumeratorDefinitionContext.class);
}
public EnumeratorDefinitionContext enumeratorDefinition(int i) {
return getRuleContext(EnumeratorDefinitionContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public EnumeratorListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumeratorList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumeratorList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumeratorList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumeratorList(this);
else return visitor.visitChildren(this);
}
}
public final EnumeratorListContext enumeratorList() throws RecognitionException {
EnumeratorListContext _localctx = new EnumeratorListContext(_ctx, getState());
enterRule(_localctx, 178, RULE_enumeratorList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1195);
enumeratorDefinition();
setState(1200);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,131,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1196);
match(Comma);
setState(1197);
enumeratorDefinition();
}
}
}
setState(1202);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,131,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumeratorDefinitionContext extends ParserRuleContext {
public EnumeratorContext enumerator() {
return getRuleContext(EnumeratorContext.class,0);
}
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public EnumeratorDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumeratorDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumeratorDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumeratorDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumeratorDefinition(this);
else return visitor.visitChildren(this);
}
}
public final EnumeratorDefinitionContext enumeratorDefinition() throws RecognitionException {
EnumeratorDefinitionContext _localctx = new EnumeratorDefinitionContext(_ctx, getState());
enterRule(_localctx, 180, RULE_enumeratorDefinition);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1203);
enumerator();
setState(1206);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Assign) {
{
setState(1204);
match(Assign);
setState(1205);
constantExpression();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class EnumeratorContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public EnumeratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumerator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterEnumerator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitEnumerator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitEnumerator(this);
else return visitor.visitChildren(this);
}
}
public final EnumeratorContext enumerator() throws RecognitionException {
EnumeratorContext _localctx = new EnumeratorContext(_ctx, getState());
enterRule(_localctx, 182, RULE_enumerator);
try {
enterOuterAlt(_localctx, 1);
{
setState(1208);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NamespaceNameContext extends ParserRuleContext {
public OriginalNamespaceNameContext originalNamespaceName() {
return getRuleContext(OriginalNamespaceNameContext.class,0);
}
public NamespaceAliasContext namespaceAlias() {
return getRuleContext(NamespaceAliasContext.class,0);
}
public NamespaceNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_namespaceName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNamespaceName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNamespaceName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNamespaceName(this);
else return visitor.visitChildren(this);
}
}
public final NamespaceNameContext namespaceName() throws RecognitionException {
NamespaceNameContext _localctx = new NamespaceNameContext(_ctx, getState());
enterRule(_localctx, 184, RULE_namespaceName);
try {
setState(1212);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,133,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1210);
originalNamespaceName();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1211);
namespaceAlias();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class OriginalNamespaceNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public OriginalNamespaceNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_originalNamespaceName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterOriginalNamespaceName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitOriginalNamespaceName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitOriginalNamespaceName(this);
else return visitor.visitChildren(this);
}
}
public final OriginalNamespaceNameContext originalNamespaceName() throws RecognitionException {
OriginalNamespaceNameContext _localctx = new OriginalNamespaceNameContext(_ctx, getState());
enterRule(_localctx, 186, RULE_originalNamespaceName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1214);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NamespaceDefinitionContext extends ParserRuleContext {
public DeclarationseqContext namespaceBody;
public TerminalNode Namespace() { return getToken(CPP14Parser.Namespace, 0); }
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public TerminalNode Inline() { return getToken(CPP14Parser.Inline, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public OriginalNamespaceNameContext originalNamespaceName() {
return getRuleContext(OriginalNamespaceNameContext.class,0);
}
public DeclarationseqContext declarationseq() {
return getRuleContext(DeclarationseqContext.class,0);
}
public NamespaceDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_namespaceDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNamespaceDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNamespaceDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNamespaceDefinition(this);
else return visitor.visitChildren(this);
}
}
public final NamespaceDefinitionContext namespaceDefinition() throws RecognitionException {
NamespaceDefinitionContext _localctx = new NamespaceDefinitionContext(_ctx, getState());
enterRule(_localctx, 188, RULE_namespaceDefinition);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1217);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Inline) {
{
setState(1216);
match(Inline);
}
}
setState(1219);
match(Namespace);
setState(1222);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,135,_ctx) ) {
case 1:
{
setState(1220);
match(Identifier);
}
break;
case 2:
{
setState(1221);
originalNamespaceName();
}
break;
}
setState(1224);
match(LeftBrace);
setState(1226);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543754443169808157L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 459384754220313597L) != 0)) {
{
setState(1225);
((NamespaceDefinitionContext)_localctx).namespaceBody = declarationseq();
}
}
setState(1228);
match(RightBrace);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NamespaceAliasContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public NamespaceAliasContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_namespaceAlias; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNamespaceAlias(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNamespaceAlias(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNamespaceAlias(this);
else return visitor.visitChildren(this);
}
}
public final NamespaceAliasContext namespaceAlias() throws RecognitionException {
NamespaceAliasContext _localctx = new NamespaceAliasContext(_ctx, getState());
enterRule(_localctx, 190, RULE_namespaceAlias);
try {
enterOuterAlt(_localctx, 1);
{
setState(1230);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NamespaceAliasDefinitionContext extends ParserRuleContext {
public TerminalNode Namespace() { return getToken(CPP14Parser.Namespace, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public QualifiednamespacespecifierContext qualifiednamespacespecifier() {
return getRuleContext(QualifiednamespacespecifierContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public NamespaceAliasDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_namespaceAliasDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNamespaceAliasDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNamespaceAliasDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNamespaceAliasDefinition(this);
else return visitor.visitChildren(this);
}
}
public final NamespaceAliasDefinitionContext namespaceAliasDefinition() throws RecognitionException {
NamespaceAliasDefinitionContext _localctx = new NamespaceAliasDefinitionContext(_ctx, getState());
enterRule(_localctx, 192, RULE_namespaceAliasDefinition);
try {
enterOuterAlt(_localctx, 1);
{
setState(1232);
match(Namespace);
setState(1233);
match(Identifier);
setState(1234);
match(Assign);
setState(1235);
qualifiednamespacespecifier();
setState(1236);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class QualifiednamespacespecifierContext extends ParserRuleContext {
public NamespaceNameContext namespaceName() {
return getRuleContext(NamespaceNameContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public QualifiednamespacespecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_qualifiednamespacespecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterQualifiednamespacespecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitQualifiednamespacespecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitQualifiednamespacespecifier(this);
else return visitor.visitChildren(this);
}
}
public final QualifiednamespacespecifierContext qualifiednamespacespecifier() throws RecognitionException {
QualifiednamespacespecifierContext _localctx = new QualifiednamespacespecifierContext(_ctx, getState());
enterRule(_localctx, 194, RULE_qualifiednamespacespecifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1239);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,137,_ctx) ) {
case 1:
{
setState(1238);
nestedNameSpecifier(0);
}
break;
}
setState(1241);
namespaceName();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class UsingDeclarationContext extends ParserRuleContext {
public TerminalNode Using() { return getToken(CPP14Parser.Using, 0); }
public UnqualifiedIdContext unqualifiedId() {
return getRuleContext(UnqualifiedIdContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public TerminalNode Typename_() { return getToken(CPP14Parser.Typename_, 0); }
public UsingDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_usingDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterUsingDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitUsingDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitUsingDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final UsingDeclarationContext usingDeclaration() throws RecognitionException {
UsingDeclarationContext _localctx = new UsingDeclarationContext(_ctx, getState());
enterRule(_localctx, 196, RULE_usingDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1243);
match(Using);
setState(1249);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,139,_ctx) ) {
case 1:
{
setState(1245);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Typename_) {
{
setState(1244);
match(Typename_);
}
}
setState(1247);
nestedNameSpecifier(0);
}
break;
case 2:
{
setState(1248);
match(Doublecolon);
}
break;
}
setState(1251);
unqualifiedId();
setState(1252);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class UsingDirectiveContext extends ParserRuleContext {
public TerminalNode Using() { return getToken(CPP14Parser.Using, 0); }
public TerminalNode Namespace() { return getToken(CPP14Parser.Namespace, 0); }
public NamespaceNameContext namespaceName() {
return getRuleContext(NamespaceNameContext.class,0);
}
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public UsingDirectiveContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_usingDirective; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterUsingDirective(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitUsingDirective(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitUsingDirective(this);
else return visitor.visitChildren(this);
}
}
public final UsingDirectiveContext usingDirective() throws RecognitionException {
UsingDirectiveContext _localctx = new UsingDirectiveContext(_ctx, getState());
enterRule(_localctx, 198, RULE_usingDirective);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1255);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1254);
attributeSpecifierSeq();
}
}
setState(1257);
match(Using);
setState(1258);
match(Namespace);
setState(1260);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,141,_ctx) ) {
case 1:
{
setState(1259);
nestedNameSpecifier(0);
}
break;
}
setState(1262);
namespaceName();
setState(1263);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AsmDefinitionContext extends ParserRuleContext {
public TerminalNode Asm() { return getToken(CPP14Parser.Asm, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode StringLiteral() { return getToken(CPP14Parser.StringLiteral, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AsmDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_asmDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAsmDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAsmDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAsmDefinition(this);
else return visitor.visitChildren(this);
}
}
public final AsmDefinitionContext asmDefinition() throws RecognitionException {
AsmDefinitionContext _localctx = new AsmDefinitionContext(_ctx, getState());
enterRule(_localctx, 200, RULE_asmDefinition);
try {
enterOuterAlt(_localctx, 1);
{
setState(1265);
match(Asm);
setState(1266);
match(LeftParen);
setState(1267);
match(StringLiteral);
setState(1268);
match(RightParen);
setState(1269);
match(Semi);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LinkageSpecificationContext extends ParserRuleContext {
public TerminalNode Extern() { return getToken(CPP14Parser.Extern, 0); }
public TerminalNode StringLiteral() { return getToken(CPP14Parser.StringLiteral, 0); }
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public DeclarationContext declaration() {
return getRuleContext(DeclarationContext.class,0);
}
public DeclarationseqContext declarationseq() {
return getRuleContext(DeclarationseqContext.class,0);
}
public LinkageSpecificationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_linkageSpecification; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLinkageSpecification(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLinkageSpecification(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLinkageSpecification(this);
else return visitor.visitChildren(this);
}
}
public final LinkageSpecificationContext linkageSpecification() throws RecognitionException {
LinkageSpecificationContext _localctx = new LinkageSpecificationContext(_ctx, getState());
enterRule(_localctx, 202, RULE_linkageSpecification);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1271);
match(Extern);
setState(1272);
match(StringLiteral);
setState(1279);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftBrace:
{
setState(1273);
match(LeftBrace);
setState(1275);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543754443169808157L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 459384754220313597L) != 0)) {
{
setState(1274);
declarationseq();
}
}
setState(1277);
match(RightBrace);
}
break;
case Alignas:
case Asm:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Constexpr:
case Decltype:
case Double:
case Enum:
case Explicit:
case Extern:
case Float:
case Friend:
case Inline:
case Int:
case Long:
case Mutable:
case Namespace:
case Operator:
case Register:
case Short:
case Signed:
case Static:
case Static_assert:
case Struct:
case Template:
case Thread_local:
case Typedef:
case Typename_:
case Union:
case Unsigned:
case Using:
case Virtual:
case Void:
case Volatile:
case Wchar:
case LeftParen:
case LeftBracket:
case Star:
case And:
case Tilde:
case AndAnd:
case Doublecolon:
case Semi:
case Ellipsis:
case Identifier:
{
setState(1278);
declaration();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeSpecifierSeqContext extends ParserRuleContext {
public List attributeSpecifier() {
return getRuleContexts(AttributeSpecifierContext.class);
}
public AttributeSpecifierContext attributeSpecifier(int i) {
return getRuleContext(AttributeSpecifierContext.class,i);
}
public AttributeSpecifierSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeSpecifierSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeSpecifierSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeSpecifierSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeSpecifierSeq(this);
else return visitor.visitChildren(this);
}
}
public final AttributeSpecifierSeqContext attributeSpecifierSeq() throws RecognitionException {
AttributeSpecifierSeqContext _localctx = new AttributeSpecifierSeqContext(_ctx, getState());
enterRule(_localctx, 204, RULE_attributeSpecifierSeq);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1282);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1281);
attributeSpecifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1284);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,144,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeSpecifierContext extends ParserRuleContext {
public List LeftBracket() { return getTokens(CPP14Parser.LeftBracket); }
public TerminalNode LeftBracket(int i) {
return getToken(CPP14Parser.LeftBracket, i);
}
public List RightBracket() { return getTokens(CPP14Parser.RightBracket); }
public TerminalNode RightBracket(int i) {
return getToken(CPP14Parser.RightBracket, i);
}
public AttributeListContext attributeList() {
return getRuleContext(AttributeListContext.class,0);
}
public AlignmentspecifierContext alignmentspecifier() {
return getRuleContext(AlignmentspecifierContext.class,0);
}
public AttributeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final AttributeSpecifierContext attributeSpecifier() throws RecognitionException {
AttributeSpecifierContext _localctx = new AttributeSpecifierContext(_ctx, getState());
enterRule(_localctx, 206, RULE_attributeSpecifier);
int _la;
try {
setState(1294);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftBracket:
enterOuterAlt(_localctx, 1);
{
setState(1286);
match(LeftBracket);
setState(1287);
match(LeftBracket);
setState(1289);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1288);
attributeList();
}
}
setState(1291);
match(RightBracket);
setState(1292);
match(RightBracket);
}
break;
case Alignas:
enterOuterAlt(_localctx, 2);
{
setState(1293);
alignmentspecifier();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AlignmentspecifierContext extends ParserRuleContext {
public TerminalNode Alignas() { return getToken(CPP14Parser.Alignas, 0); }
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public TheTypeIdContext theTypeId() {
return getRuleContext(TheTypeIdContext.class,0);
}
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public AlignmentspecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_alignmentspecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAlignmentspecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAlignmentspecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAlignmentspecifier(this);
else return visitor.visitChildren(this);
}
}
public final AlignmentspecifierContext alignmentspecifier() throws RecognitionException {
AlignmentspecifierContext _localctx = new AlignmentspecifierContext(_ctx, getState());
enterRule(_localctx, 208, RULE_alignmentspecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1296);
match(Alignas);
setState(1297);
match(LeftParen);
setState(1300);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,147,_ctx) ) {
case 1:
{
setState(1298);
theTypeId();
}
break;
case 2:
{
setState(1299);
constantExpression();
}
break;
}
setState(1303);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1302);
match(Ellipsis);
}
}
setState(1305);
match(RightParen);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeListContext extends ParserRuleContext {
public List attribute() {
return getRuleContexts(AttributeContext.class);
}
public AttributeContext attribute(int i) {
return getRuleContext(AttributeContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public AttributeListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeList(this);
else return visitor.visitChildren(this);
}
}
public final AttributeListContext attributeList() throws RecognitionException {
AttributeListContext _localctx = new AttributeListContext(_ctx, getState());
enterRule(_localctx, 210, RULE_attributeList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1307);
attribute();
setState(1312);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(1308);
match(Comma);
setState(1309);
attribute();
}
}
setState(1314);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1316);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1315);
match(Ellipsis);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public AttributeNamespaceContext attributeNamespace() {
return getRuleContext(AttributeNamespaceContext.class,0);
}
public TerminalNode Doublecolon() { return getToken(CPP14Parser.Doublecolon, 0); }
public AttributeArgumentClauseContext attributeArgumentClause() {
return getRuleContext(AttributeArgumentClauseContext.class,0);
}
public AttributeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attribute; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttribute(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttribute(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttribute(this);
else return visitor.visitChildren(this);
}
}
public final AttributeContext attribute() throws RecognitionException {
AttributeContext _localctx = new AttributeContext(_ctx, getState());
enterRule(_localctx, 212, RULE_attribute);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1321);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,151,_ctx) ) {
case 1:
{
setState(1318);
attributeNamespace();
setState(1319);
match(Doublecolon);
}
break;
}
setState(1323);
match(Identifier);
setState(1325);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LeftParen) {
{
setState(1324);
attributeArgumentClause();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeNamespaceContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public AttributeNamespaceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeNamespace; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeNamespace(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeNamespace(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeNamespace(this);
else return visitor.visitChildren(this);
}
}
public final AttributeNamespaceContext attributeNamespace() throws RecognitionException {
AttributeNamespaceContext _localctx = new AttributeNamespaceContext(_ctx, getState());
enterRule(_localctx, 214, RULE_attributeNamespace);
try {
enterOuterAlt(_localctx, 1);
{
setState(1327);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AttributeArgumentClauseContext extends ParserRuleContext {
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public BalancedTokenSeqContext balancedTokenSeq() {
return getRuleContext(BalancedTokenSeqContext.class,0);
}
public AttributeArgumentClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_attributeArgumentClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAttributeArgumentClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAttributeArgumentClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAttributeArgumentClause(this);
else return visitor.visitChildren(this);
}
}
public final AttributeArgumentClauseContext attributeArgumentClause() throws RecognitionException {
AttributeArgumentClauseContext _localctx = new AttributeArgumentClauseContext(_ctx, getState());
enterRule(_localctx, 216, RULE_attributeArgumentClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1329);
match(LeftParen);
setState(1331);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & -2L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & -88080385L) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & 262143L) != 0)) {
{
setState(1330);
balancedTokenSeq();
}
}
setState(1333);
match(RightParen);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BalancedTokenSeqContext extends ParserRuleContext {
public List balancedtoken() {
return getRuleContexts(BalancedtokenContext.class);
}
public BalancedtokenContext balancedtoken(int i) {
return getRuleContext(BalancedtokenContext.class,i);
}
public BalancedTokenSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_balancedTokenSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBalancedTokenSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBalancedTokenSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBalancedTokenSeq(this);
else return visitor.visitChildren(this);
}
}
public final BalancedTokenSeqContext balancedTokenSeq() throws RecognitionException {
BalancedTokenSeqContext _localctx = new BalancedTokenSeqContext(_ctx, getState());
enterRule(_localctx, 218, RULE_balancedTokenSeq);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1336);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1335);
balancedtoken();
}
}
setState(1338);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & -2L) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & -88080385L) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & 262143L) != 0) );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BalancedtokenContext extends ParserRuleContext {
public List LeftParen() { return getTokens(CPP14Parser.LeftParen); }
public TerminalNode LeftParen(int i) {
return getToken(CPP14Parser.LeftParen, i);
}
public BalancedTokenSeqContext balancedTokenSeq() {
return getRuleContext(BalancedTokenSeqContext.class,0);
}
public List RightParen() { return getTokens(CPP14Parser.RightParen); }
public TerminalNode RightParen(int i) {
return getToken(CPP14Parser.RightParen, i);
}
public List LeftBracket() { return getTokens(CPP14Parser.LeftBracket); }
public TerminalNode LeftBracket(int i) {
return getToken(CPP14Parser.LeftBracket, i);
}
public List RightBracket() { return getTokens(CPP14Parser.RightBracket); }
public TerminalNode RightBracket(int i) {
return getToken(CPP14Parser.RightBracket, i);
}
public List LeftBrace() { return getTokens(CPP14Parser.LeftBrace); }
public TerminalNode LeftBrace(int i) {
return getToken(CPP14Parser.LeftBrace, i);
}
public List RightBrace() { return getTokens(CPP14Parser.RightBrace); }
public TerminalNode RightBrace(int i) {
return getToken(CPP14Parser.RightBrace, i);
}
public BalancedtokenContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_balancedtoken; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBalancedtoken(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBalancedtoken(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBalancedtoken(this);
else return visitor.visitChildren(this);
}
}
public final BalancedtokenContext balancedtoken() throws RecognitionException {
BalancedtokenContext _localctx = new BalancedtokenContext(_ctx, getState());
enterRule(_localctx, 220, RULE_balancedtoken);
int _la;
try {
int _alt;
setState(1357);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
enterOuterAlt(_localctx, 1);
{
setState(1340);
match(LeftParen);
setState(1341);
balancedTokenSeq();
setState(1342);
match(RightParen);
}
break;
case LeftBracket:
enterOuterAlt(_localctx, 2);
{
setState(1344);
match(LeftBracket);
setState(1345);
balancedTokenSeq();
setState(1346);
match(RightBracket);
}
break;
case LeftBrace:
enterOuterAlt(_localctx, 3);
{
setState(1348);
match(LeftBrace);
setState(1349);
balancedTokenSeq();
setState(1350);
match(RightBrace);
}
break;
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case MultiLineMacro:
case Directive:
case Alignas:
case Alignof:
case Asm:
case Auto:
case Bool:
case Break:
case Case:
case Catch:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Constexpr:
case Const_cast:
case Continue:
case Decltype:
case Default:
case Delete:
case Do:
case Double:
case Dynamic_cast:
case Else:
case Enum:
case Explicit:
case Export:
case Extern:
case False_:
case Final:
case Float:
case For:
case Friend:
case Goto:
case If:
case Inline:
case Int:
case Long:
case Mutable:
case Namespace:
case New:
case Noexcept:
case Nullptr:
case Operator:
case Override:
case Private:
case Protected:
case Public:
case Register:
case Reinterpret_cast:
case Return:
case Short:
case Signed:
case Sizeof:
case Static:
case Static_assert:
case Static_cast:
case Struct:
case Switch:
case Template:
case This:
case Thread_local:
case Throw:
case True_:
case Try:
case Typedef:
case Typeid_:
case Typename_:
case Union:
case Unsigned:
case Using:
case Virtual:
case Void:
case Volatile:
case Wchar:
case While:
case Plus:
case Minus:
case Star:
case Div:
case Mod:
case Caret:
case And:
case Or:
case Tilde:
case Not:
case Assign:
case Less:
case Greater:
case PlusAssign:
case MinusAssign:
case StarAssign:
case DivAssign:
case ModAssign:
case XorAssign:
case AndAssign:
case OrAssign:
case LeftShiftAssign:
case RightShiftAssign:
case Equal:
case NotEqual:
case LessEqual:
case GreaterEqual:
case AndAnd:
case OrOr:
case PlusPlus:
case MinusMinus:
case Comma:
case ArrowStar:
case Arrow:
case Question:
case Colon:
case Doublecolon:
case Semi:
case Dot:
case DotStar:
case Ellipsis:
case Identifier:
case DecimalLiteral:
case OctalLiteral:
case HexadecimalLiteral:
case BinaryLiteral:
case Integersuffix:
case UserDefinedIntegerLiteral:
case UserDefinedFloatingLiteral:
case UserDefinedStringLiteral:
case UserDefinedCharacterLiteral:
case Whitespace:
case Newline:
case BlockComment:
case LineComment:
enterOuterAlt(_localctx, 4);
{
setState(1353);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1352);
_la = _input.LA(1);
if ( _la <= 0 || (((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 63L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1355);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,155,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitDeclaratorListContext extends ParserRuleContext {
public List initDeclarator() {
return getRuleContexts(InitDeclaratorContext.class);
}
public InitDeclaratorContext initDeclarator(int i) {
return getRuleContext(InitDeclaratorContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public InitDeclaratorListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initDeclaratorList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitDeclaratorList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitDeclaratorList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitDeclaratorList(this);
else return visitor.visitChildren(this);
}
}
public final InitDeclaratorListContext initDeclaratorList() throws RecognitionException {
InitDeclaratorListContext _localctx = new InitDeclaratorListContext(_ctx, getState());
enterRule(_localctx, 222, RULE_initDeclaratorList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1359);
initDeclarator();
setState(1364);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(1360);
match(Comma);
setState(1361);
initDeclarator();
}
}
setState(1366);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitDeclaratorContext extends ParserRuleContext {
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public InitializerContext initializer() {
return getRuleContext(InitializerContext.class,0);
}
public InitDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final InitDeclaratorContext initDeclarator() throws RecognitionException {
InitDeclaratorContext _localctx = new InitDeclaratorContext(_ctx, getState());
enterRule(_localctx, 224, RULE_initDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1367);
declarator();
setState(1369);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 65553L) != 0)) {
{
setState(1368);
initializer();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclaratorContext extends ParserRuleContext {
public PointerDeclaratorContext pointerDeclarator() {
return getRuleContext(PointerDeclaratorContext.class,0);
}
public NoPointerDeclaratorContext noPointerDeclarator() {
return getRuleContext(NoPointerDeclaratorContext.class,0);
}
public ParametersAndQualifiersContext parametersAndQualifiers() {
return getRuleContext(ParametersAndQualifiersContext.class,0);
}
public TrailingReturnTypeContext trailingReturnType() {
return getRuleContext(TrailingReturnTypeContext.class,0);
}
public DeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final DeclaratorContext declarator() throws RecognitionException {
DeclaratorContext _localctx = new DeclaratorContext(_ctx, getState());
enterRule(_localctx, 226, RULE_declarator);
try {
setState(1376);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,159,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1371);
pointerDeclarator();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1372);
noPointerDeclarator(0);
setState(1373);
parametersAndQualifiers();
setState(1374);
trailingReturnType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PointerDeclaratorContext extends ParserRuleContext {
public NoPointerDeclaratorContext noPointerDeclarator() {
return getRuleContext(NoPointerDeclaratorContext.class,0);
}
public List pointerOperator() {
return getRuleContexts(PointerOperatorContext.class);
}
public PointerOperatorContext pointerOperator(int i) {
return getRuleContext(PointerOperatorContext.class,i);
}
public List Const() { return getTokens(CPP14Parser.Const); }
public TerminalNode Const(int i) {
return getToken(CPP14Parser.Const, i);
}
public PointerDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pointerDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPointerDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPointerDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPointerDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final PointerDeclaratorContext pointerDeclarator() throws RecognitionException {
PointerDeclaratorContext _localctx = new PointerDeclaratorContext(_ctx, getState());
enterRule(_localctx, 228, RULE_pointerDeclarator);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1384);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,161,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1378);
pointerOperator();
setState(1380);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Const) {
{
setState(1379);
match(Const);
}
}
}
}
}
setState(1386);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,161,_ctx);
}
setState(1387);
noPointerDeclarator(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NoPointerDeclaratorContext extends ParserRuleContext {
public DeclaratoridContext declaratorid() {
return getRuleContext(DeclaratoridContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public PointerDeclaratorContext pointerDeclarator() {
return getRuleContext(PointerDeclaratorContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public NoPointerDeclaratorContext noPointerDeclarator() {
return getRuleContext(NoPointerDeclaratorContext.class,0);
}
public ParametersAndQualifiersContext parametersAndQualifiers() {
return getRuleContext(ParametersAndQualifiersContext.class,0);
}
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public NoPointerDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_noPointerDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNoPointerDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNoPointerDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNoPointerDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final NoPointerDeclaratorContext noPointerDeclarator() throws RecognitionException {
return noPointerDeclarator(0);
}
private NoPointerDeclaratorContext noPointerDeclarator(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NoPointerDeclaratorContext _localctx = new NoPointerDeclaratorContext(_ctx, _parentState);
NoPointerDeclaratorContext _prevctx = _localctx;
int _startState = 230;
enterRecursionRule(_localctx, 230, RULE_noPointerDeclarator, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1398);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Decltype:
case Operator:
case Tilde:
case Doublecolon:
case Ellipsis:
case Identifier:
{
setState(1390);
declaratorid();
setState(1392);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,162,_ctx) ) {
case 1:
{
setState(1391);
attributeSpecifierSeq();
}
break;
}
}
break;
case LeftParen:
{
setState(1394);
match(LeftParen);
setState(1395);
pointerDeclarator();
setState(1396);
match(RightParen);
}
break;
default:
throw new NoViableAltException(this);
}
_ctx.stop = _input.LT(-1);
setState(1414);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,167,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new NoPointerDeclaratorContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_noPointerDeclarator);
setState(1400);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(1410);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
{
setState(1401);
parametersAndQualifiers();
}
break;
case LeftBracket:
{
setState(1402);
match(LeftBracket);
setState(1404);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133137L) != 0) || _la==Identifier) {
{
setState(1403);
constantExpression();
}
}
setState(1406);
match(RightBracket);
setState(1408);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,165,_ctx) ) {
case 1:
{
setState(1407);
attributeSpecifierSeq();
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
}
}
setState(1416);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,167,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ParametersAndQualifiersContext extends ParserRuleContext {
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public ParameterDeclarationClauseContext parameterDeclarationClause() {
return getRuleContext(ParameterDeclarationClauseContext.class,0);
}
public CvqualifierseqContext cvqualifierseq() {
return getRuleContext(CvqualifierseqContext.class,0);
}
public RefqualifierContext refqualifier() {
return getRuleContext(RefqualifierContext.class,0);
}
public ExceptionSpecificationContext exceptionSpecification() {
return getRuleContext(ExceptionSpecificationContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public ParametersAndQualifiersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parametersAndQualifiers; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterParametersAndQualifiers(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitParametersAndQualifiers(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitParametersAndQualifiers(this);
else return visitor.visitChildren(this);
}
}
public final ParametersAndQualifiersContext parametersAndQualifiers() throws RecognitionException {
ParametersAndQualifiersContext _localctx = new ParametersAndQualifiersContext(_ctx, getState());
enterRule(_localctx, 232, RULE_parametersAndQualifiers);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1417);
match(LeftParen);
setState(1419);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1237504995584196377L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 297237575406461917L) != 0)) {
{
setState(1418);
parameterDeclarationClause();
}
}
setState(1421);
match(RightParen);
setState(1423);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,169,_ctx) ) {
case 1:
{
setState(1422);
cvqualifierseq();
}
break;
}
setState(1426);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,170,_ctx) ) {
case 1:
{
setState(1425);
refqualifier();
}
break;
}
setState(1429);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,171,_ctx) ) {
case 1:
{
setState(1428);
exceptionSpecification();
}
break;
}
setState(1432);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) {
case 1:
{
setState(1431);
attributeSpecifierSeq();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TrailingReturnTypeContext extends ParserRuleContext {
public TerminalNode Arrow() { return getToken(CPP14Parser.Arrow, 0); }
public TrailingTypeSpecifierSeqContext trailingTypeSpecifierSeq() {
return getRuleContext(TrailingTypeSpecifierSeqContext.class,0);
}
public AbstractDeclaratorContext abstractDeclarator() {
return getRuleContext(AbstractDeclaratorContext.class,0);
}
public TrailingReturnTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_trailingReturnType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTrailingReturnType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTrailingReturnType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTrailingReturnType(this);
else return visitor.visitChildren(this);
}
}
public final TrailingReturnTypeContext trailingReturnType() throws RecognitionException {
TrailingReturnTypeContext _localctx = new TrailingReturnTypeContext(_ctx, getState());
enterRule(_localctx, 234, RULE_trailingReturnType);
try {
enterOuterAlt(_localctx, 1);
{
setState(1434);
match(Arrow);
setState(1435);
trailingTypeSpecifierSeq();
setState(1437);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,173,_ctx) ) {
case 1:
{
setState(1436);
abstractDeclarator();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PointerOperatorContext extends ParserRuleContext {
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public TerminalNode AndAnd() { return getToken(CPP14Parser.AndAnd, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode Star() { return getToken(CPP14Parser.Star, 0); }
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public CvqualifierseqContext cvqualifierseq() {
return getRuleContext(CvqualifierseqContext.class,0);
}
public PointerOperatorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pointerOperator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPointerOperator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPointerOperator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPointerOperator(this);
else return visitor.visitChildren(this);
}
}
public final PointerOperatorContext pointerOperator() throws RecognitionException {
PointerOperatorContext _localctx = new PointerOperatorContext(_ctx, getState());
enterRule(_localctx, 236, RULE_pointerOperator);
int _la;
try {
setState(1453);
_errHandler.sync(this);
switch (_input.LA(1)) {
case And:
case AndAnd:
enterOuterAlt(_localctx, 1);
{
setState(1439);
_la = _input.LA(1);
if ( !(_la==And || _la==AndAnd) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1441);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,174,_ctx) ) {
case 1:
{
setState(1440);
attributeSpecifierSeq();
}
break;
}
}
break;
case Decltype:
case Star:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 2);
{
setState(1444);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Decltype || _la==Doublecolon || _la==Identifier) {
{
setState(1443);
nestedNameSpecifier(0);
}
}
setState(1446);
match(Star);
setState(1448);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,176,_ctx) ) {
case 1:
{
setState(1447);
attributeSpecifierSeq();
}
break;
}
setState(1451);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) {
case 1:
{
setState(1450);
cvqualifierseq();
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CvqualifierseqContext extends ParserRuleContext {
public List cvQualifier() {
return getRuleContexts(CvQualifierContext.class);
}
public CvQualifierContext cvQualifier(int i) {
return getRuleContext(CvQualifierContext.class,i);
}
public CvqualifierseqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cvqualifierseq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCvqualifierseq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCvqualifierseq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCvqualifierseq(this);
else return visitor.visitChildren(this);
}
}
public final CvqualifierseqContext cvqualifierseq() throws RecognitionException {
CvqualifierseqContext _localctx = new CvqualifierseqContext(_ctx, getState());
enterRule(_localctx, 238, RULE_cvqualifierseq);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1456);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1455);
cvQualifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1458);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,179,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class CvQualifierContext extends ParserRuleContext {
public TerminalNode Const() { return getToken(CPP14Parser.Const, 0); }
public TerminalNode Volatile() { return getToken(CPP14Parser.Volatile, 0); }
public CvQualifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_cvQualifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterCvQualifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitCvQualifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitCvQualifier(this);
else return visitor.visitChildren(this);
}
}
public final CvQualifierContext cvQualifier() throws RecognitionException {
CvQualifierContext _localctx = new CvQualifierContext(_ctx, getState());
enterRule(_localctx, 240, RULE_cvQualifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1460);
_la = _input.LA(1);
if ( !(_la==Const || _la==Volatile) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class RefqualifierContext extends ParserRuleContext {
public TerminalNode And() { return getToken(CPP14Parser.And, 0); }
public TerminalNode AndAnd() { return getToken(CPP14Parser.AndAnd, 0); }
public RefqualifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_refqualifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterRefqualifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitRefqualifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitRefqualifier(this);
else return visitor.visitChildren(this);
}
}
public final RefqualifierContext refqualifier() throws RecognitionException {
RefqualifierContext _localctx = new RefqualifierContext(_ctx, getState());
enterRule(_localctx, 242, RULE_refqualifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1462);
_la = _input.LA(1);
if ( !(_la==And || _la==AndAnd) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class DeclaratoridContext extends ParserRuleContext {
public IdExpressionContext idExpression() {
return getRuleContext(IdExpressionContext.class,0);
}
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public DeclaratoridContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declaratorid; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterDeclaratorid(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitDeclaratorid(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitDeclaratorid(this);
else return visitor.visitChildren(this);
}
}
public final DeclaratoridContext declaratorid() throws RecognitionException {
DeclaratoridContext _localctx = new DeclaratoridContext(_ctx, getState());
enterRule(_localctx, 244, RULE_declaratorid);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1465);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1464);
match(Ellipsis);
}
}
setState(1467);
idExpression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TheTypeIdContext extends ParserRuleContext {
public TypeSpecifierSeqContext typeSpecifierSeq() {
return getRuleContext(TypeSpecifierSeqContext.class,0);
}
public AbstractDeclaratorContext abstractDeclarator() {
return getRuleContext(AbstractDeclaratorContext.class,0);
}
public TheTypeIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_theTypeId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTheTypeId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTheTypeId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitTheTypeId(this);
else return visitor.visitChildren(this);
}
}
public final TheTypeIdContext theTypeId() throws RecognitionException {
TheTypeIdContext _localctx = new TheTypeIdContext(_ctx, getState());
enterRule(_localctx, 246, RULE_theTypeId);
try {
enterOuterAlt(_localctx, 1);
{
setState(1469);
typeSpecifierSeq();
setState(1471);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,181,_ctx) ) {
case 1:
{
setState(1470);
abstractDeclarator();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AbstractDeclaratorContext extends ParserRuleContext {
public PointerAbstractDeclaratorContext pointerAbstractDeclarator() {
return getRuleContext(PointerAbstractDeclaratorContext.class,0);
}
public ParametersAndQualifiersContext parametersAndQualifiers() {
return getRuleContext(ParametersAndQualifiersContext.class,0);
}
public TrailingReturnTypeContext trailingReturnType() {
return getRuleContext(TrailingReturnTypeContext.class,0);
}
public NoPointerAbstractDeclaratorContext noPointerAbstractDeclarator() {
return getRuleContext(NoPointerAbstractDeclaratorContext.class,0);
}
public AbstractPackDeclaratorContext abstractPackDeclarator() {
return getRuleContext(AbstractPackDeclaratorContext.class,0);
}
public AbstractDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_abstractDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAbstractDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAbstractDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAbstractDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final AbstractDeclaratorContext abstractDeclarator() throws RecognitionException {
AbstractDeclaratorContext _localctx = new AbstractDeclaratorContext(_ctx, getState());
enterRule(_localctx, 248, RULE_abstractDeclarator);
try {
setState(1481);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,183,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1473);
pointerAbstractDeclarator();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1475);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,182,_ctx) ) {
case 1:
{
setState(1474);
noPointerAbstractDeclarator(0);
}
break;
}
setState(1477);
parametersAndQualifiers();
setState(1478);
trailingReturnType();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1480);
abstractPackDeclarator();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PointerAbstractDeclaratorContext extends ParserRuleContext {
public NoPointerAbstractDeclaratorContext noPointerAbstractDeclarator() {
return getRuleContext(NoPointerAbstractDeclaratorContext.class,0);
}
public List pointerOperator() {
return getRuleContexts(PointerOperatorContext.class);
}
public PointerOperatorContext pointerOperator(int i) {
return getRuleContext(PointerOperatorContext.class,i);
}
public PointerAbstractDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pointerAbstractDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPointerAbstractDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPointerAbstractDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPointerAbstractDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final PointerAbstractDeclaratorContext pointerAbstractDeclarator() throws RecognitionException {
PointerAbstractDeclaratorContext _localctx = new PointerAbstractDeclaratorContext(_ctx, getState());
enterRule(_localctx, 250, RULE_pointerAbstractDeclarator);
try {
int _alt;
setState(1492);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
case LeftBracket:
enterOuterAlt(_localctx, 1);
{
setState(1483);
noPointerAbstractDeclarator(0);
}
break;
case Decltype:
case Star:
case And:
case AndAnd:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 2);
{
setState(1485);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1484);
pointerOperator();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1487);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,184,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1490);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) {
case 1:
{
setState(1489);
noPointerAbstractDeclarator(0);
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NoPointerAbstractDeclaratorContext extends ParserRuleContext {
public ParametersAndQualifiersContext parametersAndQualifiers() {
return getRuleContext(ParametersAndQualifiersContext.class,0);
}
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public PointerAbstractDeclaratorContext pointerAbstractDeclarator() {
return getRuleContext(PointerAbstractDeclaratorContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public List noPointerAbstractDeclarator() {
return getRuleContexts(NoPointerAbstractDeclaratorContext.class);
}
public NoPointerAbstractDeclaratorContext noPointerAbstractDeclarator(int i) {
return getRuleContext(NoPointerAbstractDeclaratorContext.class,i);
}
public NoPointerAbstractDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_noPointerAbstractDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNoPointerAbstractDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNoPointerAbstractDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNoPointerAbstractDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final NoPointerAbstractDeclaratorContext noPointerAbstractDeclarator() throws RecognitionException {
return noPointerAbstractDeclarator(0);
}
private NoPointerAbstractDeclaratorContext noPointerAbstractDeclarator(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NoPointerAbstractDeclaratorContext _localctx = new NoPointerAbstractDeclaratorContext(_ctx, _parentState);
NoPointerAbstractDeclaratorContext _prevctx = _localctx;
int _startState = 252;
enterRecursionRule(_localctx, 252, RULE_noPointerAbstractDeclarator, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1508);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,189,_ctx) ) {
case 1:
{
setState(1495);
parametersAndQualifiers();
}
break;
case 2:
{
setState(1496);
match(LeftBracket);
setState(1498);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133137L) != 0) || _la==Identifier) {
{
setState(1497);
constantExpression();
}
}
setState(1500);
match(RightBracket);
setState(1502);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,188,_ctx) ) {
case 1:
{
setState(1501);
attributeSpecifierSeq();
}
break;
}
}
break;
case 3:
{
setState(1504);
match(LeftParen);
setState(1505);
pointerAbstractDeclarator();
setState(1506);
match(RightParen);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(1525);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new NoPointerAbstractDeclaratorContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_noPointerAbstractDeclarator);
setState(1510);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(1521);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) {
case 1:
{
setState(1511);
parametersAndQualifiers();
}
break;
case 2:
{
setState(1512);
noPointerAbstractDeclarator(0);
setState(1513);
match(LeftBracket);
setState(1515);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133137L) != 0) || _la==Identifier) {
{
setState(1514);
constantExpression();
}
}
setState(1517);
match(RightBracket);
setState(1519);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,191,_ctx) ) {
case 1:
{
setState(1518);
attributeSpecifierSeq();
}
break;
}
}
break;
}
}
}
}
setState(1527);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AbstractPackDeclaratorContext extends ParserRuleContext {
public NoPointerAbstractPackDeclaratorContext noPointerAbstractPackDeclarator() {
return getRuleContext(NoPointerAbstractPackDeclaratorContext.class,0);
}
public List pointerOperator() {
return getRuleContexts(PointerOperatorContext.class);
}
public PointerOperatorContext pointerOperator(int i) {
return getRuleContext(PointerOperatorContext.class,i);
}
public AbstractPackDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_abstractPackDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAbstractPackDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAbstractPackDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAbstractPackDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final AbstractPackDeclaratorContext abstractPackDeclarator() throws RecognitionException {
AbstractPackDeclaratorContext _localctx = new AbstractPackDeclaratorContext(_ctx, getState());
enterRule(_localctx, 254, RULE_abstractPackDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1531);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Decltype || ((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & 566969237521L) != 0)) {
{
{
setState(1528);
pointerOperator();
}
}
setState(1533);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1534);
noPointerAbstractPackDeclarator(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class NoPointerAbstractPackDeclaratorContext extends ParserRuleContext {
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public NoPointerAbstractPackDeclaratorContext noPointerAbstractPackDeclarator() {
return getRuleContext(NoPointerAbstractPackDeclaratorContext.class,0);
}
public ParametersAndQualifiersContext parametersAndQualifiers() {
return getRuleContext(ParametersAndQualifiersContext.class,0);
}
public TerminalNode LeftBracket() { return getToken(CPP14Parser.LeftBracket, 0); }
public TerminalNode RightBracket() { return getToken(CPP14Parser.RightBracket, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public NoPointerAbstractPackDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_noPointerAbstractPackDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterNoPointerAbstractPackDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitNoPointerAbstractPackDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitNoPointerAbstractPackDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final NoPointerAbstractPackDeclaratorContext noPointerAbstractPackDeclarator() throws RecognitionException {
return noPointerAbstractPackDeclarator(0);
}
private NoPointerAbstractPackDeclaratorContext noPointerAbstractPackDeclarator(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
NoPointerAbstractPackDeclaratorContext _localctx = new NoPointerAbstractPackDeclaratorContext(_ctx, _parentState);
NoPointerAbstractPackDeclaratorContext _prevctx = _localctx;
int _startState = 256;
enterRecursionRule(_localctx, 256, RULE_noPointerAbstractPackDeclarator, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(1537);
match(Ellipsis);
}
_ctx.stop = _input.LT(-1);
setState(1553);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,198,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new NoPointerAbstractPackDeclaratorContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_noPointerAbstractPackDeclarator);
setState(1539);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(1549);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
{
setState(1540);
parametersAndQualifiers();
}
break;
case LeftBracket:
{
setState(1541);
match(LeftBracket);
setState(1543);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474384133137L) != 0) || _la==Identifier) {
{
setState(1542);
constantExpression();
}
}
setState(1545);
match(RightBracket);
setState(1547);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,196,_ctx) ) {
case 1:
{
setState(1546);
attributeSpecifierSeq();
}
break;
}
}
break;
default:
throw new NoViableAltException(this);
}
}
}
}
setState(1555);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,198,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ParameterDeclarationClauseContext extends ParserRuleContext {
public ParameterDeclarationListContext parameterDeclarationList() {
return getRuleContext(ParameterDeclarationListContext.class,0);
}
public TerminalNode Ellipsis() { return getToken(CPP14Parser.Ellipsis, 0); }
public TerminalNode Comma() { return getToken(CPP14Parser.Comma, 0); }
public ParameterDeclarationClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameterDeclarationClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterParameterDeclarationClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitParameterDeclarationClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitParameterDeclarationClause(this);
else return visitor.visitChildren(this);
}
}
public final ParameterDeclarationClauseContext parameterDeclarationClause() throws RecognitionException {
ParameterDeclarationClauseContext _localctx = new ParameterDeclarationClauseContext(_ctx, getState());
enterRule(_localctx, 258, RULE_parameterDeclarationClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1556);
parameterDeclarationList();
setState(1561);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Comma || _la==Ellipsis) {
{
setState(1558);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Comma) {
{
setState(1557);
match(Comma);
}
}
setState(1560);
match(Ellipsis);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ParameterDeclarationListContext extends ParserRuleContext {
public List parameterDeclaration() {
return getRuleContexts(ParameterDeclarationContext.class);
}
public ParameterDeclarationContext parameterDeclaration(int i) {
return getRuleContext(ParameterDeclarationContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public ParameterDeclarationListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameterDeclarationList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterParameterDeclarationList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitParameterDeclarationList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitParameterDeclarationList(this);
else return visitor.visitChildren(this);
}
}
public final ParameterDeclarationListContext parameterDeclarationList() throws RecognitionException {
ParameterDeclarationListContext _localctx = new ParameterDeclarationListContext(_ctx, getState());
enterRule(_localctx, 260, RULE_parameterDeclarationList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1563);
parameterDeclaration();
setState(1568);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,201,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1564);
match(Comma);
setState(1565);
parameterDeclaration();
}
}
}
setState(1570);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,201,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ParameterDeclarationContext extends ParserRuleContext {
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public InitializerClauseContext initializerClause() {
return getRuleContext(InitializerClauseContext.class,0);
}
public AbstractDeclaratorContext abstractDeclarator() {
return getRuleContext(AbstractDeclaratorContext.class,0);
}
public ParameterDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameterDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterParameterDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitParameterDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitParameterDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ParameterDeclarationContext parameterDeclaration() throws RecognitionException {
ParameterDeclarationContext _localctx = new ParameterDeclarationContext(_ctx, getState());
enterRule(_localctx, 262, RULE_parameterDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1572);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1571);
attributeSpecifierSeq();
}
}
setState(1574);
declSpecifierSeq();
setState(1579);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) {
case 1:
{
setState(1575);
declarator();
}
break;
case 2:
{
setState(1577);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,203,_ctx) ) {
case 1:
{
setState(1576);
abstractDeclarator();
}
break;
}
}
break;
}
setState(1583);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Assign) {
{
setState(1581);
match(Assign);
setState(1582);
initializerClause();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FunctionDefinitionContext extends ParserRuleContext {
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public FunctionBodyContext functionBody() {
return getRuleContext(FunctionBodyContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public VirtualSpecifierSeqContext virtualSpecifierSeq() {
return getRuleContext(VirtualSpecifierSeqContext.class,0);
}
public FunctionDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterFunctionDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitFunctionDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitFunctionDefinition(this);
else return visitor.visitChildren(this);
}
}
public final FunctionDefinitionContext functionDefinition() throws RecognitionException {
FunctionDefinitionContext _localctx = new FunctionDefinitionContext(_ctx, getState());
enterRule(_localctx, 264, RULE_functionDefinition);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1586);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1585);
attributeSpecifierSeq();
}
}
setState(1589);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,207,_ctx) ) {
case 1:
{
setState(1588);
declSpecifierSeq();
}
break;
}
setState(1591);
declarator();
setState(1593);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Final || _la==Override) {
{
setState(1592);
virtualSpecifierSeq();
}
}
setState(1595);
functionBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class FunctionBodyContext extends ParserRuleContext {
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public ConstructorInitializerContext constructorInitializer() {
return getRuleContext(ConstructorInitializerContext.class,0);
}
public FunctionTryBlockContext functionTryBlock() {
return getRuleContext(FunctionTryBlockContext.class,0);
}
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public TerminalNode Default() { return getToken(CPP14Parser.Default, 0); }
public TerminalNode Delete() { return getToken(CPP14Parser.Delete, 0); }
public FunctionBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterFunctionBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitFunctionBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitFunctionBody(this);
else return visitor.visitChildren(this);
}
}
public final FunctionBodyContext functionBody() throws RecognitionException {
FunctionBodyContext _localctx = new FunctionBodyContext(_ctx, getState());
enterRule(_localctx, 266, RULE_functionBody);
int _la;
try {
setState(1605);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftBrace:
case Colon:
enterOuterAlt(_localctx, 1);
{
setState(1598);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Colon) {
{
setState(1597);
constructorInitializer();
}
}
setState(1600);
compoundStatement();
}
break;
case Try:
enterOuterAlt(_localctx, 2);
{
setState(1601);
functionTryBlock();
}
break;
case Assign:
enterOuterAlt(_localctx, 3);
{
setState(1602);
match(Assign);
setState(1603);
_la = _input.LA(1);
if ( !(_la==Default || _la==Delete) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1604);
match(Semi);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitializerContext extends ParserRuleContext {
public BraceOrEqualInitializerContext braceOrEqualInitializer() {
return getRuleContext(BraceOrEqualInitializerContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public ExpressionListContext expressionList() {
return getRuleContext(ExpressionListContext.class,0);
}
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public InitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitializer(this);
else return visitor.visitChildren(this);
}
}
public final InitializerContext initializer() throws RecognitionException {
InitializerContext _localctx = new InitializerContext(_ctx, getState());
enterRule(_localctx, 268, RULE_initializer);
try {
setState(1612);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftBrace:
case Assign:
enterOuterAlt(_localctx, 1);
{
setState(1607);
braceOrEqualInitializer();
}
break;
case LeftParen:
enterOuterAlt(_localctx, 2);
{
setState(1608);
match(LeftParen);
setState(1609);
expressionList();
setState(1610);
match(RightParen);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BraceOrEqualInitializerContext extends ParserRuleContext {
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public InitializerClauseContext initializerClause() {
return getRuleContext(InitializerClauseContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public BraceOrEqualInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_braceOrEqualInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBraceOrEqualInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBraceOrEqualInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBraceOrEqualInitializer(this);
else return visitor.visitChildren(this);
}
}
public final BraceOrEqualInitializerContext braceOrEqualInitializer() throws RecognitionException {
BraceOrEqualInitializerContext _localctx = new BraceOrEqualInitializerContext(_ctx, getState());
enterRule(_localctx, 270, RULE_braceOrEqualInitializer);
try {
setState(1617);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Assign:
enterOuterAlt(_localctx, 1);
{
setState(1614);
match(Assign);
setState(1615);
initializerClause();
}
break;
case LeftBrace:
enterOuterAlt(_localctx, 2);
{
setState(1616);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitializerClauseContext extends ParserRuleContext {
public AssignmentExpressionContext assignmentExpression() {
return getRuleContext(AssignmentExpressionContext.class,0);
}
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public InitializerClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initializerClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitializerClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitializerClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitializerClause(this);
else return visitor.visitChildren(this);
}
}
public final InitializerClauseContext initializerClause() throws RecognitionException {
InitializerClauseContext _localctx = new InitializerClauseContext(_ctx, getState());
enterRule(_localctx, 272, RULE_initializerClause);
try {
setState(1621);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IntegerLiteral:
case CharacterLiteral:
case FloatingLiteral:
case StringLiteral:
case BooleanLiteral:
case PointerLiteral:
case UserDefinedLiteral:
case Alignof:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Const_cast:
case Decltype:
case Delete:
case Double:
case Dynamic_cast:
case Float:
case Int:
case Long:
case New:
case Noexcept:
case Operator:
case Reinterpret_cast:
case Short:
case Signed:
case Sizeof:
case Static_cast:
case This:
case Throw:
case Typeid_:
case Typename_:
case Unsigned:
case Void:
case Wchar:
case LeftParen:
case LeftBracket:
case Plus:
case Minus:
case Star:
case And:
case Or:
case Tilde:
case Not:
case PlusPlus:
case MinusMinus:
case Doublecolon:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1619);
assignmentExpression();
}
break;
case LeftBrace:
enterOuterAlt(_localctx, 2);
{
setState(1620);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class InitializerListContext extends ParserRuleContext {
public List initializerClause() {
return getRuleContexts(InitializerClauseContext.class);
}
public InitializerClauseContext initializerClause(int i) {
return getRuleContext(InitializerClauseContext.class,i);
}
public List Ellipsis() { return getTokens(CPP14Parser.Ellipsis); }
public TerminalNode Ellipsis(int i) {
return getToken(CPP14Parser.Ellipsis, i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public InitializerListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_initializerList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterInitializerList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitInitializerList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitInitializerList(this);
else return visitor.visitChildren(this);
}
}
public final InitializerListContext initializerList() throws RecognitionException {
InitializerListContext _localctx = new InitializerListContext(_ctx, getState());
enterRule(_localctx, 274, RULE_initializerList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1623);
initializerClause();
setState(1625);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1624);
match(Ellipsis);
}
}
setState(1634);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,216,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1627);
match(Comma);
setState(1628);
initializerClause();
setState(1630);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1629);
match(Ellipsis);
}
}
}
}
}
setState(1636);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,216,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BracedInitListContext extends ParserRuleContext {
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public InitializerListContext initializerList() {
return getRuleContext(InitializerListContext.class,0);
}
public TerminalNode Comma() { return getToken(CPP14Parser.Comma, 0); }
public BracedInitListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bracedInitList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBracedInitList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBracedInitList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBracedInitList(this);
else return visitor.visitChildren(this);
}
}
public final BracedInitListContext bracedInitList() throws RecognitionException {
BracedInitListContext _localctx = new BracedInitListContext(_ctx, getState());
enterRule(_localctx, 276, RULE_bracedInitList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1637);
match(LeftBrace);
setState(1642);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474400910417L) != 0) || _la==Identifier) {
{
setState(1638);
initializerList();
setState(1640);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Comma) {
{
setState(1639);
match(Comma);
}
}
}
}
setState(1644);
match(RightBrace);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public SimpleTemplateIdContext simpleTemplateId() {
return getRuleContext(SimpleTemplateIdContext.class,0);
}
public ClassNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_className; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassName(this);
else return visitor.visitChildren(this);
}
}
public final ClassNameContext className() throws RecognitionException {
ClassNameContext _localctx = new ClassNameContext(_ctx, getState());
enterRule(_localctx, 278, RULE_className);
try {
setState(1648);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,219,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1646);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1647);
simpleTemplateId();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassSpecifierContext extends ParserRuleContext {
public ClassHeadContext classHead() {
return getRuleContext(ClassHeadContext.class,0);
}
public TerminalNode LeftBrace() { return getToken(CPP14Parser.LeftBrace, 0); }
public TerminalNode RightBrace() { return getToken(CPP14Parser.RightBrace, 0); }
public MemberSpecificationContext memberSpecification() {
return getRuleContext(MemberSpecificationContext.class,0);
}
public ClassSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final ClassSpecifierContext classSpecifier() throws RecognitionException {
ClassSpecifierContext _localctx = new ClassSpecifierContext(_ctx, getState());
enterRule(_localctx, 280, RULE_classSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1650);
classHead();
setState(1651);
match(LeftBrace);
setState(1653);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543877313594212121L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 463888353847684093L) != 0)) {
{
setState(1652);
memberSpecification();
}
}
setState(1655);
match(RightBrace);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassHeadContext extends ParserRuleContext {
public ClassKeyContext classKey() {
return getRuleContext(ClassKeyContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public ClassHeadNameContext classHeadName() {
return getRuleContext(ClassHeadNameContext.class,0);
}
public BaseClauseContext baseClause() {
return getRuleContext(BaseClauseContext.class,0);
}
public ClassVirtSpecifierContext classVirtSpecifier() {
return getRuleContext(ClassVirtSpecifierContext.class,0);
}
public TerminalNode Union() { return getToken(CPP14Parser.Union, 0); }
public ClassHeadContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classHead; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassHead(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassHead(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassHead(this);
else return visitor.visitChildren(this);
}
}
public final ClassHeadContext classHead() throws RecognitionException {
ClassHeadContext _localctx = new ClassHeadContext(_ctx, getState());
enterRule(_localctx, 282, RULE_classHead);
int _la;
try {
setState(1680);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Class:
case Struct:
enterOuterAlt(_localctx, 1);
{
setState(1657);
classKey();
setState(1659);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1658);
attributeSpecifierSeq();
}
}
setState(1665);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Decltype || _la==Doublecolon || _la==Identifier) {
{
setState(1661);
classHeadName();
setState(1663);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Final) {
{
setState(1662);
classVirtSpecifier();
}
}
}
}
setState(1668);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Colon) {
{
setState(1667);
baseClause();
}
}
}
break;
case Union:
enterOuterAlt(_localctx, 2);
{
setState(1670);
match(Union);
setState(1672);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1671);
attributeSpecifierSeq();
}
}
setState(1678);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Decltype || _la==Doublecolon || _la==Identifier) {
{
setState(1674);
classHeadName();
setState(1676);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Final) {
{
setState(1675);
classVirtSpecifier();
}
}
}
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassHeadNameContext extends ParserRuleContext {
public ClassNameContext className() {
return getRuleContext(ClassNameContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public ClassHeadNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classHeadName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassHeadName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassHeadName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassHeadName(this);
else return visitor.visitChildren(this);
}
}
public final ClassHeadNameContext classHeadName() throws RecognitionException {
ClassHeadNameContext _localctx = new ClassHeadNameContext(_ctx, getState());
enterRule(_localctx, 284, RULE_classHeadName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1683);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,229,_ctx) ) {
case 1:
{
setState(1682);
nestedNameSpecifier(0);
}
break;
}
setState(1685);
className();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassVirtSpecifierContext extends ParserRuleContext {
public TerminalNode Final() { return getToken(CPP14Parser.Final, 0); }
public ClassVirtSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classVirtSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassVirtSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassVirtSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassVirtSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final ClassVirtSpecifierContext classVirtSpecifier() throws RecognitionException {
ClassVirtSpecifierContext _localctx = new ClassVirtSpecifierContext(_ctx, getState());
enterRule(_localctx, 286, RULE_classVirtSpecifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1687);
match(Final);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassKeyContext extends ParserRuleContext {
public TerminalNode Class() { return getToken(CPP14Parser.Class, 0); }
public TerminalNode Struct() { return getToken(CPP14Parser.Struct, 0); }
public ClassKeyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classKey; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassKey(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassKey(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassKey(this);
else return visitor.visitChildren(this);
}
}
public final ClassKeyContext classKey() throws RecognitionException {
ClassKeyContext _localctx = new ClassKeyContext(_ctx, getState());
enterRule(_localctx, 288, RULE_classKey);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1689);
_la = _input.LA(1);
if ( !(_la==Class || _la==Struct) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemberSpecificationContext extends ParserRuleContext {
public List memberdeclaration() {
return getRuleContexts(MemberdeclarationContext.class);
}
public MemberdeclarationContext memberdeclaration(int i) {
return getRuleContext(MemberdeclarationContext.class,i);
}
public List accessSpecifier() {
return getRuleContexts(AccessSpecifierContext.class);
}
public AccessSpecifierContext accessSpecifier(int i) {
return getRuleContext(AccessSpecifierContext.class,i);
}
public List Colon() { return getTokens(CPP14Parser.Colon); }
public TerminalNode Colon(int i) {
return getToken(CPP14Parser.Colon, i);
}
public MemberSpecificationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memberSpecification; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemberSpecification(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemberSpecification(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemberSpecification(this);
else return visitor.visitChildren(this);
}
}
public final MemberSpecificationContext memberSpecification() throws RecognitionException {
MemberSpecificationContext _localctx = new MemberSpecificationContext(_ctx, getState());
enterRule(_localctx, 290, RULE_memberSpecification);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1695);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
setState(1695);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Alignas:
case Auto:
case Bool:
case Char:
case Char16:
case Char32:
case Class:
case Const:
case Constexpr:
case Decltype:
case Double:
case Enum:
case Explicit:
case Extern:
case Float:
case Friend:
case Inline:
case Int:
case Long:
case Mutable:
case Operator:
case Register:
case Short:
case Signed:
case Static:
case Static_assert:
case Struct:
case Template:
case Thread_local:
case Typedef:
case Typename_:
case Union:
case Unsigned:
case Using:
case Virtual:
case Void:
case Volatile:
case Wchar:
case LeftParen:
case LeftBracket:
case Star:
case And:
case Tilde:
case AndAnd:
case Colon:
case Doublecolon:
case Semi:
case Ellipsis:
case Identifier:
{
setState(1691);
memberdeclaration();
}
break;
case Private:
case Protected:
case Public:
{
setState(1692);
accessSpecifier();
setState(1693);
match(Colon);
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(1697);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_la - 10)) & ~0x3f) == 0 && ((1L << (_la - 10)) & 1543877313594212121L) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & 463888353847684093L) != 0) );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemberdeclarationContext extends ParserRuleContext {
public TerminalNode Semi() { return getToken(CPP14Parser.Semi, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public DeclSpecifierSeqContext declSpecifierSeq() {
return getRuleContext(DeclSpecifierSeqContext.class,0);
}
public MemberDeclaratorListContext memberDeclaratorList() {
return getRuleContext(MemberDeclaratorListContext.class,0);
}
public FunctionDefinitionContext functionDefinition() {
return getRuleContext(FunctionDefinitionContext.class,0);
}
public UsingDeclarationContext usingDeclaration() {
return getRuleContext(UsingDeclarationContext.class,0);
}
public StaticAssertDeclarationContext staticAssertDeclaration() {
return getRuleContext(StaticAssertDeclarationContext.class,0);
}
public TemplateDeclarationContext templateDeclaration() {
return getRuleContext(TemplateDeclarationContext.class,0);
}
public AliasDeclarationContext aliasDeclaration() {
return getRuleContext(AliasDeclarationContext.class,0);
}
public EmptyDeclaration_Context emptyDeclaration_() {
return getRuleContext(EmptyDeclaration_Context.class,0);
}
public MemberdeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memberdeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemberdeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemberdeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemberdeclaration(this);
else return visitor.visitChildren(this);
}
}
public final MemberdeclarationContext memberdeclaration() throws RecognitionException {
MemberdeclarationContext _localctx = new MemberdeclarationContext(_ctx, getState());
enterRule(_localctx, 292, RULE_memberdeclaration);
int _la;
try {
setState(1715);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,235,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1700);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,232,_ctx) ) {
case 1:
{
setState(1699);
attributeSpecifierSeq();
}
break;
}
setState(1703);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,233,_ctx) ) {
case 1:
{
setState(1702);
declSpecifierSeq();
}
break;
}
setState(1706);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599694480384L) != 0) || ((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & 217711892254981L) != 0)) {
{
setState(1705);
memberDeclaratorList();
}
}
setState(1708);
match(Semi);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1709);
functionDefinition();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1710);
usingDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1711);
staticAssertDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1712);
templateDeclaration();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1713);
aliasDeclaration();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1714);
emptyDeclaration_();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemberDeclaratorListContext extends ParserRuleContext {
public List memberDeclarator() {
return getRuleContexts(MemberDeclaratorContext.class);
}
public MemberDeclaratorContext memberDeclarator(int i) {
return getRuleContext(MemberDeclaratorContext.class,i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public MemberDeclaratorListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memberDeclaratorList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemberDeclaratorList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemberDeclaratorList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemberDeclaratorList(this);
else return visitor.visitChildren(this);
}
}
public final MemberDeclaratorListContext memberDeclaratorList() throws RecognitionException {
MemberDeclaratorListContext _localctx = new MemberDeclaratorListContext(_ctx, getState());
enterRule(_localctx, 294, RULE_memberDeclaratorList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1717);
memberDeclarator();
setState(1722);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(1718);
match(Comma);
setState(1719);
memberDeclarator();
}
}
setState(1724);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemberDeclaratorContext extends ParserRuleContext {
public DeclaratorContext declarator() {
return getRuleContext(DeclaratorContext.class,0);
}
public VirtualSpecifierSeqContext virtualSpecifierSeq() {
return getRuleContext(VirtualSpecifierSeqContext.class,0);
}
public PureSpecifierContext pureSpecifier() {
return getRuleContext(PureSpecifierContext.class,0);
}
public BraceOrEqualInitializerContext braceOrEqualInitializer() {
return getRuleContext(BraceOrEqualInitializerContext.class,0);
}
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public MemberDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memberDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemberDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemberDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemberDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final MemberDeclaratorContext memberDeclarator() throws RecognitionException {
MemberDeclaratorContext _localctx = new MemberDeclaratorContext(_ctx, getState());
enterRule(_localctx, 296, RULE_memberDeclarator);
int _la;
try {
setState(1745);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,240,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1725);
declarator();
setState(1734);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,237,_ctx) ) {
case 1:
{
setState(1726);
virtualSpecifierSeq();
}
break;
case 2:
{
setState(1727);
if (!( this.IsPureSpecifierAllowed() )) throw new FailedPredicateException(this, " this.IsPureSpecifierAllowed() ");
setState(1728);
pureSpecifier();
}
break;
case 3:
{
setState(1729);
if (!( this.IsPureSpecifierAllowed() )) throw new FailedPredicateException(this, " this.IsPureSpecifierAllowed() ");
setState(1730);
virtualSpecifierSeq();
setState(1731);
pureSpecifier();
}
break;
case 4:
{
setState(1733);
braceOrEqualInitializer();
}
break;
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1736);
declarator();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1738);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1737);
match(Identifier);
}
}
setState(1741);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1740);
attributeSpecifierSeq();
}
}
setState(1743);
match(Colon);
setState(1744);
constantExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class VirtualSpecifierSeqContext extends ParserRuleContext {
public List virtualSpecifier() {
return getRuleContexts(VirtualSpecifierContext.class);
}
public VirtualSpecifierContext virtualSpecifier(int i) {
return getRuleContext(VirtualSpecifierContext.class,i);
}
public VirtualSpecifierSeqContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_virtualSpecifierSeq; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterVirtualSpecifierSeq(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitVirtualSpecifierSeq(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitVirtualSpecifierSeq(this);
else return visitor.visitChildren(this);
}
}
public final VirtualSpecifierSeqContext virtualSpecifierSeq() throws RecognitionException {
VirtualSpecifierSeqContext _localctx = new VirtualSpecifierSeqContext(_ctx, getState());
enterRule(_localctx, 298, RULE_virtualSpecifierSeq);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1748);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1747);
virtualSpecifier();
}
}
setState(1750);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==Final || _la==Override );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class VirtualSpecifierContext extends ParserRuleContext {
public TerminalNode Override() { return getToken(CPP14Parser.Override, 0); }
public TerminalNode Final() { return getToken(CPP14Parser.Final, 0); }
public VirtualSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_virtualSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterVirtualSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitVirtualSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitVirtualSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final VirtualSpecifierContext virtualSpecifier() throws RecognitionException {
VirtualSpecifierContext _localctx = new VirtualSpecifierContext(_ctx, getState());
enterRule(_localctx, 300, RULE_virtualSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1752);
_la = _input.LA(1);
if ( !(_la==Final || _la==Override) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class PureSpecifierContext extends ParserRuleContext {
public TerminalNode Assign() { return getToken(CPP14Parser.Assign, 0); }
public TerminalNode IntegerLiteral() { return getToken(CPP14Parser.IntegerLiteral, 0); }
public PureSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_pureSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterPureSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitPureSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitPureSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final PureSpecifierContext pureSpecifier() throws RecognitionException {
PureSpecifierContext _localctx = new PureSpecifierContext(_ctx, getState());
enterRule(_localctx, 302, RULE_pureSpecifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1754);
match(Assign);
setState(1755);
match(IntegerLiteral);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BaseClauseContext extends ParserRuleContext {
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public BaseSpecifierListContext baseSpecifierList() {
return getRuleContext(BaseSpecifierListContext.class,0);
}
public BaseClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_baseClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBaseClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBaseClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBaseClause(this);
else return visitor.visitChildren(this);
}
}
public final BaseClauseContext baseClause() throws RecognitionException {
BaseClauseContext _localctx = new BaseClauseContext(_ctx, getState());
enterRule(_localctx, 304, RULE_baseClause);
try {
enterOuterAlt(_localctx, 1);
{
setState(1757);
match(Colon);
setState(1758);
baseSpecifierList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BaseSpecifierListContext extends ParserRuleContext {
public List baseSpecifier() {
return getRuleContexts(BaseSpecifierContext.class);
}
public BaseSpecifierContext baseSpecifier(int i) {
return getRuleContext(BaseSpecifierContext.class,i);
}
public List Ellipsis() { return getTokens(CPP14Parser.Ellipsis); }
public TerminalNode Ellipsis(int i) {
return getToken(CPP14Parser.Ellipsis, i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public BaseSpecifierListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_baseSpecifierList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBaseSpecifierList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBaseSpecifierList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBaseSpecifierList(this);
else return visitor.visitChildren(this);
}
}
public final BaseSpecifierListContext baseSpecifierList() throws RecognitionException {
BaseSpecifierListContext _localctx = new BaseSpecifierListContext(_ctx, getState());
enterRule(_localctx, 306, RULE_baseSpecifierList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1760);
baseSpecifier();
setState(1762);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1761);
match(Ellipsis);
}
}
setState(1771);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(1764);
match(Comma);
setState(1765);
baseSpecifier();
setState(1767);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1766);
match(Ellipsis);
}
}
}
}
setState(1773);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BaseSpecifierContext extends ParserRuleContext {
public BaseTypeSpecifierContext baseTypeSpecifier() {
return getRuleContext(BaseTypeSpecifierContext.class,0);
}
public TerminalNode Virtual() { return getToken(CPP14Parser.Virtual, 0); }
public AccessSpecifierContext accessSpecifier() {
return getRuleContext(AccessSpecifierContext.class,0);
}
public AttributeSpecifierSeqContext attributeSpecifierSeq() {
return getRuleContext(AttributeSpecifierSeqContext.class,0);
}
public BaseSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_baseSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBaseSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBaseSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBaseSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final BaseSpecifierContext baseSpecifier() throws RecognitionException {
BaseSpecifierContext _localctx = new BaseSpecifierContext(_ctx, getState());
enterRule(_localctx, 308, RULE_baseSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1775);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Alignas || _la==LeftBracket) {
{
setState(1774);
attributeSpecifierSeq();
}
}
setState(1789);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Decltype:
case Doublecolon:
case Identifier:
{
setState(1777);
baseTypeSpecifier();
}
break;
case Virtual:
{
setState(1778);
match(Virtual);
setState(1780);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 126100789566373888L) != 0)) {
{
setState(1779);
accessSpecifier();
}
}
setState(1782);
baseTypeSpecifier();
}
break;
case Private:
case Protected:
case Public:
{
setState(1783);
accessSpecifier();
setState(1785);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Virtual) {
{
setState(1784);
match(Virtual);
}
}
setState(1787);
baseTypeSpecifier();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ClassOrDeclTypeContext extends ParserRuleContext {
public ClassNameContext className() {
return getRuleContext(ClassNameContext.class,0);
}
public NestedNameSpecifierContext nestedNameSpecifier() {
return getRuleContext(NestedNameSpecifierContext.class,0);
}
public DecltypeSpecifierContext decltypeSpecifier() {
return getRuleContext(DecltypeSpecifierContext.class,0);
}
public ClassOrDeclTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classOrDeclType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterClassOrDeclType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitClassOrDeclType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitClassOrDeclType(this);
else return visitor.visitChildren(this);
}
}
public final ClassOrDeclTypeContext classOrDeclType() throws RecognitionException {
ClassOrDeclTypeContext _localctx = new ClassOrDeclTypeContext(_ctx, getState());
enterRule(_localctx, 310, RULE_classOrDeclType);
try {
setState(1796);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,250,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1792);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,249,_ctx) ) {
case 1:
{
setState(1791);
nestedNameSpecifier(0);
}
break;
}
setState(1794);
className();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1795);
decltypeSpecifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class BaseTypeSpecifierContext extends ParserRuleContext {
public ClassOrDeclTypeContext classOrDeclType() {
return getRuleContext(ClassOrDeclTypeContext.class,0);
}
public BaseTypeSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_baseTypeSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterBaseTypeSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitBaseTypeSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitBaseTypeSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final BaseTypeSpecifierContext baseTypeSpecifier() throws RecognitionException {
BaseTypeSpecifierContext _localctx = new BaseTypeSpecifierContext(_ctx, getState());
enterRule(_localctx, 312, RULE_baseTypeSpecifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1798);
classOrDeclType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class AccessSpecifierContext extends ParserRuleContext {
public TerminalNode Private() { return getToken(CPP14Parser.Private, 0); }
public TerminalNode Protected() { return getToken(CPP14Parser.Protected, 0); }
public TerminalNode Public() { return getToken(CPP14Parser.Public, 0); }
public AccessSpecifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_accessSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterAccessSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitAccessSpecifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitAccessSpecifier(this);
else return visitor.visitChildren(this);
}
}
public final AccessSpecifierContext accessSpecifier() throws RecognitionException {
AccessSpecifierContext _localctx = new AccessSpecifierContext(_ctx, getState());
enterRule(_localctx, 314, RULE_accessSpecifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1800);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 126100789566373888L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConversionFunctionIdContext extends ParserRuleContext {
public TerminalNode Operator() { return getToken(CPP14Parser.Operator, 0); }
public ConversionTypeIdContext conversionTypeId() {
return getRuleContext(ConversionTypeIdContext.class,0);
}
public ConversionFunctionIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conversionFunctionId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConversionFunctionId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConversionFunctionId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConversionFunctionId(this);
else return visitor.visitChildren(this);
}
}
public final ConversionFunctionIdContext conversionFunctionId() throws RecognitionException {
ConversionFunctionIdContext _localctx = new ConversionFunctionIdContext(_ctx, getState());
enterRule(_localctx, 316, RULE_conversionFunctionId);
try {
enterOuterAlt(_localctx, 1);
{
setState(1802);
match(Operator);
setState(1803);
conversionTypeId();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConversionTypeIdContext extends ParserRuleContext {
public TypeSpecifierSeqContext typeSpecifierSeq() {
return getRuleContext(TypeSpecifierSeqContext.class,0);
}
public ConversionDeclaratorContext conversionDeclarator() {
return getRuleContext(ConversionDeclaratorContext.class,0);
}
public ConversionTypeIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conversionTypeId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConversionTypeId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConversionTypeId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConversionTypeId(this);
else return visitor.visitChildren(this);
}
}
public final ConversionTypeIdContext conversionTypeId() throws RecognitionException {
ConversionTypeIdContext _localctx = new ConversionTypeIdContext(_ctx, getState());
enterRule(_localctx, 318, RULE_conversionTypeId);
try {
enterOuterAlt(_localctx, 1);
{
setState(1805);
typeSpecifierSeq();
setState(1807);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,251,_ctx) ) {
case 1:
{
setState(1806);
conversionDeclarator();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConversionDeclaratorContext extends ParserRuleContext {
public PointerOperatorContext pointerOperator() {
return getRuleContext(PointerOperatorContext.class,0);
}
public ConversionDeclaratorContext conversionDeclarator() {
return getRuleContext(ConversionDeclaratorContext.class,0);
}
public ConversionDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conversionDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConversionDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConversionDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConversionDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final ConversionDeclaratorContext conversionDeclarator() throws RecognitionException {
ConversionDeclaratorContext _localctx = new ConversionDeclaratorContext(_ctx, getState());
enterRule(_localctx, 320, RULE_conversionDeclarator);
try {
enterOuterAlt(_localctx, 1);
{
setState(1809);
pointerOperator();
setState(1811);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,252,_ctx) ) {
case 1:
{
setState(1810);
conversionDeclarator();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class ConstructorInitializerContext extends ParserRuleContext {
public TerminalNode Colon() { return getToken(CPP14Parser.Colon, 0); }
public MemInitializerListContext memInitializerList() {
return getRuleContext(MemInitializerListContext.class,0);
}
public ConstructorInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterConstructorInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitConstructorInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitConstructorInitializer(this);
else return visitor.visitChildren(this);
}
}
public final ConstructorInitializerContext constructorInitializer() throws RecognitionException {
ConstructorInitializerContext _localctx = new ConstructorInitializerContext(_ctx, getState());
enterRule(_localctx, 322, RULE_constructorInitializer);
try {
enterOuterAlt(_localctx, 1);
{
setState(1813);
match(Colon);
setState(1814);
memInitializerList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemInitializerListContext extends ParserRuleContext {
public List memInitializer() {
return getRuleContexts(MemInitializerContext.class);
}
public MemInitializerContext memInitializer(int i) {
return getRuleContext(MemInitializerContext.class,i);
}
public List Ellipsis() { return getTokens(CPP14Parser.Ellipsis); }
public TerminalNode Ellipsis(int i) {
return getToken(CPP14Parser.Ellipsis, i);
}
public List Comma() { return getTokens(CPP14Parser.Comma); }
public TerminalNode Comma(int i) {
return getToken(CPP14Parser.Comma, i);
}
public MemInitializerListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memInitializerList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemInitializerList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemInitializerList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemInitializerList(this);
else return visitor.visitChildren(this);
}
}
public final MemInitializerListContext memInitializerList() throws RecognitionException {
MemInitializerListContext _localctx = new MemInitializerListContext(_ctx, getState());
enterRule(_localctx, 324, RULE_memInitializerList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1816);
memInitializer();
setState(1818);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1817);
match(Ellipsis);
}
}
setState(1827);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
setState(1820);
match(Comma);
setState(1821);
memInitializer();
setState(1823);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Ellipsis) {
{
setState(1822);
match(Ellipsis);
}
}
}
}
setState(1829);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MemInitializerContext extends ParserRuleContext {
public MeminitializeridContext meminitializerid() {
return getRuleContext(MeminitializeridContext.class,0);
}
public TerminalNode LeftParen() { return getToken(CPP14Parser.LeftParen, 0); }
public TerminalNode RightParen() { return getToken(CPP14Parser.RightParen, 0); }
public BracedInitListContext bracedInitList() {
return getRuleContext(BracedInitListContext.class,0);
}
public ExpressionListContext expressionList() {
return getRuleContext(ExpressionListContext.class,0);
}
public MemInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_memInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMemInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMemInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMemInitializer(this);
else return visitor.visitChildren(this);
}
}
public final MemInitializerContext memInitializer() throws RecognitionException {
MemInitializerContext _localctx = new MemInitializerContext(_ctx, getState());
enterRule(_localctx, 326, RULE_memInitializer);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1830);
meminitializerid();
setState(1837);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LeftParen:
{
setState(1831);
match(LeftParen);
setState(1833);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8364979464334764286L) != 0) || ((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & 4719772474400910417L) != 0) || _la==Identifier) {
{
setState(1832);
expressionList();
}
}
setState(1835);
match(RightParen);
}
break;
case LeftBrace:
{
setState(1836);
bracedInitList();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class MeminitializeridContext extends ParserRuleContext {
public ClassOrDeclTypeContext classOrDeclType() {
return getRuleContext(ClassOrDeclTypeContext.class,0);
}
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public MeminitializeridContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_meminitializerid; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterMeminitializerid(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitMeminitializerid(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitMeminitializerid(this);
else return visitor.visitChildren(this);
}
}
public final MeminitializeridContext meminitializerid() throws RecognitionException {
MeminitializeridContext _localctx = new MeminitializeridContext(_ctx, getState());
enterRule(_localctx, 328, RULE_meminitializerid);
try {
setState(1841);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,258,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1839);
classOrDeclType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1840);
match(Identifier);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class OperatorFunctionIdContext extends ParserRuleContext {
public TerminalNode Operator() { return getToken(CPP14Parser.Operator, 0); }
public TheOperatorContext theOperator() {
return getRuleContext(TheOperatorContext.class,0);
}
public OperatorFunctionIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_operatorFunctionId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterOperatorFunctionId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitOperatorFunctionId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitOperatorFunctionId(this);
else return visitor.visitChildren(this);
}
}
public final OperatorFunctionIdContext operatorFunctionId() throws RecognitionException {
OperatorFunctionIdContext _localctx = new OperatorFunctionIdContext(_ctx, getState());
enterRule(_localctx, 330, RULE_operatorFunctionId);
try {
enterOuterAlt(_localctx, 1);
{
setState(1843);
match(Operator);
setState(1844);
theOperator();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class LiteralOperatorIdContext extends ParserRuleContext {
public TerminalNode Operator() { return getToken(CPP14Parser.Operator, 0); }
public TerminalNode StringLiteral() { return getToken(CPP14Parser.StringLiteral, 0); }
public TerminalNode Identifier() { return getToken(CPP14Parser.Identifier, 0); }
public TerminalNode UserDefinedStringLiteral() { return getToken(CPP14Parser.UserDefinedStringLiteral, 0); }
public LiteralOperatorIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literalOperatorId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterLiteralOperatorId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitLiteralOperatorId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof CPP14ParserVisitor ) return ((CPP14ParserVisitor extends T>)visitor).visitLiteralOperatorId(this);
else return visitor.visitChildren(this);
}
}
public final LiteralOperatorIdContext literalOperatorId() throws RecognitionException {
LiteralOperatorIdContext _localctx = new LiteralOperatorIdContext(_ctx, getState());
enterRule(_localctx, 332, RULE_literalOperatorId);
try {
enterOuterAlt(_localctx, 1);
{
setState(1846);
match(Operator);
setState(1850);
_errHandler.sync(this);
switch (_input.LA(1)) {
case StringLiteral:
{
setState(1847);
match(StringLiteral);
setState(1848);
match(Identifier);
}
break;
case UserDefinedStringLiteral:
{
setState(1849);
match(UserDefinedStringLiteral);
}
break;
default:
throw new NoViableAltException(this);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
@SuppressWarnings("CheckReturnValue")
public static class TemplateDeclarationContext extends ParserRuleContext {
public TerminalNode Template() { return getToken(CPP14Parser.Template, 0); }
public TerminalNode Less() { return getToken(CPP14Parser.Less, 0); }
public TemplateparameterListContext templateparameterList() {
return getRuleContext(TemplateparameterListContext.class,0);
}
public TerminalNode Greater() { return getToken(CPP14Parser.Greater, 0); }
public DeclarationContext declaration() {
return getRuleContext(DeclarationContext.class,0);
}
public TemplateDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_templateDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).enterTemplateDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof CPP14ParserListener ) ((CPP14ParserListener)listener).exitTemplateDeclaration(this);
}
@Override
public