eu.mihosoft.vmf.vmftext.grammar.java9.Java9Parser Maven / Gradle / Ivy
The newest version!
// Generated from /Users/miho/EigeneApps/VMF-Text/src/main/resources/eu/mihosoft/vmf/vmftext/antlr/Java9.g4 by ANTLR 4.7
package eu.mihosoft.vmf.vmftext.grammar.java9;
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"})
public class Java9Parser extends Parser {
static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, ABSTRACT=11, ASSERT=12, BOOLEAN=13, BREAK=14, BYTE=15, CASE=16,
CATCH=17, CHAR=18, CLASS=19, CONST=20, CONTINUE=21, DEFAULT=22, DO=23,
DOUBLE=24, ELSE=25, ENUM=26, EXTENDS=27, FINAL=28, FINALLY=29, FLOAT=30,
FOR=31, IF=32, GOTO=33, IMPLEMENTS=34, IMPORT=35, INSTANCEOF=36, INT=37,
INTERFACE=38, LONG=39, NATIVE=40, NEW=41, PACKAGE=42, PRIVATE=43, PROTECTED=44,
PUBLIC=45, RETURN=46, SHORT=47, STATIC=48, STRICTFP=49, SUPER=50, SWITCH=51,
SYNCHRONIZED=52, THIS=53, THROW=54, THROWS=55, TRANSIENT=56, TRY=57, VOID=58,
VOLATILE=59, WHILE=60, UNDER_SCORE=61, IntegerLiteral=62, FloatingPointLiteral=63,
BooleanLiteral=64, CharacterLiteral=65, StringLiteral=66, NullLiteral=67,
LPAREN=68, RPAREN=69, LBRACE=70, RBRACE=71, LBRACK=72, RBRACK=73, SEMI=74,
COMMA=75, DOT=76, ELLIPSIS=77, AT=78, COLONCOLON=79, ASSIGN=80, GT=81,
LT=82, BANG=83, TILDE=84, QUESTION=85, COLON=86, ARROW=87, EQUAL=88, LE=89,
GE=90, NOTEQUAL=91, AND=92, OR=93, INC=94, DEC=95, ADD=96, SUB=97, MUL=98,
DIV=99, BITAND=100, BITOR=101, CARET=102, MOD=103, ADD_ASSIGN=104, SUB_ASSIGN=105,
MUL_ASSIGN=106, DIV_ASSIGN=107, AND_ASSIGN=108, OR_ASSIGN=109, XOR_ASSIGN=110,
MOD_ASSIGN=111, LSHIFT_ASSIGN=112, RSHIFT_ASSIGN=113, URSHIFT_ASSIGN=114,
Identifier=115, WS=116, COMMENT=117, LINE_COMMENT=118;
public static final int
RULE_literal = 0, RULE_type = 1, RULE_primitiveType = 2, RULE_numericType = 3,
RULE_integralType = 4, RULE_floatingPointType = 5, RULE_referenceType = 6,
RULE_classOrInterfaceType = 7, RULE_classType = 8, RULE_classType_lf_classOrInterfaceType = 9,
RULE_classType_lfno_classOrInterfaceType = 10, RULE_interfaceType = 11,
RULE_interfaceType_lf_classOrInterfaceType = 12, RULE_interfaceType_lfno_classOrInterfaceType = 13,
RULE_typeVariable = 14, RULE_arrayType = 15, RULE_dims = 16, RULE_typeParameter = 17,
RULE_typeParameterModifier = 18, RULE_typeBound = 19, RULE_additionalBound = 20,
RULE_typeArguments = 21, RULE_typeArgumentList = 22, RULE_typeArgument = 23,
RULE_wildcard = 24, RULE_wildcardBounds = 25, RULE_moduleName = 26, RULE_packageName = 27,
RULE_typeName = 28, RULE_packageOrTypeName = 29, RULE_expressionName = 30,
RULE_methodName = 31, RULE_ambiguousName = 32, RULE_compilationUnit = 33,
RULE_ordinaryCompilation = 34, RULE_modularCompilation = 35, RULE_packageDeclaration = 36,
RULE_packageModifier = 37, RULE_importDeclaration = 38, RULE_singleTypeImportDeclaration = 39,
RULE_typeImportOnDemandDeclaration = 40, RULE_singleStaticImportDeclaration = 41,
RULE_staticImportOnDemandDeclaration = 42, RULE_typeDeclaration = 43,
RULE_moduleDeclaration = 44, RULE_moduleDirective = 45, RULE_requiresModifier = 46,
RULE_classDeclaration = 47, RULE_normalClassDeclaration = 48, RULE_classModifier = 49,
RULE_typeParameters = 50, RULE_typeParameterList = 51, RULE_superclass = 52,
RULE_superinterfaces = 53, RULE_interfaceTypeList = 54, RULE_classBody = 55,
RULE_classBodyDeclaration = 56, RULE_classMemberDeclaration = 57, RULE_fieldDeclaration = 58,
RULE_fieldModifier = 59, RULE_variableDeclaratorList = 60, RULE_variableDeclarator = 61,
RULE_variableDeclaratorId = 62, RULE_variableInitializer = 63, RULE_unannType = 64,
RULE_unannPrimitiveType = 65, RULE_unannReferenceType = 66, RULE_unannClassOrInterfaceType = 67,
RULE_unannClassType = 68, RULE_unannClassType_lf_unannClassOrInterfaceType = 69,
RULE_unannClassType_lfno_unannClassOrInterfaceType = 70, RULE_unannInterfaceType = 71,
RULE_unannInterfaceType_lf_unannClassOrInterfaceType = 72, RULE_unannInterfaceType_lfno_unannClassOrInterfaceType = 73,
RULE_unannTypeVariable = 74, RULE_unannArrayType = 75, RULE_methodDeclaration = 76,
RULE_methodModifier = 77, RULE_methodHeader = 78, RULE_result = 79, RULE_methodDeclarator = 80,
RULE_formalParameterList = 81, RULE_formalParameters = 82, RULE_formalParameter = 83,
RULE_variableModifier = 84, RULE_lastFormalParameter = 85, RULE_receiverParameter = 86,
RULE_throws_ = 87, RULE_exceptionTypeList = 88, RULE_exceptionType = 89,
RULE_methodBody = 90, RULE_instanceInitializer = 91, RULE_staticInitializer = 92,
RULE_constructorDeclaration = 93, RULE_constructorModifier = 94, RULE_constructorDeclarator = 95,
RULE_simpleTypeName = 96, RULE_constructorBody = 97, RULE_explicitConstructorInvocation = 98,
RULE_enumDeclaration = 99, RULE_enumBody = 100, RULE_enumConstantList = 101,
RULE_enumConstant = 102, RULE_enumConstantModifier = 103, RULE_enumBodyDeclarations = 104,
RULE_interfaceDeclaration = 105, RULE_normalInterfaceDeclaration = 106,
RULE_interfaceModifier = 107, RULE_extendsInterfaces = 108, RULE_interfaceBody = 109,
RULE_interfaceMemberDeclaration = 110, RULE_constantDeclaration = 111,
RULE_constantModifier = 112, RULE_interfaceMethodDeclaration = 113, RULE_interfaceMethodModifier = 114,
RULE_annotationTypeDeclaration = 115, RULE_annotationTypeBody = 116, RULE_annotationTypeMemberDeclaration = 117,
RULE_annotationTypeElementDeclaration = 118, RULE_annotationTypeElementModifier = 119,
RULE_defaultValue = 120, RULE_annotation = 121, RULE_normalAnnotation = 122,
RULE_elementValuePairList = 123, RULE_elementValuePair = 124, RULE_elementValue = 125,
RULE_elementValueArrayInitializer = 126, RULE_elementValueList = 127,
RULE_markerAnnotation = 128, RULE_singleElementAnnotation = 129, RULE_arrayInitializer = 130,
RULE_variableInitializerList = 131, RULE_block = 132, RULE_blockStatements = 133,
RULE_blockStatement = 134, RULE_localVariableDeclarationStatement = 135,
RULE_localVariableDeclaration = 136, RULE_statement = 137, RULE_statementNoShortIf = 138,
RULE_statementWithoutTrailingSubstatement = 139, RULE_emptyStatement = 140,
RULE_labeledStatement = 141, RULE_labeledStatementNoShortIf = 142, RULE_expressionStatement = 143,
RULE_statementExpression = 144, RULE_ifThenStatement = 145, RULE_ifThenElseStatement = 146,
RULE_ifThenElseStatementNoShortIf = 147, RULE_assertStatement = 148, RULE_switchStatement = 149,
RULE_switchBlock = 150, RULE_switchBlockStatementGroup = 151, RULE_switchLabels = 152,
RULE_switchLabel = 153, RULE_enumConstantName = 154, RULE_whileStatement = 155,
RULE_whileStatementNoShortIf = 156, RULE_doStatement = 157, RULE_forStatement = 158,
RULE_forStatementNoShortIf = 159, RULE_basicForStatement = 160, RULE_basicForStatementNoShortIf = 161,
RULE_forInit = 162, RULE_forUpdate = 163, RULE_statementExpressionList = 164,
RULE_enhancedForStatement = 165, RULE_enhancedForStatementNoShortIf = 166,
RULE_breakStatement = 167, RULE_continueStatement = 168, RULE_returnStatement = 169,
RULE_throwStatement = 170, RULE_synchronizedStatement = 171, RULE_tryStatement = 172,
RULE_catches = 173, RULE_catchClause = 174, RULE_catchFormalParameter = 175,
RULE_catchType = 176, RULE_finally_ = 177, RULE_tryWithResourcesStatement = 178,
RULE_resourceSpecification = 179, RULE_resourceList = 180, RULE_resource = 181,
RULE_variableAccess = 182, RULE_primary = 183, RULE_primaryNoNewArray = 184,
RULE_primaryNoNewArray_lf_arrayAccess = 185, RULE_primaryNoNewArray_lfno_arrayAccess = 186,
RULE_primaryNoNewArray_lf_primary = 187, RULE_primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary = 188,
RULE_primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary = 189, RULE_primaryNoNewArray_lfno_primary = 190,
RULE_primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary = 191,
RULE_primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary = 192,
RULE_classLiteral = 193, RULE_classInstanceCreationExpression = 194, RULE_classInstanceCreationExpression_lf_primary = 195,
RULE_classInstanceCreationExpression_lfno_primary = 196, RULE_typeArgumentsOrDiamond = 197,
RULE_fieldAccess = 198, RULE_fieldAccess_lf_primary = 199, RULE_fieldAccess_lfno_primary = 200,
RULE_arrayAccess = 201, RULE_arrayAccess_lf_primary = 202, RULE_arrayAccess_lfno_primary = 203,
RULE_methodInvocation = 204, RULE_methodInvocation_lf_primary = 205, RULE_methodInvocation_lfno_primary = 206,
RULE_argumentList = 207, RULE_methodReference = 208, RULE_methodReference_lf_primary = 209,
RULE_methodReference_lfno_primary = 210, RULE_arrayCreationExpression = 211,
RULE_dimExprs = 212, RULE_dimExpr = 213, RULE_constantExpression = 214,
RULE_expression = 215, RULE_lambdaExpression = 216, RULE_lambdaParameters = 217,
RULE_inferredFormalParameterList = 218, RULE_lambdaBody = 219, RULE_assignmentExpression = 220,
RULE_assignment = 221, RULE_leftHandSide = 222, RULE_assignmentOperator = 223,
RULE_conditionalExpression = 224, RULE_conditionalOrExpression = 225,
RULE_conditionalAndExpression = 226, RULE_inclusiveOrExpression = 227,
RULE_exclusiveOrExpression = 228, RULE_andExpression = 229, RULE_equalityExpression = 230,
RULE_relationalExpression = 231, RULE_shiftExpression = 232, RULE_additiveExpression = 233,
RULE_multiplicativeExpression = 234, RULE_unaryExpression = 235, RULE_preIncrementExpression = 236,
RULE_preDecrementExpression = 237, RULE_unaryExpressionNotPlusMinus = 238,
RULE_postfixExpression = 239, RULE_postIncrementExpression = 240, RULE_postIncrementExpression_lf_postfixExpression = 241,
RULE_postDecrementExpression = 242, RULE_postDecrementExpression_lf_postfixExpression = 243,
RULE_castExpression = 244;
public static final String[] ruleNames = {
"literal", "type", "primitiveType", "numericType", "integralType", "floatingPointType",
"referenceType", "classOrInterfaceType", "classType", "classType_lf_classOrInterfaceType",
"classType_lfno_classOrInterfaceType", "interfaceType", "interfaceType_lf_classOrInterfaceType",
"interfaceType_lfno_classOrInterfaceType", "typeVariable", "arrayType",
"dims", "typeParameter", "typeParameterModifier", "typeBound", "additionalBound",
"typeArguments", "typeArgumentList", "typeArgument", "wildcard", "wildcardBounds",
"moduleName", "packageName", "typeName", "packageOrTypeName", "expressionName",
"methodName", "ambiguousName", "compilationUnit", "ordinaryCompilation",
"modularCompilation", "packageDeclaration", "packageModifier", "importDeclaration",
"singleTypeImportDeclaration", "typeImportOnDemandDeclaration", "singleStaticImportDeclaration",
"staticImportOnDemandDeclaration", "typeDeclaration", "moduleDeclaration",
"moduleDirective", "requiresModifier", "classDeclaration", "normalClassDeclaration",
"classModifier", "typeParameters", "typeParameterList", "superclass",
"superinterfaces", "interfaceTypeList", "classBody", "classBodyDeclaration",
"classMemberDeclaration", "fieldDeclaration", "fieldModifier", "variableDeclaratorList",
"variableDeclarator", "variableDeclaratorId", "variableInitializer", "unannType",
"unannPrimitiveType", "unannReferenceType", "unannClassOrInterfaceType",
"unannClassType", "unannClassType_lf_unannClassOrInterfaceType", "unannClassType_lfno_unannClassOrInterfaceType",
"unannInterfaceType", "unannInterfaceType_lf_unannClassOrInterfaceType",
"unannInterfaceType_lfno_unannClassOrInterfaceType", "unannTypeVariable",
"unannArrayType", "methodDeclaration", "methodModifier", "methodHeader",
"result", "methodDeclarator", "formalParameterList", "formalParameters",
"formalParameter", "variableModifier", "lastFormalParameter", "receiverParameter",
"throws_", "exceptionTypeList", "exceptionType", "methodBody", "instanceInitializer",
"staticInitializer", "constructorDeclaration", "constructorModifier",
"constructorDeclarator", "simpleTypeName", "constructorBody", "explicitConstructorInvocation",
"enumDeclaration", "enumBody", "enumConstantList", "enumConstant", "enumConstantModifier",
"enumBodyDeclarations", "interfaceDeclaration", "normalInterfaceDeclaration",
"interfaceModifier", "extendsInterfaces", "interfaceBody", "interfaceMemberDeclaration",
"constantDeclaration", "constantModifier", "interfaceMethodDeclaration",
"interfaceMethodModifier", "annotationTypeDeclaration", "annotationTypeBody",
"annotationTypeMemberDeclaration", "annotationTypeElementDeclaration",
"annotationTypeElementModifier", "defaultValue", "annotation", "normalAnnotation",
"elementValuePairList", "elementValuePair", "elementValue", "elementValueArrayInitializer",
"elementValueList", "markerAnnotation", "singleElementAnnotation", "arrayInitializer",
"variableInitializerList", "block", "blockStatements", "blockStatement",
"localVariableDeclarationStatement", "localVariableDeclaration", "statement",
"statementNoShortIf", "statementWithoutTrailingSubstatement", "emptyStatement",
"labeledStatement", "labeledStatementNoShortIf", "expressionStatement",
"statementExpression", "ifThenStatement", "ifThenElseStatement", "ifThenElseStatementNoShortIf",
"assertStatement", "switchStatement", "switchBlock", "switchBlockStatementGroup",
"switchLabels", "switchLabel", "enumConstantName", "whileStatement", "whileStatementNoShortIf",
"doStatement", "forStatement", "forStatementNoShortIf", "basicForStatement",
"basicForStatementNoShortIf", "forInit", "forUpdate", "statementExpressionList",
"enhancedForStatement", "enhancedForStatementNoShortIf", "breakStatement",
"continueStatement", "returnStatement", "throwStatement", "synchronizedStatement",
"tryStatement", "catches", "catchClause", "catchFormalParameter", "catchType",
"finally_", "tryWithResourcesStatement", "resourceSpecification", "resourceList",
"resource", "variableAccess", "primary", "primaryNoNewArray", "primaryNoNewArray_lf_arrayAccess",
"primaryNoNewArray_lfno_arrayAccess", "primaryNoNewArray_lf_primary",
"primaryNoNewArray_lf_primary_lf_arrayAccess_lf_primary", "primaryNoNewArray_lf_primary_lfno_arrayAccess_lf_primary",
"primaryNoNewArray_lfno_primary", "primaryNoNewArray_lfno_primary_lf_arrayAccess_lfno_primary",
"primaryNoNewArray_lfno_primary_lfno_arrayAccess_lfno_primary", "classLiteral",
"classInstanceCreationExpression", "classInstanceCreationExpression_lf_primary",
"classInstanceCreationExpression_lfno_primary", "typeArgumentsOrDiamond",
"fieldAccess", "fieldAccess_lf_primary", "fieldAccess_lfno_primary", "arrayAccess",
"arrayAccess_lf_primary", "arrayAccess_lfno_primary", "methodInvocation",
"methodInvocation_lf_primary", "methodInvocation_lfno_primary", "argumentList",
"methodReference", "methodReference_lf_primary", "methodReference_lfno_primary",
"arrayCreationExpression", "dimExprs", "dimExpr", "constantExpression",
"expression", "lambdaExpression", "lambdaParameters", "inferredFormalParameterList",
"lambdaBody", "assignmentExpression", "assignment", "leftHandSide", "assignmentOperator",
"conditionalExpression", "conditionalOrExpression", "conditionalAndExpression",
"inclusiveOrExpression", "exclusiveOrExpression", "andExpression", "equalityExpression",
"relationalExpression", "shiftExpression", "additiveExpression", "multiplicativeExpression",
"unaryExpression", "preIncrementExpression", "preDecrementExpression",
"unaryExpressionNotPlusMinus", "postfixExpression", "postIncrementExpression",
"postIncrementExpression_lf_postfixExpression", "postDecrementExpression",
"postDecrementExpression_lf_postfixExpression", "castExpression"
};
private static final String[] _LITERAL_NAMES = {
null, "'open'", "'module'", "'requires'", "'exports'", "'to'", "'opens'",
"'uses'", "'provides'", "'with'", "'transitive'", "'abstract'", "'assert'",
"'boolean'", "'break'", "'byte'", "'case'", "'catch'", "'char'", "'class'",
"'const'", "'continue'", "'default'", "'do'", "'double'", "'else'", "'enum'",
"'extends'", "'final'", "'finally'", "'float'", "'for'", "'if'", "'goto'",
"'implements'", "'import'", "'instanceof'", "'int'", "'interface'", "'long'",
"'native'", "'new'", "'package'", "'private'", "'protected'", "'public'",
"'return'", "'short'", "'static'", "'strictfp'", "'super'", "'switch'",
"'synchronized'", "'this'", "'throw'", "'throws'", "'transient'", "'try'",
"'void'", "'volatile'", "'while'", "'_'", null, null, null, null, null,
"'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", "';'", "','", "'.'",
"'...'", "'@'", "'::'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'",
"'->'", "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'",
"'+'", "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='",
"'*='", "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='"
};
private static final String[] _SYMBOLIC_NAMES = {
null, null, null, null, null, null, null, null, null, null, null, "ABSTRACT",
"ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", "CLASS",
"CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", "EXTENDS",
"FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", "IMPORT",
"INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE",
"PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP",
"SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT",
"TRY", "VOID", "VOLATILE", "WHILE", "UNDER_SCORE", "IntegerLiteral", "FloatingPointLiteral",
"BooleanLiteral", "CharacterLiteral", "StringLiteral", "NullLiteral",
"LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA",
"DOT", "ELLIPSIS", "AT", "COLONCOLON", "ASSIGN", "GT", "LT", "BANG", "TILDE",
"QUESTION", "COLON", "ARROW", "EQUAL", "LE", "GE", "NOTEQUAL", "AND",
"OR", "INC", "DEC", "ADD", "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET",
"MOD", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN",
"OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN",
"URSHIFT_ASSIGN", "Identifier", "WS", "COMMENT", "LINE_COMMENT"
};
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 "Java9.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public Java9Parser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class LiteralContext extends ParserRuleContext {
public TerminalNode IntegerLiteral() { return getToken(Java9Parser.IntegerLiteral, 0); }
public TerminalNode FloatingPointLiteral() { return getToken(Java9Parser.FloatingPointLiteral, 0); }
public TerminalNode BooleanLiteral() { return getToken(Java9Parser.BooleanLiteral, 0); }
public TerminalNode CharacterLiteral() { return getToken(Java9Parser.CharacterLiteral, 0); }
public TerminalNode StringLiteral() { return getToken(Java9Parser.StringLiteral, 0); }
public TerminalNode NullLiteral() { return getToken(Java9Parser.NullLiteral, 0); }
public LiteralContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literal; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLiteral(this);
else return visitor.visitChildren(this);
}
}
public final LiteralContext literal() throws RecognitionException {
LiteralContext _localctx = new LiteralContext(_ctx, getState());
enterRule(_localctx, 0, RULE_literal);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(490);
_la = _input.LA(1);
if ( !(((((_la - 62)) & ~0x3f) == 0 && ((1L << (_la - 62)) & ((1L << (IntegerLiteral - 62)) | (1L << (FloatingPointLiteral - 62)) | (1L << (BooleanLiteral - 62)) | (1L << (CharacterLiteral - 62)) | (1L << (StringLiteral - 62)) | (1L << (NullLiteral - 62)))) != 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;
}
public static class TypeContext extends ParserRuleContext {
public PrimitiveTypeContext primitiveType() {
return getRuleContext(PrimitiveTypeContext.class,0);
}
public ReferenceTypeContext referenceType() {
return getRuleContext(ReferenceTypeContext.class,0);
}
public TypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_type; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitType(this);
else return visitor.visitChildren(this);
}
}
public final TypeContext type() throws RecognitionException {
TypeContext _localctx = new TypeContext(_ctx, getState());
enterRule(_localctx, 2, RULE_type);
try {
setState(494);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(492);
primitiveType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(493);
referenceType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimitiveTypeContext extends ParserRuleContext {
public NumericTypeContext numericType() {
return getRuleContext(NumericTypeContext.class,0);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primitiveType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterPrimitiveType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitPrimitiveType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitPrimitiveType(this);
else return visitor.visitChildren(this);
}
}
public final PrimitiveTypeContext primitiveType() throws RecognitionException {
PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState());
enterRule(_localctx, 4, RULE_primitiveType);
int _la;
try {
setState(510);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(499);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(496);
annotation();
}
}
setState(501);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(502);
numericType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(506);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(503);
annotation();
}
}
setState(508);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(509);
match(BOOLEAN);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NumericTypeContext extends ParserRuleContext {
public IntegralTypeContext integralType() {
return getRuleContext(IntegralTypeContext.class,0);
}
public FloatingPointTypeContext floatingPointType() {
return getRuleContext(FloatingPointTypeContext.class,0);
}
public NumericTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_numericType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterNumericType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitNumericType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitNumericType(this);
else return visitor.visitChildren(this);
}
}
public final NumericTypeContext numericType() throws RecognitionException {
NumericTypeContext _localctx = new NumericTypeContext(_ctx, getState());
enterRule(_localctx, 6, RULE_numericType);
try {
setState(514);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BYTE:
case CHAR:
case INT:
case LONG:
case SHORT:
enterOuterAlt(_localctx, 1);
{
setState(512);
integralType();
}
break;
case DOUBLE:
case FLOAT:
enterOuterAlt(_localctx, 2);
{
setState(513);
floatingPointType();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IntegralTypeContext extends ParserRuleContext {
public IntegralTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_integralType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterIntegralType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitIntegralType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitIntegralType(this);
else return visitor.visitChildren(this);
}
}
public final IntegralTypeContext integralType() throws RecognitionException {
IntegralTypeContext _localctx = new IntegralTypeContext(_ctx, getState());
enterRule(_localctx, 8, RULE_integralType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(516);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BYTE) | (1L << CHAR) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 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;
}
public static class FloatingPointTypeContext extends ParserRuleContext {
public FloatingPointTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_floatingPointType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFloatingPointType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFloatingPointType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFloatingPointType(this);
else return visitor.visitChildren(this);
}
}
public final FloatingPointTypeContext floatingPointType() throws RecognitionException {
FloatingPointTypeContext _localctx = new FloatingPointTypeContext(_ctx, getState());
enterRule(_localctx, 10, RULE_floatingPointType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(518);
_la = _input.LA(1);
if ( !(_la==DOUBLE || _la==FLOAT) ) {
_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;
}
public static class ReferenceTypeContext extends ParserRuleContext {
public ClassOrInterfaceTypeContext classOrInterfaceType() {
return getRuleContext(ClassOrInterfaceTypeContext.class,0);
}
public TypeVariableContext typeVariable() {
return getRuleContext(TypeVariableContext.class,0);
}
public ArrayTypeContext arrayType() {
return getRuleContext(ArrayTypeContext.class,0);
}
public ReferenceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_referenceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterReferenceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitReferenceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitReferenceType(this);
else return visitor.visitChildren(this);
}
}
public final ReferenceTypeContext referenceType() throws RecognitionException {
ReferenceTypeContext _localctx = new ReferenceTypeContext(_ctx, getState());
enterRule(_localctx, 12, RULE_referenceType);
try {
setState(523);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(520);
classOrInterfaceType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(521);
typeVariable();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(522);
arrayType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassOrInterfaceTypeContext extends ParserRuleContext {
public ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() {
return getRuleContext(ClassType_lfno_classOrInterfaceTypeContext.class,0);
}
public InterfaceType_lfno_classOrInterfaceTypeContext interfaceType_lfno_classOrInterfaceType() {
return getRuleContext(InterfaceType_lfno_classOrInterfaceTypeContext.class,0);
}
public List classType_lf_classOrInterfaceType() {
return getRuleContexts(ClassType_lf_classOrInterfaceTypeContext.class);
}
public ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType(int i) {
return getRuleContext(ClassType_lf_classOrInterfaceTypeContext.class,i);
}
public List interfaceType_lf_classOrInterfaceType() {
return getRuleContexts(InterfaceType_lf_classOrInterfaceTypeContext.class);
}
public InterfaceType_lf_classOrInterfaceTypeContext interfaceType_lf_classOrInterfaceType(int i) {
return getRuleContext(InterfaceType_lf_classOrInterfaceTypeContext.class,i);
}
public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException {
ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 14, RULE_classOrInterfaceType);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(527);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
{
setState(525);
classType_lfno_classOrInterfaceType();
}
break;
case 2:
{
setState(526);
interfaceType_lfno_classOrInterfaceType();
}
break;
}
setState(533);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
setState(531);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
{
setState(529);
classType_lf_classOrInterfaceType();
}
break;
case 2:
{
setState(530);
interfaceType_lf_classOrInterfaceType();
}
break;
}
}
}
setState(535);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public ClassOrInterfaceTypeContext classOrInterfaceType() {
return getRuleContext(ClassOrInterfaceTypeContext.class,0);
}
public ClassTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassType(this);
else return visitor.visitChildren(this);
}
}
public final ClassTypeContext classType() throws RecognitionException {
ClassTypeContext _localctx = new ClassTypeContext(_ctx, getState());
enterRule(_localctx, 16, RULE_classType);
int _la;
try {
setState(558);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(539);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(536);
annotation();
}
}
setState(541);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(542);
match(Identifier);
setState(544);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(543);
typeArguments();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(546);
classOrInterfaceType();
setState(547);
match(DOT);
setState(551);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(548);
annotation();
}
}
setState(553);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(554);
match(Identifier);
setState(556);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(555);
typeArguments();
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassType_lf_classOrInterfaceTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public ClassType_lf_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classType_lf_classOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassType_lf_classOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassType_lf_classOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassType_lf_classOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType() throws RecognitionException {
ClassType_lf_classOrInterfaceTypeContext _localctx = new ClassType_lf_classOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 18, RULE_classType_lf_classOrInterfaceType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(560);
match(DOT);
setState(564);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(561);
annotation();
}
}
setState(566);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(567);
match(Identifier);
setState(569);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
{
setState(568);
typeArguments();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassType_lfno_classOrInterfaceTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public ClassType_lfno_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classType_lfno_classOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassType_lfno_classOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassType_lfno_classOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassType_lfno_classOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() throws RecognitionException {
ClassType_lfno_classOrInterfaceTypeContext _localctx = new ClassType_lfno_classOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 20, RULE_classType_lfno_classOrInterfaceType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(574);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(571);
annotation();
}
}
setState(576);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(577);
match(Identifier);
setState(579);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
case 1:
{
setState(578);
typeArguments();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceTypeContext extends ParserRuleContext {
public ClassTypeContext classType() {
return getRuleContext(ClassTypeContext.class,0);
}
public InterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceTypeContext interfaceType() throws RecognitionException {
InterfaceTypeContext _localctx = new InterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 22, RULE_interfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(581);
classType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceType_lf_classOrInterfaceTypeContext extends ParserRuleContext {
public ClassType_lf_classOrInterfaceTypeContext classType_lf_classOrInterfaceType() {
return getRuleContext(ClassType_lf_classOrInterfaceTypeContext.class,0);
}
public InterfaceType_lf_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceType_lf_classOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceType_lf_classOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceType_lf_classOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceType_lf_classOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceType_lf_classOrInterfaceTypeContext interfaceType_lf_classOrInterfaceType() throws RecognitionException {
InterfaceType_lf_classOrInterfaceTypeContext _localctx = new InterfaceType_lf_classOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 24, RULE_interfaceType_lf_classOrInterfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(583);
classType_lf_classOrInterfaceType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceType_lfno_classOrInterfaceTypeContext extends ParserRuleContext {
public ClassType_lfno_classOrInterfaceTypeContext classType_lfno_classOrInterfaceType() {
return getRuleContext(ClassType_lfno_classOrInterfaceTypeContext.class,0);
}
public InterfaceType_lfno_classOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceType_lfno_classOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceType_lfno_classOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceType_lfno_classOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceType_lfno_classOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceType_lfno_classOrInterfaceTypeContext interfaceType_lfno_classOrInterfaceType() throws RecognitionException {
InterfaceType_lfno_classOrInterfaceTypeContext _localctx = new InterfaceType_lfno_classOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 26, RULE_interfaceType_lfno_classOrInterfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(585);
classType_lfno_classOrInterfaceType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeVariableContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TypeVariableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeVariable; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeVariable(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeVariable(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeVariable(this);
else return visitor.visitChildren(this);
}
}
public final TypeVariableContext typeVariable() throws RecognitionException {
TypeVariableContext _localctx = new TypeVariableContext(_ctx, getState());
enterRule(_localctx, 28, RULE_typeVariable);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(590);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(587);
annotation();
}
}
setState(592);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(593);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayTypeContext extends ParserRuleContext {
public PrimitiveTypeContext primitiveType() {
return getRuleContext(PrimitiveTypeContext.class,0);
}
public DimsContext dims() {
return getRuleContext(DimsContext.class,0);
}
public ClassOrInterfaceTypeContext classOrInterfaceType() {
return getRuleContext(ClassOrInterfaceTypeContext.class,0);
}
public TypeVariableContext typeVariable() {
return getRuleContext(TypeVariableContext.class,0);
}
public ArrayTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterArrayType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitArrayType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitArrayType(this);
else return visitor.visitChildren(this);
}
}
public final ArrayTypeContext arrayType() throws RecognitionException {
ArrayTypeContext _localctx = new ArrayTypeContext(_ctx, getState());
enterRule(_localctx, 30, RULE_arrayType);
try {
setState(604);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(595);
primitiveType();
setState(596);
dims();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(598);
classOrInterfaceType();
setState(599);
dims();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(601);
typeVariable();
setState(602);
dims();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DimsContext extends ParserRuleContext {
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public DimsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_dims; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterDims(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitDims(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitDims(this);
else return visitor.visitChildren(this);
}
}
public final DimsContext dims() throws RecognitionException {
DimsContext _localctx = new DimsContext(_ctx, getState());
enterRule(_localctx, 32, RULE_dims);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(609);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(606);
annotation();
}
}
setState(611);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(612);
match(LBRACK);
setState(613);
match(RBRACK);
setState(624);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,22,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(617);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(614);
annotation();
}
}
setState(619);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(620);
match(LBRACK);
setState(621);
match(RBRACK);
}
}
}
setState(626);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,22,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeParameterContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List typeParameterModifier() {
return getRuleContexts(TypeParameterModifierContext.class);
}
public TypeParameterModifierContext typeParameterModifier(int i) {
return getRuleContext(TypeParameterModifierContext.class,i);
}
public TypeBoundContext typeBound() {
return getRuleContext(TypeBoundContext.class,0);
}
public TypeParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeParameter(this);
else return visitor.visitChildren(this);
}
}
public final TypeParameterContext typeParameter() throws RecognitionException {
TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState());
enterRule(_localctx, 34, RULE_typeParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(630);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(627);
typeParameterModifier();
}
}
setState(632);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(633);
match(Identifier);
setState(635);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EXTENDS) {
{
setState(634);
typeBound();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeParameterModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public TypeParameterModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameterModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeParameterModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeParameterModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeParameterModifier(this);
else return visitor.visitChildren(this);
}
}
public final TypeParameterModifierContext typeParameterModifier() throws RecognitionException {
TypeParameterModifierContext _localctx = new TypeParameterModifierContext(_ctx, getState());
enterRule(_localctx, 36, RULE_typeParameterModifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(637);
annotation();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeBoundContext extends ParserRuleContext {
public TypeVariableContext typeVariable() {
return getRuleContext(TypeVariableContext.class,0);
}
public ClassOrInterfaceTypeContext classOrInterfaceType() {
return getRuleContext(ClassOrInterfaceTypeContext.class,0);
}
public List additionalBound() {
return getRuleContexts(AdditionalBoundContext.class);
}
public AdditionalBoundContext additionalBound(int i) {
return getRuleContext(AdditionalBoundContext.class,i);
}
public TypeBoundContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeBound; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeBound(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeBound(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeBound(this);
else return visitor.visitChildren(this);
}
}
public final TypeBoundContext typeBound() throws RecognitionException {
TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState());
enterRule(_localctx, 38, RULE_typeBound);
int _la;
try {
setState(649);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(639);
match(EXTENDS);
setState(640);
typeVariable();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(641);
match(EXTENDS);
setState(642);
classOrInterfaceType();
setState(646);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==BITAND) {
{
{
setState(643);
additionalBound();
}
}
setState(648);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AdditionalBoundContext extends ParserRuleContext {
public InterfaceTypeContext interfaceType() {
return getRuleContext(InterfaceTypeContext.class,0);
}
public AdditionalBoundContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_additionalBound; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAdditionalBound(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAdditionalBound(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAdditionalBound(this);
else return visitor.visitChildren(this);
}
}
public final AdditionalBoundContext additionalBound() throws RecognitionException {
AdditionalBoundContext _localctx = new AdditionalBoundContext(_ctx, getState());
enterRule(_localctx, 40, RULE_additionalBound);
try {
enterOuterAlt(_localctx, 1);
{
setState(651);
match(BITAND);
setState(652);
interfaceType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeArgumentsContext extends ParserRuleContext {
public TypeArgumentListContext typeArgumentList() {
return getRuleContext(TypeArgumentListContext.class,0);
}
public TypeArgumentsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeArguments; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeArguments(this);
else return visitor.visitChildren(this);
}
}
public final TypeArgumentsContext typeArguments() throws RecognitionException {
TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState());
enterRule(_localctx, 42, RULE_typeArguments);
try {
enterOuterAlt(_localctx, 1);
{
setState(654);
match(LT);
setState(655);
typeArgumentList();
setState(656);
match(GT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeArgumentListContext extends ParserRuleContext {
public List typeArgument() {
return getRuleContexts(TypeArgumentContext.class);
}
public TypeArgumentContext typeArgument(int i) {
return getRuleContext(TypeArgumentContext.class,i);
}
public TypeArgumentListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeArgumentList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeArgumentList(this);
else return visitor.visitChildren(this);
}
}
public final TypeArgumentListContext typeArgumentList() throws RecognitionException {
TypeArgumentListContext _localctx = new TypeArgumentListContext(_ctx, getState());
enterRule(_localctx, 44, RULE_typeArgumentList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(658);
typeArgument();
setState(663);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(659);
match(COMMA);
setState(660);
typeArgument();
}
}
setState(665);
_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;
}
public static class TypeArgumentContext extends ParserRuleContext {
public ReferenceTypeContext referenceType() {
return getRuleContext(ReferenceTypeContext.class,0);
}
public WildcardContext wildcard() {
return getRuleContext(WildcardContext.class,0);
}
public TypeArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeArgument; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeArgument(this);
else return visitor.visitChildren(this);
}
}
public final TypeArgumentContext typeArgument() throws RecognitionException {
TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState());
enterRule(_localctx, 46, RULE_typeArgument);
try {
setState(668);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(666);
referenceType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(667);
wildcard();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WildcardContext extends ParserRuleContext {
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public WildcardBoundsContext wildcardBounds() {
return getRuleContext(WildcardBoundsContext.class,0);
}
public WildcardContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_wildcard; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterWildcard(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitWildcard(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitWildcard(this);
else return visitor.visitChildren(this);
}
}
public final WildcardContext wildcard() throws RecognitionException {
WildcardContext _localctx = new WildcardContext(_ctx, getState());
enterRule(_localctx, 48, RULE_wildcard);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(673);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(670);
annotation();
}
}
setState(675);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(676);
match(QUESTION);
setState(678);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EXTENDS || _la==SUPER) {
{
setState(677);
wildcardBounds();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WildcardBoundsContext extends ParserRuleContext {
public ReferenceTypeContext referenceType() {
return getRuleContext(ReferenceTypeContext.class,0);
}
public WildcardBoundsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_wildcardBounds; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterWildcardBounds(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitWildcardBounds(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitWildcardBounds(this);
else return visitor.visitChildren(this);
}
}
public final WildcardBoundsContext wildcardBounds() throws RecognitionException {
WildcardBoundsContext _localctx = new WildcardBoundsContext(_ctx, getState());
enterRule(_localctx, 50, RULE_wildcardBounds);
try {
setState(684);
_errHandler.sync(this);
switch (_input.LA(1)) {
case EXTENDS:
enterOuterAlt(_localctx, 1);
{
setState(680);
match(EXTENDS);
setState(681);
referenceType();
}
break;
case SUPER:
enterOuterAlt(_localctx, 2);
{
setState(682);
match(SUPER);
setState(683);
referenceType();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ModuleNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public ModuleNameContext moduleName() {
return getRuleContext(ModuleNameContext.class,0);
}
public ModuleNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_moduleName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterModuleName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitModuleName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitModuleName(this);
else return visitor.visitChildren(this);
}
}
public final ModuleNameContext moduleName() throws RecognitionException {
return moduleName(0);
}
private ModuleNameContext moduleName(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ModuleNameContext _localctx = new ModuleNameContext(_ctx, _parentState);
ModuleNameContext _prevctx = _localctx;
int _startState = 52;
enterRecursionRule(_localctx, 52, RULE_moduleName, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(687);
match(Identifier);
}
_ctx.stop = _input.LT(-1);
setState(694);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,32,_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 ModuleNameContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_moduleName);
setState(689);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(690);
match(DOT);
setState(691);
match(Identifier);
}
}
}
setState(696);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,32,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class PackageNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public PackageNameContext packageName() {
return getRuleContext(PackageNameContext.class,0);
}
public PackageNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packageName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterPackageName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitPackageName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitPackageName(this);
else return visitor.visitChildren(this);
}
}
public final PackageNameContext packageName() throws RecognitionException {
return packageName(0);
}
private PackageNameContext packageName(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PackageNameContext _localctx = new PackageNameContext(_ctx, _parentState);
PackageNameContext _prevctx = _localctx;
int _startState = 54;
enterRecursionRule(_localctx, 54, RULE_packageName, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(698);
match(Identifier);
}
_ctx.stop = _input.LT(-1);
setState(705);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,33,_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 PackageNameContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_packageName);
setState(700);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(701);
match(DOT);
setState(702);
match(Identifier);
}
}
}
setState(707);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,33,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class TypeNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public PackageOrTypeNameContext packageOrTypeName() {
return getRuleContext(PackageOrTypeNameContext.class,0);
}
public TypeNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeName(this);
else return visitor.visitChildren(this);
}
}
public final TypeNameContext typeName() throws RecognitionException {
TypeNameContext _localctx = new TypeNameContext(_ctx, getState());
enterRule(_localctx, 56, RULE_typeName);
try {
setState(713);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(708);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(709);
packageOrTypeName(0);
setState(710);
match(DOT);
setState(711);
match(Identifier);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PackageOrTypeNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public PackageOrTypeNameContext packageOrTypeName() {
return getRuleContext(PackageOrTypeNameContext.class,0);
}
public PackageOrTypeNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packageOrTypeName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterPackageOrTypeName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitPackageOrTypeName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitPackageOrTypeName(this);
else return visitor.visitChildren(this);
}
}
public final PackageOrTypeNameContext packageOrTypeName() throws RecognitionException {
return packageOrTypeName(0);
}
private PackageOrTypeNameContext packageOrTypeName(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PackageOrTypeNameContext _localctx = new PackageOrTypeNameContext(_ctx, _parentState);
PackageOrTypeNameContext _prevctx = _localctx;
int _startState = 58;
enterRecursionRule(_localctx, 58, RULE_packageOrTypeName, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(716);
match(Identifier);
}
_ctx.stop = _input.LT(-1);
setState(723);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,35,_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 PackageOrTypeNameContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_packageOrTypeName);
setState(718);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(719);
match(DOT);
setState(720);
match(Identifier);
}
}
}
setState(725);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,35,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class ExpressionNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public AmbiguousNameContext ambiguousName() {
return getRuleContext(AmbiguousNameContext.class,0);
}
public ExpressionNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressionName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterExpressionName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExpressionName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExpressionName(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionNameContext expressionName() throws RecognitionException {
ExpressionNameContext _localctx = new ExpressionNameContext(_ctx, getState());
enterRule(_localctx, 60, RULE_expressionName);
try {
setState(731);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(726);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(727);
ambiguousName(0);
setState(728);
match(DOT);
setState(729);
match(Identifier);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public MethodNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodName(this);
else return visitor.visitChildren(this);
}
}
public final MethodNameContext methodName() throws RecognitionException {
MethodNameContext _localctx = new MethodNameContext(_ctx, getState());
enterRule(_localctx, 62, RULE_methodName);
try {
enterOuterAlt(_localctx, 1);
{
setState(733);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AmbiguousNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public AmbiguousNameContext ambiguousName() {
return getRuleContext(AmbiguousNameContext.class,0);
}
public AmbiguousNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ambiguousName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAmbiguousName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAmbiguousName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAmbiguousName(this);
else return visitor.visitChildren(this);
}
}
public final AmbiguousNameContext ambiguousName() throws RecognitionException {
return ambiguousName(0);
}
private AmbiguousNameContext ambiguousName(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
AmbiguousNameContext _localctx = new AmbiguousNameContext(_ctx, _parentState);
AmbiguousNameContext _prevctx = _localctx;
int _startState = 64;
enterRecursionRule(_localctx, 64, RULE_ambiguousName, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
setState(736);
match(Identifier);
}
_ctx.stop = _input.LT(-1);
setState(743);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,37,_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 AmbiguousNameContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_ambiguousName);
setState(738);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(739);
match(DOT);
setState(740);
match(Identifier);
}
}
}
setState(745);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,37,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class CompilationUnitContext extends ParserRuleContext {
public OrdinaryCompilationContext ordinaryCompilation() {
return getRuleContext(OrdinaryCompilationContext.class,0);
}
public ModularCompilationContext modularCompilation() {
return getRuleContext(ModularCompilationContext.class,0);
}
public CompilationUnitContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_compilationUnit; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterCompilationUnit(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitCompilationUnit(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitCompilationUnit(this);
else return visitor.visitChildren(this);
}
}
public final CompilationUnitContext compilationUnit() throws RecognitionException {
CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState());
enterRule(_localctx, 66, RULE_compilationUnit);
try {
setState(748);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(746);
ordinaryCompilation();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(747);
modularCompilation();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class OrdinaryCompilationContext extends ParserRuleContext {
public TerminalNode EOF() { return getToken(Java9Parser.EOF, 0); }
public PackageDeclarationContext packageDeclaration() {
return getRuleContext(PackageDeclarationContext.class,0);
}
public List importDeclaration() {
return getRuleContexts(ImportDeclarationContext.class);
}
public ImportDeclarationContext importDeclaration(int i) {
return getRuleContext(ImportDeclarationContext.class,i);
}
public List typeDeclaration() {
return getRuleContexts(TypeDeclarationContext.class);
}
public TypeDeclarationContext typeDeclaration(int i) {
return getRuleContext(TypeDeclarationContext.class,i);
}
public OrdinaryCompilationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ordinaryCompilation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterOrdinaryCompilation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitOrdinaryCompilation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitOrdinaryCompilation(this);
else return visitor.visitChildren(this);
}
}
public final OrdinaryCompilationContext ordinaryCompilation() throws RecognitionException {
OrdinaryCompilationContext _localctx = new OrdinaryCompilationContext(_ctx, getState());
enterRule(_localctx, 68, RULE_ordinaryCompilation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(751);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
{
setState(750);
packageDeclaration();
}
break;
}
setState(756);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==IMPORT) {
{
{
setState(753);
importDeclaration();
}
}
setState(758);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(762);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==SEMI || _la==AT) {
{
{
setState(759);
typeDeclaration();
}
}
setState(764);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(765);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ModularCompilationContext extends ParserRuleContext {
public ModuleDeclarationContext moduleDeclaration() {
return getRuleContext(ModuleDeclarationContext.class,0);
}
public List importDeclaration() {
return getRuleContexts(ImportDeclarationContext.class);
}
public ImportDeclarationContext importDeclaration(int i) {
return getRuleContext(ImportDeclarationContext.class,i);
}
public ModularCompilationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_modularCompilation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterModularCompilation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitModularCompilation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitModularCompilation(this);
else return visitor.visitChildren(this);
}
}
public final ModularCompilationContext modularCompilation() throws RecognitionException {
ModularCompilationContext _localctx = new ModularCompilationContext(_ctx, getState());
enterRule(_localctx, 70, RULE_modularCompilation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(770);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==IMPORT) {
{
{
setState(767);
importDeclaration();
}
}
setState(772);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(773);
moduleDeclaration();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PackageDeclarationContext extends ParserRuleContext {
public PackageNameContext packageName() {
return getRuleContext(PackageNameContext.class,0);
}
public List packageModifier() {
return getRuleContexts(PackageModifierContext.class);
}
public PackageModifierContext packageModifier(int i) {
return getRuleContext(PackageModifierContext.class,i);
}
public PackageDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packageDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterPackageDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitPackageDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitPackageDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final PackageDeclarationContext packageDeclaration() throws RecognitionException {
PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState());
enterRule(_localctx, 72, RULE_packageDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(778);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(775);
packageModifier();
}
}
setState(780);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(781);
match(PACKAGE);
setState(782);
packageName(0);
setState(783);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PackageModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public PackageModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packageModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterPackageModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitPackageModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitPackageModifier(this);
else return visitor.visitChildren(this);
}
}
public final PackageModifierContext packageModifier() throws RecognitionException {
PackageModifierContext _localctx = new PackageModifierContext(_ctx, getState());
enterRule(_localctx, 74, RULE_packageModifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(785);
annotation();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ImportDeclarationContext extends ParserRuleContext {
public SingleTypeImportDeclarationContext singleTypeImportDeclaration() {
return getRuleContext(SingleTypeImportDeclarationContext.class,0);
}
public TypeImportOnDemandDeclarationContext typeImportOnDemandDeclaration() {
return getRuleContext(TypeImportOnDemandDeclarationContext.class,0);
}
public SingleStaticImportDeclarationContext singleStaticImportDeclaration() {
return getRuleContext(SingleStaticImportDeclarationContext.class,0);
}
public StaticImportOnDemandDeclarationContext staticImportOnDemandDeclaration() {
return getRuleContext(StaticImportOnDemandDeclarationContext.class,0);
}
public ImportDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_importDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterImportDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitImportDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitImportDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ImportDeclarationContext importDeclaration() throws RecognitionException {
ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState());
enterRule(_localctx, 76, RULE_importDeclaration);
try {
setState(791);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(787);
singleTypeImportDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(788);
typeImportOnDemandDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(789);
singleStaticImportDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(790);
staticImportOnDemandDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SingleTypeImportDeclarationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public SingleTypeImportDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleTypeImportDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSingleTypeImportDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSingleTypeImportDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSingleTypeImportDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final SingleTypeImportDeclarationContext singleTypeImportDeclaration() throws RecognitionException {
SingleTypeImportDeclarationContext _localctx = new SingleTypeImportDeclarationContext(_ctx, getState());
enterRule(_localctx, 78, RULE_singleTypeImportDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(793);
match(IMPORT);
setState(794);
typeName();
setState(795);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeImportOnDemandDeclarationContext extends ParserRuleContext {
public PackageOrTypeNameContext packageOrTypeName() {
return getRuleContext(PackageOrTypeNameContext.class,0);
}
public TypeImportOnDemandDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeImportOnDemandDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeImportOnDemandDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeImportOnDemandDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeImportOnDemandDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final TypeImportOnDemandDeclarationContext typeImportOnDemandDeclaration() throws RecognitionException {
TypeImportOnDemandDeclarationContext _localctx = new TypeImportOnDemandDeclarationContext(_ctx, getState());
enterRule(_localctx, 80, RULE_typeImportOnDemandDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(797);
match(IMPORT);
setState(798);
packageOrTypeName(0);
setState(799);
match(DOT);
setState(800);
match(MUL);
setState(801);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SingleStaticImportDeclarationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public SingleStaticImportDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleStaticImportDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSingleStaticImportDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSingleStaticImportDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSingleStaticImportDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final SingleStaticImportDeclarationContext singleStaticImportDeclaration() throws RecognitionException {
SingleStaticImportDeclarationContext _localctx = new SingleStaticImportDeclarationContext(_ctx, getState());
enterRule(_localctx, 82, RULE_singleStaticImportDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(803);
match(IMPORT);
setState(804);
match(STATIC);
setState(805);
typeName();
setState(806);
match(DOT);
setState(807);
match(Identifier);
setState(808);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StaticImportOnDemandDeclarationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public StaticImportOnDemandDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_staticImportOnDemandDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStaticImportOnDemandDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStaticImportOnDemandDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStaticImportOnDemandDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final StaticImportOnDemandDeclarationContext staticImportOnDemandDeclaration() throws RecognitionException {
StaticImportOnDemandDeclarationContext _localctx = new StaticImportOnDemandDeclarationContext(_ctx, getState());
enterRule(_localctx, 84, RULE_staticImportOnDemandDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
setState(810);
match(IMPORT);
setState(811);
match(STATIC);
setState(812);
typeName();
setState(813);
match(DOT);
setState(814);
match(MUL);
setState(815);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeDeclarationContext extends ParserRuleContext {
public ClassDeclarationContext classDeclaration() {
return getRuleContext(ClassDeclarationContext.class,0);
}
public InterfaceDeclarationContext interfaceDeclaration() {
return getRuleContext(InterfaceDeclarationContext.class,0);
}
public TypeDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final TypeDeclarationContext typeDeclaration() throws RecognitionException {
TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState());
enterRule(_localctx, 86, RULE_typeDeclaration);
try {
setState(820);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(817);
classDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(818);
interfaceDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(819);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ModuleDeclarationContext extends ParserRuleContext {
public ModuleNameContext moduleName() {
return getRuleContext(ModuleNameContext.class,0);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public List moduleDirective() {
return getRuleContexts(ModuleDirectiveContext.class);
}
public ModuleDirectiveContext moduleDirective(int i) {
return getRuleContext(ModuleDirectiveContext.class,i);
}
public ModuleDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_moduleDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterModuleDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitModuleDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitModuleDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ModuleDeclarationContext moduleDeclaration() throws RecognitionException {
ModuleDeclarationContext _localctx = new ModuleDeclarationContext(_ctx, getState());
enterRule(_localctx, 88, RULE_moduleDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(825);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(822);
annotation();
}
}
setState(827);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(829);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__0) {
{
setState(828);
match(T__0);
}
}
setState(831);
match(T__1);
setState(832);
moduleName(0);
setState(833);
match(LBRACE);
setState(837);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__3) | (1L << T__5) | (1L << T__6) | (1L << T__7))) != 0)) {
{
{
setState(834);
moduleDirective();
}
}
setState(839);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(840);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ModuleDirectiveContext extends ParserRuleContext {
public List moduleName() {
return getRuleContexts(ModuleNameContext.class);
}
public ModuleNameContext moduleName(int i) {
return getRuleContext(ModuleNameContext.class,i);
}
public List requiresModifier() {
return getRuleContexts(RequiresModifierContext.class);
}
public RequiresModifierContext requiresModifier(int i) {
return getRuleContext(RequiresModifierContext.class,i);
}
public PackageNameContext packageName() {
return getRuleContext(PackageNameContext.class,0);
}
public List typeName() {
return getRuleContexts(TypeNameContext.class);
}
public TypeNameContext typeName(int i) {
return getRuleContext(TypeNameContext.class,i);
}
public ModuleDirectiveContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_moduleDirective; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterModuleDirective(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitModuleDirective(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitModuleDirective(this);
else return visitor.visitChildren(this);
}
}
public final ModuleDirectiveContext moduleDirective() throws RecognitionException {
ModuleDirectiveContext _localctx = new ModuleDirectiveContext(_ctx, getState());
enterRule(_localctx, 90, RULE_moduleDirective);
int _la;
try {
setState(899);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__2:
enterOuterAlt(_localctx, 1);
{
setState(842);
match(T__2);
setState(846);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__9 || _la==STATIC) {
{
{
setState(843);
requiresModifier();
}
}
setState(848);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(849);
moduleName(0);
setState(850);
match(SEMI);
}
break;
case T__3:
enterOuterAlt(_localctx, 2);
{
setState(852);
match(T__3);
setState(853);
packageName(0);
setState(863);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__4) {
{
setState(854);
match(T__4);
setState(855);
moduleName(0);
setState(860);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(856);
match(COMMA);
setState(857);
moduleName(0);
}
}
setState(862);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(865);
match(SEMI);
}
break;
case T__5:
enterOuterAlt(_localctx, 3);
{
setState(867);
match(T__5);
setState(868);
packageName(0);
setState(878);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__4) {
{
setState(869);
match(T__4);
setState(870);
moduleName(0);
setState(875);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(871);
match(COMMA);
setState(872);
moduleName(0);
}
}
setState(877);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(880);
match(SEMI);
}
break;
case T__6:
enterOuterAlt(_localctx, 4);
{
setState(882);
match(T__6);
setState(883);
typeName();
setState(884);
match(SEMI);
}
break;
case T__7:
enterOuterAlt(_localctx, 5);
{
setState(886);
match(T__7);
setState(887);
typeName();
setState(888);
match(T__8);
setState(889);
typeName();
setState(894);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(890);
match(COMMA);
setState(891);
typeName();
}
}
setState(896);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(897);
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;
}
public static class RequiresModifierContext extends ParserRuleContext {
public RequiresModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_requiresModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterRequiresModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitRequiresModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitRequiresModifier(this);
else return visitor.visitChildren(this);
}
}
public final RequiresModifierContext requiresModifier() throws RecognitionException {
RequiresModifierContext _localctx = new RequiresModifierContext(_ctx, getState());
enterRule(_localctx, 92, RULE_requiresModifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(901);
_la = _input.LA(1);
if ( !(_la==T__9 || _la==STATIC) ) {
_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;
}
public static class ClassDeclarationContext extends ParserRuleContext {
public NormalClassDeclarationContext normalClassDeclaration() {
return getRuleContext(NormalClassDeclarationContext.class,0);
}
public EnumDeclarationContext enumDeclaration() {
return getRuleContext(EnumDeclarationContext.class,0);
}
public ClassDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ClassDeclarationContext classDeclaration() throws RecognitionException {
ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
enterRule(_localctx, 94, RULE_classDeclaration);
try {
setState(905);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(903);
normalClassDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(904);
enumDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NormalClassDeclarationContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public ClassBodyContext classBody() {
return getRuleContext(ClassBodyContext.class,0);
}
public List classModifier() {
return getRuleContexts(ClassModifierContext.class);
}
public ClassModifierContext classModifier(int i) {
return getRuleContext(ClassModifierContext.class,i);
}
public TypeParametersContext typeParameters() {
return getRuleContext(TypeParametersContext.class,0);
}
public SuperclassContext superclass() {
return getRuleContext(SuperclassContext.class,0);
}
public SuperinterfacesContext superinterfaces() {
return getRuleContext(SuperinterfacesContext.class,0);
}
public NormalClassDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_normalClassDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterNormalClassDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitNormalClassDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitNormalClassDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final NormalClassDeclarationContext normalClassDeclaration() throws RecognitionException {
NormalClassDeclarationContext _localctx = new NormalClassDeclarationContext(_ctx, getState());
enterRule(_localctx, 96, RULE_normalClassDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(910);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) {
{
{
setState(907);
classModifier();
}
}
setState(912);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(913);
match(CLASS);
setState(914);
match(Identifier);
setState(916);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(915);
typeParameters();
}
}
setState(919);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EXTENDS) {
{
setState(918);
superclass();
}
}
setState(922);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==IMPLEMENTS) {
{
setState(921);
superinterfaces();
}
}
setState(924);
classBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public ClassModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassModifier(this);
else return visitor.visitChildren(this);
}
}
public final ClassModifierContext classModifier() throws RecognitionException {
ClassModifierContext _localctx = new ClassModifierContext(_ctx, getState());
enterRule(_localctx, 98, RULE_classModifier);
try {
setState(934);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(926);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(927);
match(PUBLIC);
}
break;
case PROTECTED:
enterOuterAlt(_localctx, 3);
{
setState(928);
match(PROTECTED);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 4);
{
setState(929);
match(PRIVATE);
}
break;
case ABSTRACT:
enterOuterAlt(_localctx, 5);
{
setState(930);
match(ABSTRACT);
}
break;
case STATIC:
enterOuterAlt(_localctx, 6);
{
setState(931);
match(STATIC);
}
break;
case FINAL:
enterOuterAlt(_localctx, 7);
{
setState(932);
match(FINAL);
}
break;
case STRICTFP:
enterOuterAlt(_localctx, 8);
{
setState(933);
match(STRICTFP);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeParametersContext extends ParserRuleContext {
public TypeParameterListContext typeParameterList() {
return getRuleContext(TypeParameterListContext.class,0);
}
public TypeParametersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeParameters(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeParameters(this);
else return visitor.visitChildren(this);
}
}
public final TypeParametersContext typeParameters() throws RecognitionException {
TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState());
enterRule(_localctx, 100, RULE_typeParameters);
try {
enterOuterAlt(_localctx, 1);
{
setState(936);
match(LT);
setState(937);
typeParameterList();
setState(938);
match(GT);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TypeParameterListContext extends ParserRuleContext {
public List typeParameter() {
return getRuleContexts(TypeParameterContext.class);
}
public TypeParameterContext typeParameter(int i) {
return getRuleContext(TypeParameterContext.class,i);
}
public TypeParameterListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameterList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTypeParameterList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTypeParameterList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTypeParameterList(this);
else return visitor.visitChildren(this);
}
}
public final TypeParameterListContext typeParameterList() throws RecognitionException {
TypeParameterListContext _localctx = new TypeParameterListContext(_ctx, getState());
enterRule(_localctx, 102, RULE_typeParameterList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(940);
typeParameter();
setState(945);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(941);
match(COMMA);
setState(942);
typeParameter();
}
}
setState(947);
_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;
}
public static class SuperclassContext extends ParserRuleContext {
public ClassTypeContext classType() {
return getRuleContext(ClassTypeContext.class,0);
}
public SuperclassContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_superclass; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSuperclass(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSuperclass(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSuperclass(this);
else return visitor.visitChildren(this);
}
}
public final SuperclassContext superclass() throws RecognitionException {
SuperclassContext _localctx = new SuperclassContext(_ctx, getState());
enterRule(_localctx, 104, RULE_superclass);
try {
enterOuterAlt(_localctx, 1);
{
setState(948);
match(EXTENDS);
setState(949);
classType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SuperinterfacesContext extends ParserRuleContext {
public InterfaceTypeListContext interfaceTypeList() {
return getRuleContext(InterfaceTypeListContext.class,0);
}
public SuperinterfacesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_superinterfaces; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSuperinterfaces(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSuperinterfaces(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSuperinterfaces(this);
else return visitor.visitChildren(this);
}
}
public final SuperinterfacesContext superinterfaces() throws RecognitionException {
SuperinterfacesContext _localctx = new SuperinterfacesContext(_ctx, getState());
enterRule(_localctx, 106, RULE_superinterfaces);
try {
enterOuterAlt(_localctx, 1);
{
setState(951);
match(IMPLEMENTS);
setState(952);
interfaceTypeList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceTypeListContext extends ParserRuleContext {
public List interfaceType() {
return getRuleContexts(InterfaceTypeContext.class);
}
public InterfaceTypeContext interfaceType(int i) {
return getRuleContext(InterfaceTypeContext.class,i);
}
public InterfaceTypeListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceTypeList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceTypeList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceTypeList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceTypeList(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceTypeListContext interfaceTypeList() throws RecognitionException {
InterfaceTypeListContext _localctx = new InterfaceTypeListContext(_ctx, getState());
enterRule(_localctx, 108, RULE_interfaceTypeList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(954);
interfaceType();
setState(959);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(955);
match(COMMA);
setState(956);
interfaceType();
}
}
setState(961);
_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;
}
public static class ClassBodyContext extends ParserRuleContext {
public List classBodyDeclaration() {
return getRuleContexts(ClassBodyDeclarationContext.class);
}
public ClassBodyDeclarationContext classBodyDeclaration(int i) {
return getRuleContext(ClassBodyDeclarationContext.class,i);
}
public ClassBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassBody(this);
else return visitor.visitChildren(this);
}
}
public final ClassBodyContext classBody() throws RecognitionException {
ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState());
enterRule(_localctx, 110, RULE_classBody);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(962);
match(LBRACE);
setState(966);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (LBRACE - 70)) | (1L << (SEMI - 70)) | (1L << (AT - 70)) | (1L << (LT - 70)) | (1L << (Identifier - 70)))) != 0)) {
{
{
setState(963);
classBodyDeclaration();
}
}
setState(968);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(969);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassBodyDeclarationContext extends ParserRuleContext {
public ClassMemberDeclarationContext classMemberDeclaration() {
return getRuleContext(ClassMemberDeclarationContext.class,0);
}
public InstanceInitializerContext instanceInitializer() {
return getRuleContext(InstanceInitializerContext.class,0);
}
public StaticInitializerContext staticInitializer() {
return getRuleContext(StaticInitializerContext.class,0);
}
public ConstructorDeclarationContext constructorDeclaration() {
return getRuleContext(ConstructorDeclarationContext.class,0);
}
public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classBodyDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassBodyDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassBodyDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassBodyDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException {
ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState());
enterRule(_localctx, 112, RULE_classBodyDeclaration);
try {
setState(975);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(971);
classMemberDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(972);
instanceInitializer();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(973);
staticInitializer();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(974);
constructorDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassMemberDeclarationContext extends ParserRuleContext {
public FieldDeclarationContext fieldDeclaration() {
return getRuleContext(FieldDeclarationContext.class,0);
}
public MethodDeclarationContext methodDeclaration() {
return getRuleContext(MethodDeclarationContext.class,0);
}
public ClassDeclarationContext classDeclaration() {
return getRuleContext(ClassDeclarationContext.class,0);
}
public InterfaceDeclarationContext interfaceDeclaration() {
return getRuleContext(InterfaceDeclarationContext.class,0);
}
public ClassMemberDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classMemberDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterClassMemberDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitClassMemberDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitClassMemberDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ClassMemberDeclarationContext classMemberDeclaration() throws RecognitionException {
ClassMemberDeclarationContext _localctx = new ClassMemberDeclarationContext(_ctx, getState());
enterRule(_localctx, 114, RULE_classMemberDeclaration);
try {
setState(982);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,66,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(977);
fieldDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(978);
methodDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(979);
classDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(980);
interfaceDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(981);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FieldDeclarationContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorListContext variableDeclaratorList() {
return getRuleContext(VariableDeclaratorListContext.class,0);
}
public List fieldModifier() {
return getRuleContexts(FieldModifierContext.class);
}
public FieldModifierContext fieldModifier(int i) {
return getRuleContext(FieldModifierContext.class,i);
}
public FieldDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fieldDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFieldDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFieldDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFieldDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final FieldDeclarationContext fieldDeclaration() throws RecognitionException {
FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState());
enterRule(_localctx, 116, RULE_fieldDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(987);
_errHandler.sync(this);
_la = _input.LA(1);
while (((((_la - 28)) & ~0x3f) == 0 && ((1L << (_la - 28)) & ((1L << (FINAL - 28)) | (1L << (PRIVATE - 28)) | (1L << (PROTECTED - 28)) | (1L << (PUBLIC - 28)) | (1L << (STATIC - 28)) | (1L << (TRANSIENT - 28)) | (1L << (VOLATILE - 28)) | (1L << (AT - 28)))) != 0)) {
{
{
setState(984);
fieldModifier();
}
}
setState(989);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(990);
unannType();
setState(991);
variableDeclaratorList();
setState(992);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FieldModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public FieldModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fieldModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFieldModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFieldModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFieldModifier(this);
else return visitor.visitChildren(this);
}
}
public final FieldModifierContext fieldModifier() throws RecognitionException {
FieldModifierContext _localctx = new FieldModifierContext(_ctx, getState());
enterRule(_localctx, 118, RULE_fieldModifier);
try {
setState(1002);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(994);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(995);
match(PUBLIC);
}
break;
case PROTECTED:
enterOuterAlt(_localctx, 3);
{
setState(996);
match(PROTECTED);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 4);
{
setState(997);
match(PRIVATE);
}
break;
case STATIC:
enterOuterAlt(_localctx, 5);
{
setState(998);
match(STATIC);
}
break;
case FINAL:
enterOuterAlt(_localctx, 6);
{
setState(999);
match(FINAL);
}
break;
case TRANSIENT:
enterOuterAlt(_localctx, 7);
{
setState(1000);
match(TRANSIENT);
}
break;
case VOLATILE:
enterOuterAlt(_localctx, 8);
{
setState(1001);
match(VOLATILE);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VariableDeclaratorListContext extends ParserRuleContext {
public List variableDeclarator() {
return getRuleContexts(VariableDeclaratorContext.class);
}
public VariableDeclaratorContext variableDeclarator(int i) {
return getRuleContext(VariableDeclaratorContext.class,i);
}
public VariableDeclaratorListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableDeclaratorList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableDeclaratorList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableDeclaratorList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableDeclaratorList(this);
else return visitor.visitChildren(this);
}
}
public final VariableDeclaratorListContext variableDeclaratorList() throws RecognitionException {
VariableDeclaratorListContext _localctx = new VariableDeclaratorListContext(_ctx, getState());
enterRule(_localctx, 120, RULE_variableDeclaratorList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1004);
variableDeclarator();
setState(1009);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1005);
match(COMMA);
setState(1006);
variableDeclarator();
}
}
setState(1011);
_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;
}
public static class VariableDeclaratorContext extends ParserRuleContext {
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public VariableInitializerContext variableInitializer() {
return getRuleContext(VariableInitializerContext.class,0);
}
public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final VariableDeclaratorContext variableDeclarator() throws RecognitionException {
VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState());
enterRule(_localctx, 122, RULE_variableDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1012);
variableDeclaratorId();
setState(1015);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ASSIGN) {
{
setState(1013);
match(ASSIGN);
setState(1014);
variableInitializer();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VariableDeclaratorIdContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public DimsContext dims() {
return getRuleContext(DimsContext.class,0);
}
public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableDeclaratorId; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableDeclaratorId(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableDeclaratorId(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableDeclaratorId(this);
else return visitor.visitChildren(this);
}
}
public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException {
VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState());
enterRule(_localctx, 124, RULE_variableDeclaratorId);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1017);
match(Identifier);
setState(1019);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LBRACK || _la==AT) {
{
setState(1018);
dims();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VariableInitializerContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ArrayInitializerContext arrayInitializer() {
return getRuleContext(ArrayInitializerContext.class,0);
}
public VariableInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableInitializer(this);
else return visitor.visitChildren(this);
}
}
public final VariableInitializerContext variableInitializer() throws RecognitionException {
VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState());
enterRule(_localctx, 126, RULE_variableInitializer);
try {
setState(1023);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case NEW:
case SHORT:
case SUPER:
case THIS:
case VOID:
case IntegerLiteral:
case FloatingPointLiteral:
case BooleanLiteral:
case CharacterLiteral:
case StringLiteral:
case NullLiteral:
case LPAREN:
case AT:
case BANG:
case TILDE:
case INC:
case DEC:
case ADD:
case SUB:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1021);
expression();
}
break;
case LBRACE:
enterOuterAlt(_localctx, 2);
{
setState(1022);
arrayInitializer();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannTypeContext extends ParserRuleContext {
public UnannPrimitiveTypeContext unannPrimitiveType() {
return getRuleContext(UnannPrimitiveTypeContext.class,0);
}
public UnannReferenceTypeContext unannReferenceType() {
return getRuleContext(UnannReferenceTypeContext.class,0);
}
public UnannTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannType(this);
else return visitor.visitChildren(this);
}
}
public final UnannTypeContext unannType() throws RecognitionException {
UnannTypeContext _localctx = new UnannTypeContext(_ctx, getState());
enterRule(_localctx, 128, RULE_unannType);
try {
setState(1027);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1025);
unannPrimitiveType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1026);
unannReferenceType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannPrimitiveTypeContext extends ParserRuleContext {
public NumericTypeContext numericType() {
return getRuleContext(NumericTypeContext.class,0);
}
public UnannPrimitiveTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannPrimitiveType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannPrimitiveType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannPrimitiveType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannPrimitiveType(this);
else return visitor.visitChildren(this);
}
}
public final UnannPrimitiveTypeContext unannPrimitiveType() throws RecognitionException {
UnannPrimitiveTypeContext _localctx = new UnannPrimitiveTypeContext(_ctx, getState());
enterRule(_localctx, 130, RULE_unannPrimitiveType);
try {
setState(1031);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
enterOuterAlt(_localctx, 1);
{
setState(1029);
numericType();
}
break;
case BOOLEAN:
enterOuterAlt(_localctx, 2);
{
setState(1030);
match(BOOLEAN);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannReferenceTypeContext extends ParserRuleContext {
public UnannClassOrInterfaceTypeContext unannClassOrInterfaceType() {
return getRuleContext(UnannClassOrInterfaceTypeContext.class,0);
}
public UnannTypeVariableContext unannTypeVariable() {
return getRuleContext(UnannTypeVariableContext.class,0);
}
public UnannArrayTypeContext unannArrayType() {
return getRuleContext(UnannArrayTypeContext.class,0);
}
public UnannReferenceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannReferenceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannReferenceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannReferenceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannReferenceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannReferenceTypeContext unannReferenceType() throws RecognitionException {
UnannReferenceTypeContext _localctx = new UnannReferenceTypeContext(_ctx, getState());
enterRule(_localctx, 132, RULE_unannReferenceType);
try {
setState(1036);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1033);
unannClassOrInterfaceType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1034);
unannTypeVariable();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1035);
unannArrayType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannClassOrInterfaceTypeContext extends ParserRuleContext {
public UnannClassType_lfno_unannClassOrInterfaceTypeContext unannClassType_lfno_unannClassOrInterfaceType() {
return getRuleContext(UnannClassType_lfno_unannClassOrInterfaceTypeContext.class,0);
}
public UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext unannInterfaceType_lfno_unannClassOrInterfaceType() {
return getRuleContext(UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext.class,0);
}
public List unannClassType_lf_unannClassOrInterfaceType() {
return getRuleContexts(UnannClassType_lf_unannClassOrInterfaceTypeContext.class);
}
public UnannClassType_lf_unannClassOrInterfaceTypeContext unannClassType_lf_unannClassOrInterfaceType(int i) {
return getRuleContext(UnannClassType_lf_unannClassOrInterfaceTypeContext.class,i);
}
public List unannInterfaceType_lf_unannClassOrInterfaceType() {
return getRuleContexts(UnannInterfaceType_lf_unannClassOrInterfaceTypeContext.class);
}
public UnannInterfaceType_lf_unannClassOrInterfaceTypeContext unannInterfaceType_lf_unannClassOrInterfaceType(int i) {
return getRuleContext(UnannInterfaceType_lf_unannClassOrInterfaceTypeContext.class,i);
}
public UnannClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannClassOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannClassOrInterfaceTypeContext unannClassOrInterfaceType() throws RecognitionException {
UnannClassOrInterfaceTypeContext _localctx = new UnannClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 134, RULE_unannClassOrInterfaceType);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1040);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) {
case 1:
{
setState(1038);
unannClassType_lfno_unannClassOrInterfaceType();
}
break;
case 2:
{
setState(1039);
unannInterfaceType_lfno_unannClassOrInterfaceType();
}
break;
}
setState(1046);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,78,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
setState(1044);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) {
case 1:
{
setState(1042);
unannClassType_lf_unannClassOrInterfaceType();
}
break;
case 2:
{
setState(1043);
unannInterfaceType_lf_unannClassOrInterfaceType();
}
break;
}
}
}
setState(1048);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,78,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannClassTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public UnannClassOrInterfaceTypeContext unannClassOrInterfaceType() {
return getRuleContext(UnannClassOrInterfaceTypeContext.class,0);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public UnannClassTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannClassType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannClassType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannClassType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannClassType(this);
else return visitor.visitChildren(this);
}
}
public final UnannClassTypeContext unannClassType() throws RecognitionException {
UnannClassTypeContext _localctx = new UnannClassTypeContext(_ctx, getState());
enterRule(_localctx, 136, RULE_unannClassType);
int _la;
try {
setState(1065);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1049);
match(Identifier);
setState(1051);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1050);
typeArguments();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1053);
unannClassOrInterfaceType();
setState(1054);
match(DOT);
setState(1058);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1055);
annotation();
}
}
setState(1060);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1061);
match(Identifier);
setState(1063);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1062);
typeArguments();
}
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannClassType_lf_unannClassOrInterfaceTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public UnannClassType_lf_unannClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannClassType_lf_unannClassOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannClassType_lf_unannClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannClassType_lf_unannClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannClassType_lf_unannClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannClassType_lf_unannClassOrInterfaceTypeContext unannClassType_lf_unannClassOrInterfaceType() throws RecognitionException {
UnannClassType_lf_unannClassOrInterfaceTypeContext _localctx = new UnannClassType_lf_unannClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 138, RULE_unannClassType_lf_unannClassOrInterfaceType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1067);
match(DOT);
setState(1071);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1068);
annotation();
}
}
setState(1073);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1074);
match(Identifier);
setState(1076);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1075);
typeArguments();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannClassType_lfno_unannClassOrInterfaceTypeContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public UnannClassType_lfno_unannClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannClassType_lfno_unannClassOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannClassType_lfno_unannClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannClassType_lfno_unannClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannClassType_lfno_unannClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannClassType_lfno_unannClassOrInterfaceTypeContext unannClassType_lfno_unannClassOrInterfaceType() throws RecognitionException {
UnannClassType_lfno_unannClassOrInterfaceTypeContext _localctx = new UnannClassType_lfno_unannClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 140, RULE_unannClassType_lfno_unannClassOrInterfaceType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1078);
match(Identifier);
setState(1080);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1079);
typeArguments();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannInterfaceTypeContext extends ParserRuleContext {
public UnannClassTypeContext unannClassType() {
return getRuleContext(UnannClassTypeContext.class,0);
}
public UnannInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannInterfaceTypeContext unannInterfaceType() throws RecognitionException {
UnannInterfaceTypeContext _localctx = new UnannInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 142, RULE_unannInterfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(1082);
unannClassType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannInterfaceType_lf_unannClassOrInterfaceTypeContext extends ParserRuleContext {
public UnannClassType_lf_unannClassOrInterfaceTypeContext unannClassType_lf_unannClassOrInterfaceType() {
return getRuleContext(UnannClassType_lf_unannClassOrInterfaceTypeContext.class,0);
}
public UnannInterfaceType_lf_unannClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannInterfaceType_lf_unannClassOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannInterfaceType_lf_unannClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannInterfaceType_lf_unannClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannInterfaceType_lf_unannClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannInterfaceType_lf_unannClassOrInterfaceTypeContext unannInterfaceType_lf_unannClassOrInterfaceType() throws RecognitionException {
UnannInterfaceType_lf_unannClassOrInterfaceTypeContext _localctx = new UnannInterfaceType_lf_unannClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 144, RULE_unannInterfaceType_lf_unannClassOrInterfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(1084);
unannClassType_lf_unannClassOrInterfaceType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext extends ParserRuleContext {
public UnannClassType_lfno_unannClassOrInterfaceTypeContext unannClassType_lfno_unannClassOrInterfaceType() {
return getRuleContext(UnannClassType_lfno_unannClassOrInterfaceTypeContext.class,0);
}
public UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannInterfaceType_lfno_unannClassOrInterfaceType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannInterfaceType_lfno_unannClassOrInterfaceType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannInterfaceType_lfno_unannClassOrInterfaceType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannInterfaceType_lfno_unannClassOrInterfaceType(this);
else return visitor.visitChildren(this);
}
}
public final UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext unannInterfaceType_lfno_unannClassOrInterfaceType() throws RecognitionException {
UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext _localctx = new UnannInterfaceType_lfno_unannClassOrInterfaceTypeContext(_ctx, getState());
enterRule(_localctx, 146, RULE_unannInterfaceType_lfno_unannClassOrInterfaceType);
try {
enterOuterAlt(_localctx, 1);
{
setState(1086);
unannClassType_lfno_unannClassOrInterfaceType();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannTypeVariableContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public UnannTypeVariableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannTypeVariable; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannTypeVariable(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannTypeVariable(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannTypeVariable(this);
else return visitor.visitChildren(this);
}
}
public final UnannTypeVariableContext unannTypeVariable() throws RecognitionException {
UnannTypeVariableContext _localctx = new UnannTypeVariableContext(_ctx, getState());
enterRule(_localctx, 148, RULE_unannTypeVariable);
try {
enterOuterAlt(_localctx, 1);
{
setState(1088);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnannArrayTypeContext extends ParserRuleContext {
public UnannPrimitiveTypeContext unannPrimitiveType() {
return getRuleContext(UnannPrimitiveTypeContext.class,0);
}
public DimsContext dims() {
return getRuleContext(DimsContext.class,0);
}
public UnannClassOrInterfaceTypeContext unannClassOrInterfaceType() {
return getRuleContext(UnannClassOrInterfaceTypeContext.class,0);
}
public UnannTypeVariableContext unannTypeVariable() {
return getRuleContext(UnannTypeVariableContext.class,0);
}
public UnannArrayTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unannArrayType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterUnannArrayType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitUnannArrayType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitUnannArrayType(this);
else return visitor.visitChildren(this);
}
}
public final UnannArrayTypeContext unannArrayType() throws RecognitionException {
UnannArrayTypeContext _localctx = new UnannArrayTypeContext(_ctx, getState());
enterRule(_localctx, 150, RULE_unannArrayType);
try {
setState(1099);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1090);
unannPrimitiveType();
setState(1091);
dims();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1093);
unannClassOrInterfaceType();
setState(1094);
dims();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1096);
unannTypeVariable();
setState(1097);
dims();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodDeclarationContext extends ParserRuleContext {
public MethodHeaderContext methodHeader() {
return getRuleContext(MethodHeaderContext.class,0);
}
public MethodBodyContext methodBody() {
return getRuleContext(MethodBodyContext.class,0);
}
public List methodModifier() {
return getRuleContexts(MethodModifierContext.class);
}
public MethodModifierContext methodModifier(int i) {
return getRuleContext(MethodModifierContext.class,i);
}
public MethodDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final MethodDeclarationContext methodDeclaration() throws RecognitionException {
MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState());
enterRule(_localctx, 152, RULE_methodDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1104);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED))) != 0) || _la==AT) {
{
{
setState(1101);
methodModifier();
}
}
setState(1106);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1107);
methodHeader();
setState(1108);
methodBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public MethodModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodModifier(this);
else return visitor.visitChildren(this);
}
}
public final MethodModifierContext methodModifier() throws RecognitionException {
MethodModifierContext _localctx = new MethodModifierContext(_ctx, getState());
enterRule(_localctx, 154, RULE_methodModifier);
try {
setState(1120);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1110);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1111);
match(PUBLIC);
}
break;
case PROTECTED:
enterOuterAlt(_localctx, 3);
{
setState(1112);
match(PROTECTED);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 4);
{
setState(1113);
match(PRIVATE);
}
break;
case ABSTRACT:
enterOuterAlt(_localctx, 5);
{
setState(1114);
match(ABSTRACT);
}
break;
case STATIC:
enterOuterAlt(_localctx, 6);
{
setState(1115);
match(STATIC);
}
break;
case FINAL:
enterOuterAlt(_localctx, 7);
{
setState(1116);
match(FINAL);
}
break;
case SYNCHRONIZED:
enterOuterAlt(_localctx, 8);
{
setState(1117);
match(SYNCHRONIZED);
}
break;
case NATIVE:
enterOuterAlt(_localctx, 9);
{
setState(1118);
match(NATIVE);
}
break;
case STRICTFP:
enterOuterAlt(_localctx, 10);
{
setState(1119);
match(STRICTFP);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodHeaderContext extends ParserRuleContext {
public ResultContext result() {
return getRuleContext(ResultContext.class,0);
}
public MethodDeclaratorContext methodDeclarator() {
return getRuleContext(MethodDeclaratorContext.class,0);
}
public Throws_Context throws_() {
return getRuleContext(Throws_Context.class,0);
}
public TypeParametersContext typeParameters() {
return getRuleContext(TypeParametersContext.class,0);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public MethodHeaderContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodHeader; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodHeader(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodHeader(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodHeader(this);
else return visitor.visitChildren(this);
}
}
public final MethodHeaderContext methodHeader() throws RecognitionException {
MethodHeaderContext _localctx = new MethodHeaderContext(_ctx, getState());
enterRule(_localctx, 156, RULE_methodHeader);
int _la;
try {
setState(1139);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case VOID:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1122);
result();
setState(1123);
methodDeclarator();
setState(1125);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==THROWS) {
{
setState(1124);
throws_();
}
}
}
break;
case LT:
enterOuterAlt(_localctx, 2);
{
setState(1127);
typeParameters();
setState(1131);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1128);
annotation();
}
}
setState(1133);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1134);
result();
setState(1135);
methodDeclarator();
setState(1137);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==THROWS) {
{
setState(1136);
throws_();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ResultContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public ResultContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_result; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterResult(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitResult(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitResult(this);
else return visitor.visitChildren(this);
}
}
public final ResultContext result() throws RecognitionException {
ResultContext _localctx = new ResultContext(_ctx, getState());
enterRule(_localctx, 158, RULE_result);
try {
setState(1143);
_errHandler.sync(this);
switch (_input.LA(1)) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1141);
unannType();
}
break;
case VOID:
enterOuterAlt(_localctx, 2);
{
setState(1142);
match(VOID);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodDeclaratorContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public FormalParameterListContext formalParameterList() {
return getRuleContext(FormalParameterListContext.class,0);
}
public DimsContext dims() {
return getRuleContext(DimsContext.class,0);
}
public MethodDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final MethodDeclaratorContext methodDeclarator() throws RecognitionException {
MethodDeclaratorContext _localctx = new MethodDeclaratorContext(_ctx, getState());
enterRule(_localctx, 160, RULE_methodDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1145);
match(Identifier);
setState(1146);
match(LPAREN);
setState(1148);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==AT || _la==Identifier) {
{
setState(1147);
formalParameterList();
}
}
setState(1150);
match(RPAREN);
setState(1152);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LBRACK || _la==AT) {
{
setState(1151);
dims();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FormalParameterListContext extends ParserRuleContext {
public FormalParametersContext formalParameters() {
return getRuleContext(FormalParametersContext.class,0);
}
public LastFormalParameterContext lastFormalParameter() {
return getRuleContext(LastFormalParameterContext.class,0);
}
public ReceiverParameterContext receiverParameter() {
return getRuleContext(ReceiverParameterContext.class,0);
}
public FormalParameterListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formalParameterList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFormalParameterList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFormalParameterList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFormalParameterList(this);
else return visitor.visitChildren(this);
}
}
public final FormalParameterListContext formalParameterList() throws RecognitionException {
FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState());
enterRule(_localctx, 162, RULE_formalParameterList);
try {
setState(1160);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1154);
formalParameters();
setState(1155);
match(COMMA);
setState(1156);
lastFormalParameter();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1158);
lastFormalParameter();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1159);
receiverParameter();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FormalParametersContext extends ParserRuleContext {
public List formalParameter() {
return getRuleContexts(FormalParameterContext.class);
}
public FormalParameterContext formalParameter(int i) {
return getRuleContext(FormalParameterContext.class,i);
}
public ReceiverParameterContext receiverParameter() {
return getRuleContext(ReceiverParameterContext.class,0);
}
public FormalParametersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formalParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFormalParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFormalParameters(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFormalParameters(this);
else return visitor.visitChildren(this);
}
}
public final FormalParametersContext formalParameters() throws RecognitionException {
FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState());
enterRule(_localctx, 164, RULE_formalParameters);
try {
int _alt;
setState(1178);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1162);
formalParameter();
setState(1167);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,97,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1163);
match(COMMA);
setState(1164);
formalParameter();
}
}
}
setState(1169);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,97,_ctx);
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1170);
receiverParameter();
setState(1175);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,98,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1171);
match(COMMA);
setState(1172);
formalParameter();
}
}
}
setState(1177);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,98,_ctx);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class FormalParameterContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public FormalParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_formalParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFormalParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFormalParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFormalParameter(this);
else return visitor.visitChildren(this);
}
}
public final FormalParameterContext formalParameter() throws RecognitionException {
FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState());
enterRule(_localctx, 166, RULE_formalParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1183);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1180);
variableModifier();
}
}
setState(1185);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1186);
unannType();
setState(1187);
variableDeclaratorId();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VariableModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public VariableModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableModifier(this);
else return visitor.visitChildren(this);
}
}
public final VariableModifierContext variableModifier() throws RecognitionException {
VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState());
enterRule(_localctx, 168, RULE_variableModifier);
try {
setState(1191);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1189);
annotation();
}
break;
case FINAL:
enterOuterAlt(_localctx, 2);
{
setState(1190);
match(FINAL);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LastFormalParameterContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public FormalParameterContext formalParameter() {
return getRuleContext(FormalParameterContext.class,0);
}
public LastFormalParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lastFormalParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterLastFormalParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLastFormalParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLastFormalParameter(this);
else return visitor.visitChildren(this);
}
}
public final LastFormalParameterContext lastFormalParameter() throws RecognitionException {
LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState());
enterRule(_localctx, 170, RULE_lastFormalParameter);
int _la;
try {
setState(1210);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1196);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1193);
variableModifier();
}
}
setState(1198);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1199);
unannType();
setState(1203);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1200);
annotation();
}
}
setState(1205);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1206);
match(ELLIPSIS);
setState(1207);
variableDeclaratorId();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1209);
formalParameter();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ReceiverParameterContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public List annotation() {
return getRuleContexts(AnnotationContext.class);
}
public AnnotationContext annotation(int i) {
return getRuleContext(AnnotationContext.class,i);
}
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public ReceiverParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_receiverParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterReceiverParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitReceiverParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitReceiverParameter(this);
else return visitor.visitChildren(this);
}
}
public final ReceiverParameterContext receiverParameter() throws RecognitionException {
ReceiverParameterContext _localctx = new ReceiverParameterContext(_ctx, getState());
enterRule(_localctx, 172, RULE_receiverParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1215);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1212);
annotation();
}
}
setState(1217);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1218);
unannType();
setState(1221);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1219);
match(Identifier);
setState(1220);
match(DOT);
}
}
setState(1223);
match(THIS);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class Throws_Context extends ParserRuleContext {
public ExceptionTypeListContext exceptionTypeList() {
return getRuleContext(ExceptionTypeListContext.class,0);
}
public Throws_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_throws_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterThrows_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitThrows_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitThrows_(this);
else return visitor.visitChildren(this);
}
}
public final Throws_Context throws_() throws RecognitionException {
Throws_Context _localctx = new Throws_Context(_ctx, getState());
enterRule(_localctx, 174, RULE_throws_);
try {
enterOuterAlt(_localctx, 1);
{
setState(1225);
match(THROWS);
setState(1226);
exceptionTypeList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExceptionTypeListContext extends ParserRuleContext {
public List exceptionType() {
return getRuleContexts(ExceptionTypeContext.class);
}
public ExceptionTypeContext exceptionType(int i) {
return getRuleContext(ExceptionTypeContext.class,i);
}
public ExceptionTypeListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exceptionTypeList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterExceptionTypeList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExceptionTypeList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExceptionTypeList(this);
else return visitor.visitChildren(this);
}
}
public final ExceptionTypeListContext exceptionTypeList() throws RecognitionException {
ExceptionTypeListContext _localctx = new ExceptionTypeListContext(_ctx, getState());
enterRule(_localctx, 176, RULE_exceptionTypeList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1228);
exceptionType();
setState(1233);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1229);
match(COMMA);
setState(1230);
exceptionType();
}
}
setState(1235);
_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;
}
public static class ExceptionTypeContext extends ParserRuleContext {
public ClassTypeContext classType() {
return getRuleContext(ClassTypeContext.class,0);
}
public TypeVariableContext typeVariable() {
return getRuleContext(TypeVariableContext.class,0);
}
public ExceptionTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exceptionType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterExceptionType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExceptionType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExceptionType(this);
else return visitor.visitChildren(this);
}
}
public final ExceptionTypeContext exceptionType() throws RecognitionException {
ExceptionTypeContext _localctx = new ExceptionTypeContext(_ctx, getState());
enterRule(_localctx, 178, RULE_exceptionType);
try {
setState(1238);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,108,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1236);
classType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1237);
typeVariable();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodBodyContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public MethodBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMethodBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMethodBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMethodBody(this);
else return visitor.visitChildren(this);
}
}
public final MethodBodyContext methodBody() throws RecognitionException {
MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState());
enterRule(_localctx, 180, RULE_methodBody);
try {
setState(1242);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LBRACE:
enterOuterAlt(_localctx, 1);
{
setState(1240);
block();
}
break;
case SEMI:
enterOuterAlt(_localctx, 2);
{
setState(1241);
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;
}
public static class InstanceInitializerContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public InstanceInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_instanceInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInstanceInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInstanceInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInstanceInitializer(this);
else return visitor.visitChildren(this);
}
}
public final InstanceInitializerContext instanceInitializer() throws RecognitionException {
InstanceInitializerContext _localctx = new InstanceInitializerContext(_ctx, getState());
enterRule(_localctx, 182, RULE_instanceInitializer);
try {
enterOuterAlt(_localctx, 1);
{
setState(1244);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StaticInitializerContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public StaticInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_staticInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStaticInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStaticInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStaticInitializer(this);
else return visitor.visitChildren(this);
}
}
public final StaticInitializerContext staticInitializer() throws RecognitionException {
StaticInitializerContext _localctx = new StaticInitializerContext(_ctx, getState());
enterRule(_localctx, 184, RULE_staticInitializer);
try {
enterOuterAlt(_localctx, 1);
{
setState(1246);
match(STATIC);
setState(1247);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstructorDeclarationContext extends ParserRuleContext {
public ConstructorDeclaratorContext constructorDeclarator() {
return getRuleContext(ConstructorDeclaratorContext.class,0);
}
public ConstructorBodyContext constructorBody() {
return getRuleContext(ConstructorBodyContext.class,0);
}
public List constructorModifier() {
return getRuleContexts(ConstructorModifierContext.class);
}
public ConstructorModifierContext constructorModifier(int i) {
return getRuleContext(ConstructorModifierContext.class,i);
}
public Throws_Context throws_() {
return getRuleContext(Throws_Context.class,0);
}
public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstructorDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstructorDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstructorDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException {
ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState());
enterRule(_localctx, 186, RULE_constructorDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1252);
_errHandler.sync(this);
_la = _input.LA(1);
while (((((_la - 43)) & ~0x3f) == 0 && ((1L << (_la - 43)) & ((1L << (PRIVATE - 43)) | (1L << (PROTECTED - 43)) | (1L << (PUBLIC - 43)) | (1L << (AT - 43)))) != 0)) {
{
{
setState(1249);
constructorModifier();
}
}
setState(1254);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1255);
constructorDeclarator();
setState(1257);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==THROWS) {
{
setState(1256);
throws_();
}
}
setState(1259);
constructorBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstructorModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public ConstructorModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstructorModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstructorModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstructorModifier(this);
else return visitor.visitChildren(this);
}
}
public final ConstructorModifierContext constructorModifier() throws RecognitionException {
ConstructorModifierContext _localctx = new ConstructorModifierContext(_ctx, getState());
enterRule(_localctx, 188, RULE_constructorModifier);
try {
setState(1265);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1261);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1262);
match(PUBLIC);
}
break;
case PROTECTED:
enterOuterAlt(_localctx, 3);
{
setState(1263);
match(PROTECTED);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 4);
{
setState(1264);
match(PRIVATE);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstructorDeclaratorContext extends ParserRuleContext {
public SimpleTypeNameContext simpleTypeName() {
return getRuleContext(SimpleTypeNameContext.class,0);
}
public TypeParametersContext typeParameters() {
return getRuleContext(TypeParametersContext.class,0);
}
public FormalParameterListContext formalParameterList() {
return getRuleContext(FormalParameterListContext.class,0);
}
public ConstructorDeclaratorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorDeclarator; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstructorDeclarator(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstructorDeclarator(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstructorDeclarator(this);
else return visitor.visitChildren(this);
}
}
public final ConstructorDeclaratorContext constructorDeclarator() throws RecognitionException {
ConstructorDeclaratorContext _localctx = new ConstructorDeclaratorContext(_ctx, getState());
enterRule(_localctx, 190, RULE_constructorDeclarator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1268);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1267);
typeParameters();
}
}
setState(1270);
simpleTypeName();
setState(1271);
match(LPAREN);
setState(1273);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==AT || _la==Identifier) {
{
setState(1272);
formalParameterList();
}
}
setState(1275);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SimpleTypeNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public SimpleTypeNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleTypeName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSimpleTypeName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSimpleTypeName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSimpleTypeName(this);
else return visitor.visitChildren(this);
}
}
public final SimpleTypeNameContext simpleTypeName() throws RecognitionException {
SimpleTypeNameContext _localctx = new SimpleTypeNameContext(_ctx, getState());
enterRule(_localctx, 192, RULE_simpleTypeName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1277);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstructorBodyContext extends ParserRuleContext {
public ExplicitConstructorInvocationContext explicitConstructorInvocation() {
return getRuleContext(ExplicitConstructorInvocationContext.class,0);
}
public BlockStatementsContext blockStatements() {
return getRuleContext(BlockStatementsContext.class,0);
}
public ConstructorBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstructorBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstructorBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstructorBody(this);
else return visitor.visitChildren(this);
}
}
public final ConstructorBodyContext constructorBody() throws RecognitionException {
ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState());
enterRule(_localctx, 194, RULE_constructorBody);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1279);
match(LBRACE);
setState(1281);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) {
case 1:
{
setState(1280);
explicitConstructorInvocation();
}
break;
}
setState(1284);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (LBRACE - 64)) | (1L << (SEMI - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1283);
blockStatements();
}
}
setState(1286);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExplicitConstructorInvocationContext extends ParserRuleContext {
public TypeArgumentsContext typeArguments() {
return getRuleContext(TypeArgumentsContext.class,0);
}
public ArgumentListContext argumentList() {
return getRuleContext(ArgumentListContext.class,0);
}
public ExpressionNameContext expressionName() {
return getRuleContext(ExpressionNameContext.class,0);
}
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public ExplicitConstructorInvocationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_explicitConstructorInvocation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterExplicitConstructorInvocation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExplicitConstructorInvocation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExplicitConstructorInvocation(this);
else return visitor.visitChildren(this);
}
}
public final ExplicitConstructorInvocationContext explicitConstructorInvocation() throws RecognitionException {
ExplicitConstructorInvocationContext _localctx = new ExplicitConstructorInvocationContext(_ctx, getState());
enterRule(_localctx, 196, RULE_explicitConstructorInvocation);
int _la;
try {
setState(1334);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,125,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1289);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1288);
typeArguments();
}
}
setState(1291);
match(THIS);
setState(1292);
match(LPAREN);
setState(1294);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1293);
argumentList();
}
}
setState(1296);
match(RPAREN);
setState(1297);
match(SEMI);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1299);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1298);
typeArguments();
}
}
setState(1301);
match(SUPER);
setState(1302);
match(LPAREN);
setState(1304);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1303);
argumentList();
}
}
setState(1306);
match(RPAREN);
setState(1307);
match(SEMI);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1308);
expressionName();
setState(1309);
match(DOT);
setState(1311);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1310);
typeArguments();
}
}
setState(1313);
match(SUPER);
setState(1314);
match(LPAREN);
setState(1316);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1315);
argumentList();
}
}
setState(1318);
match(RPAREN);
setState(1319);
match(SEMI);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1321);
primary();
setState(1322);
match(DOT);
setState(1324);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1323);
typeArguments();
}
}
setState(1326);
match(SUPER);
setState(1327);
match(LPAREN);
setState(1329);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1328);
argumentList();
}
}
setState(1331);
match(RPAREN);
setState(1332);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumDeclarationContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public EnumBodyContext enumBody() {
return getRuleContext(EnumBodyContext.class,0);
}
public List classModifier() {
return getRuleContexts(ClassModifierContext.class);
}
public ClassModifierContext classModifier(int i) {
return getRuleContext(ClassModifierContext.class,i);
}
public SuperinterfacesContext superinterfaces() {
return getRuleContext(SuperinterfacesContext.class,0);
}
public EnumDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final EnumDeclarationContext enumDeclaration() throws RecognitionException {
EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState());
enterRule(_localctx, 198, RULE_enumDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1339);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) {
{
{
setState(1336);
classModifier();
}
}
setState(1341);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1342);
match(ENUM);
setState(1343);
match(Identifier);
setState(1345);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==IMPLEMENTS) {
{
setState(1344);
superinterfaces();
}
}
setState(1347);
enumBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumBodyContext extends ParserRuleContext {
public EnumConstantListContext enumConstantList() {
return getRuleContext(EnumConstantListContext.class,0);
}
public EnumBodyDeclarationsContext enumBodyDeclarations() {
return getRuleContext(EnumBodyDeclarationsContext.class,0);
}
public EnumBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumBody(this);
else return visitor.visitChildren(this);
}
}
public final EnumBodyContext enumBody() throws RecognitionException {
EnumBodyContext _localctx = new EnumBodyContext(_ctx, getState());
enterRule(_localctx, 200, RULE_enumBody);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1349);
match(LBRACE);
setState(1351);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT || _la==Identifier) {
{
setState(1350);
enumConstantList();
}
}
setState(1354);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1353);
match(COMMA);
}
}
setState(1357);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SEMI) {
{
setState(1356);
enumBodyDeclarations();
}
}
setState(1359);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumConstantListContext extends ParserRuleContext {
public List enumConstant() {
return getRuleContexts(EnumConstantContext.class);
}
public EnumConstantContext enumConstant(int i) {
return getRuleContext(EnumConstantContext.class,i);
}
public EnumConstantListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumConstantList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumConstantList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumConstantList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumConstantList(this);
else return visitor.visitChildren(this);
}
}
public final EnumConstantListContext enumConstantList() throws RecognitionException {
EnumConstantListContext _localctx = new EnumConstantListContext(_ctx, getState());
enterRule(_localctx, 202, RULE_enumConstantList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1361);
enumConstant();
setState(1366);
_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(1362);
match(COMMA);
setState(1363);
enumConstant();
}
}
}
setState(1368);
_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;
}
public static class EnumConstantContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List enumConstantModifier() {
return getRuleContexts(EnumConstantModifierContext.class);
}
public EnumConstantModifierContext enumConstantModifier(int i) {
return getRuleContext(EnumConstantModifierContext.class,i);
}
public ClassBodyContext classBody() {
return getRuleContext(ClassBodyContext.class,0);
}
public ArgumentListContext argumentList() {
return getRuleContext(ArgumentListContext.class,0);
}
public EnumConstantContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumConstant; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumConstant(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumConstant(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumConstant(this);
else return visitor.visitChildren(this);
}
}
public final EnumConstantContext enumConstant() throws RecognitionException {
EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState());
enterRule(_localctx, 204, RULE_enumConstant);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1372);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT) {
{
{
setState(1369);
enumConstantModifier();
}
}
setState(1374);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1375);
match(Identifier);
setState(1381);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(1376);
match(LPAREN);
setState(1378);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1377);
argumentList();
}
}
setState(1380);
match(RPAREN);
}
}
setState(1384);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LBRACE) {
{
setState(1383);
classBody();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumConstantModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public EnumConstantModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumConstantModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumConstantModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumConstantModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumConstantModifier(this);
else return visitor.visitChildren(this);
}
}
public final EnumConstantModifierContext enumConstantModifier() throws RecognitionException {
EnumConstantModifierContext _localctx = new EnumConstantModifierContext(_ctx, getState());
enterRule(_localctx, 206, RULE_enumConstantModifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1386);
annotation();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumBodyDeclarationsContext extends ParserRuleContext {
public List classBodyDeclaration() {
return getRuleContexts(ClassBodyDeclarationContext.class);
}
public ClassBodyDeclarationContext classBodyDeclaration(int i) {
return getRuleContext(ClassBodyDeclarationContext.class,i);
}
public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumBodyDeclarations; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumBodyDeclarations(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumBodyDeclarations(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumBodyDeclarations(this);
else return visitor.visitChildren(this);
}
}
public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException {
EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState());
enterRule(_localctx, 208, RULE_enumBodyDeclarations);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1388);
match(SEMI);
setState(1392);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE))) != 0) || ((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (LBRACE - 70)) | (1L << (SEMI - 70)) | (1L << (AT - 70)) | (1L << (LT - 70)) | (1L << (Identifier - 70)))) != 0)) {
{
{
setState(1389);
classBodyDeclaration();
}
}
setState(1394);
_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;
}
public static class InterfaceDeclarationContext extends ParserRuleContext {
public NormalInterfaceDeclarationContext normalInterfaceDeclaration() {
return getRuleContext(NormalInterfaceDeclarationContext.class,0);
}
public AnnotationTypeDeclarationContext annotationTypeDeclaration() {
return getRuleContext(AnnotationTypeDeclarationContext.class,0);
}
public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException {
InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState());
enterRule(_localctx, 210, RULE_interfaceDeclaration);
try {
setState(1397);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,137,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1395);
normalInterfaceDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1396);
annotationTypeDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NormalInterfaceDeclarationContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public InterfaceBodyContext interfaceBody() {
return getRuleContext(InterfaceBodyContext.class,0);
}
public List interfaceModifier() {
return getRuleContexts(InterfaceModifierContext.class);
}
public InterfaceModifierContext interfaceModifier(int i) {
return getRuleContext(InterfaceModifierContext.class,i);
}
public TypeParametersContext typeParameters() {
return getRuleContext(TypeParametersContext.class,0);
}
public ExtendsInterfacesContext extendsInterfaces() {
return getRuleContext(ExtendsInterfacesContext.class,0);
}
public NormalInterfaceDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_normalInterfaceDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterNormalInterfaceDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitNormalInterfaceDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitNormalInterfaceDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final NormalInterfaceDeclarationContext normalInterfaceDeclaration() throws RecognitionException {
NormalInterfaceDeclarationContext _localctx = new NormalInterfaceDeclarationContext(_ctx, getState());
enterRule(_localctx, 212, RULE_normalInterfaceDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1402);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) {
{
{
setState(1399);
interfaceModifier();
}
}
setState(1404);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1405);
match(INTERFACE);
setState(1406);
match(Identifier);
setState(1408);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1407);
typeParameters();
}
}
setState(1411);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EXTENDS) {
{
setState(1410);
extendsInterfaces();
}
}
setState(1413);
interfaceBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public InterfaceModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceModifier(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceModifierContext interfaceModifier() throws RecognitionException {
InterfaceModifierContext _localctx = new InterfaceModifierContext(_ctx, getState());
enterRule(_localctx, 214, RULE_interfaceModifier);
try {
setState(1422);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1415);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1416);
match(PUBLIC);
}
break;
case PROTECTED:
enterOuterAlt(_localctx, 3);
{
setState(1417);
match(PROTECTED);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 4);
{
setState(1418);
match(PRIVATE);
}
break;
case ABSTRACT:
enterOuterAlt(_localctx, 5);
{
setState(1419);
match(ABSTRACT);
}
break;
case STATIC:
enterOuterAlt(_localctx, 6);
{
setState(1420);
match(STATIC);
}
break;
case STRICTFP:
enterOuterAlt(_localctx, 7);
{
setState(1421);
match(STRICTFP);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExtendsInterfacesContext extends ParserRuleContext {
public InterfaceTypeListContext interfaceTypeList() {
return getRuleContext(InterfaceTypeListContext.class,0);
}
public ExtendsInterfacesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_extendsInterfaces; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterExtendsInterfaces(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExtendsInterfaces(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExtendsInterfaces(this);
else return visitor.visitChildren(this);
}
}
public final ExtendsInterfacesContext extendsInterfaces() throws RecognitionException {
ExtendsInterfacesContext _localctx = new ExtendsInterfacesContext(_ctx, getState());
enterRule(_localctx, 216, RULE_extendsInterfaces);
try {
enterOuterAlt(_localctx, 1);
{
setState(1424);
match(EXTENDS);
setState(1425);
interfaceTypeList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceBodyContext extends ParserRuleContext {
public List interfaceMemberDeclaration() {
return getRuleContexts(InterfaceMemberDeclarationContext.class);
}
public InterfaceMemberDeclarationContext interfaceMemberDeclaration(int i) {
return getRuleContext(InterfaceMemberDeclarationContext.class,i);
}
public InterfaceBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceBody(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceBodyContext interfaceBody() throws RecognitionException {
InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState());
enterRule(_localctx, 218, RULE_interfaceBody);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1427);
match(LBRACE);
setState(1431);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DEFAULT) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << VOID))) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & ((1L << (SEMI - 74)) | (1L << (AT - 74)) | (1L << (LT - 74)) | (1L << (Identifier - 74)))) != 0)) {
{
{
setState(1428);
interfaceMemberDeclaration();
}
}
setState(1433);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1434);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceMemberDeclarationContext extends ParserRuleContext {
public ConstantDeclarationContext constantDeclaration() {
return getRuleContext(ConstantDeclarationContext.class,0);
}
public InterfaceMethodDeclarationContext interfaceMethodDeclaration() {
return getRuleContext(InterfaceMethodDeclarationContext.class,0);
}
public ClassDeclarationContext classDeclaration() {
return getRuleContext(ClassDeclarationContext.class,0);
}
public InterfaceDeclarationContext interfaceDeclaration() {
return getRuleContext(InterfaceDeclarationContext.class,0);
}
public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceMemberDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceMemberDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceMemberDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException {
InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState());
enterRule(_localctx, 220, RULE_interfaceMemberDeclaration);
try {
setState(1441);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1436);
constantDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1437);
interfaceMethodDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1438);
classDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1439);
interfaceDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1440);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstantDeclarationContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorListContext variableDeclaratorList() {
return getRuleContext(VariableDeclaratorListContext.class,0);
}
public List constantModifier() {
return getRuleContexts(ConstantModifierContext.class);
}
public ConstantModifierContext constantModifier(int i) {
return getRuleContext(ConstantModifierContext.class,i);
}
public ConstantDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constantDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstantDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstantDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstantDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final ConstantDeclarationContext constantDeclaration() throws RecognitionException {
ConstantDeclarationContext _localctx = new ConstantDeclarationContext(_ctx, getState());
enterRule(_localctx, 222, RULE_constantDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1446);
_errHandler.sync(this);
_la = _input.LA(1);
while (((((_la - 28)) & ~0x3f) == 0 && ((1L << (_la - 28)) & ((1L << (FINAL - 28)) | (1L << (PUBLIC - 28)) | (1L << (STATIC - 28)) | (1L << (AT - 28)))) != 0)) {
{
{
setState(1443);
constantModifier();
}
}
setState(1448);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1449);
unannType();
setState(1450);
variableDeclaratorList();
setState(1451);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ConstantModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public ConstantModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constantModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterConstantModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitConstantModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitConstantModifier(this);
else return visitor.visitChildren(this);
}
}
public final ConstantModifierContext constantModifier() throws RecognitionException {
ConstantModifierContext _localctx = new ConstantModifierContext(_ctx, getState());
enterRule(_localctx, 224, RULE_constantModifier);
try {
setState(1457);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1453);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1454);
match(PUBLIC);
}
break;
case STATIC:
enterOuterAlt(_localctx, 3);
{
setState(1455);
match(STATIC);
}
break;
case FINAL:
enterOuterAlt(_localctx, 4);
{
setState(1456);
match(FINAL);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceMethodDeclarationContext extends ParserRuleContext {
public MethodHeaderContext methodHeader() {
return getRuleContext(MethodHeaderContext.class,0);
}
public MethodBodyContext methodBody() {
return getRuleContext(MethodBodyContext.class,0);
}
public List interfaceMethodModifier() {
return getRuleContexts(InterfaceMethodModifierContext.class);
}
public InterfaceMethodModifierContext interfaceMethodModifier(int i) {
return getRuleContext(InterfaceMethodModifierContext.class,i);
}
public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceMethodDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceMethodDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceMethodDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException {
InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState());
enterRule(_localctx, 226, RULE_interfaceMethodDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1462);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << DEFAULT) | (1L << PRIVATE) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) {
{
{
setState(1459);
interfaceMethodModifier();
}
}
setState(1464);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1465);
methodHeader();
setState(1466);
methodBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class InterfaceMethodModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public InterfaceMethodModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_interfaceMethodModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterInterfaceMethodModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitInterfaceMethodModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitInterfaceMethodModifier(this);
else return visitor.visitChildren(this);
}
}
public final InterfaceMethodModifierContext interfaceMethodModifier() throws RecognitionException {
InterfaceMethodModifierContext _localctx = new InterfaceMethodModifierContext(_ctx, getState());
enterRule(_localctx, 228, RULE_interfaceMethodModifier);
try {
setState(1475);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1468);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1469);
match(PUBLIC);
}
break;
case PRIVATE:
enterOuterAlt(_localctx, 3);
{
setState(1470);
match(PRIVATE);
}
break;
case ABSTRACT:
enterOuterAlt(_localctx, 4);
{
setState(1471);
match(ABSTRACT);
}
break;
case DEFAULT:
enterOuterAlt(_localctx, 5);
{
setState(1472);
match(DEFAULT);
}
break;
case STATIC:
enterOuterAlt(_localctx, 6);
{
setState(1473);
match(STATIC);
}
break;
case STRICTFP:
enterOuterAlt(_localctx, 7);
{
setState(1474);
match(STRICTFP);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationTypeDeclarationContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public AnnotationTypeBodyContext annotationTypeBody() {
return getRuleContext(AnnotationTypeBodyContext.class,0);
}
public List interfaceModifier() {
return getRuleContexts(InterfaceModifierContext.class);
}
public InterfaceModifierContext interfaceModifier(int i) {
return getRuleContext(InterfaceModifierContext.class,i);
}
public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotationTypeDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotationTypeDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotationTypeDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException {
AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState());
enterRule(_localctx, 230, RULE_annotationTypeDeclaration);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1480);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,148,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1477);
interfaceModifier();
}
}
}
setState(1482);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,148,_ctx);
}
setState(1483);
match(AT);
setState(1484);
match(INTERFACE);
setState(1485);
match(Identifier);
setState(1486);
annotationTypeBody();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationTypeBodyContext extends ParserRuleContext {
public List annotationTypeMemberDeclaration() {
return getRuleContexts(AnnotationTypeMemberDeclarationContext.class);
}
public AnnotationTypeMemberDeclarationContext annotationTypeMemberDeclaration(int i) {
return getRuleContext(AnnotationTypeMemberDeclarationContext.class,i);
}
public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotationTypeBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotationTypeBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotationTypeBody(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotationTypeBody(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException {
AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState());
enterRule(_localctx, 232, RULE_annotationTypeBody);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1488);
match(LBRACE);
setState(1492);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP))) != 0) || ((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & ((1L << (SEMI - 74)) | (1L << (AT - 74)) | (1L << (Identifier - 74)))) != 0)) {
{
{
setState(1489);
annotationTypeMemberDeclaration();
}
}
setState(1494);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1495);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationTypeMemberDeclarationContext extends ParserRuleContext {
public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() {
return getRuleContext(AnnotationTypeElementDeclarationContext.class,0);
}
public ConstantDeclarationContext constantDeclaration() {
return getRuleContext(ConstantDeclarationContext.class,0);
}
public ClassDeclarationContext classDeclaration() {
return getRuleContext(ClassDeclarationContext.class,0);
}
public InterfaceDeclarationContext interfaceDeclaration() {
return getRuleContext(InterfaceDeclarationContext.class,0);
}
public AnnotationTypeMemberDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotationTypeMemberDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotationTypeMemberDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotationTypeMemberDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotationTypeMemberDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationTypeMemberDeclarationContext annotationTypeMemberDeclaration() throws RecognitionException {
AnnotationTypeMemberDeclarationContext _localctx = new AnnotationTypeMemberDeclarationContext(_ctx, getState());
enterRule(_localctx, 234, RULE_annotationTypeMemberDeclaration);
try {
setState(1502);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,150,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1497);
annotationTypeElementDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1498);
constantDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1499);
classDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1500);
interfaceDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1501);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public List annotationTypeElementModifier() {
return getRuleContexts(AnnotationTypeElementModifierContext.class);
}
public AnnotationTypeElementModifierContext annotationTypeElementModifier(int i) {
return getRuleContext(AnnotationTypeElementModifierContext.class,i);
}
public DimsContext dims() {
return getRuleContext(DimsContext.class,0);
}
public DefaultValueContext defaultValue() {
return getRuleContext(DefaultValueContext.class,0);
}
public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotationTypeElementDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotationTypeElementDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotationTypeElementDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException {
AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState());
enterRule(_localctx, 236, RULE_annotationTypeElementDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1507);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==ABSTRACT || _la==PUBLIC || _la==AT) {
{
{
setState(1504);
annotationTypeElementModifier();
}
}
setState(1509);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1510);
unannType();
setState(1511);
match(Identifier);
setState(1512);
match(LPAREN);
setState(1513);
match(RPAREN);
setState(1515);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LBRACK || _la==AT) {
{
setState(1514);
dims();
}
}
setState(1518);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==DEFAULT) {
{
setState(1517);
defaultValue();
}
}
setState(1520);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationTypeElementModifierContext extends ParserRuleContext {
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public AnnotationTypeElementModifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotationTypeElementModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotationTypeElementModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotationTypeElementModifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotationTypeElementModifier(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationTypeElementModifierContext annotationTypeElementModifier() throws RecognitionException {
AnnotationTypeElementModifierContext _localctx = new AnnotationTypeElementModifierContext(_ctx, getState());
enterRule(_localctx, 238, RULE_annotationTypeElementModifier);
try {
setState(1525);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT:
enterOuterAlt(_localctx, 1);
{
setState(1522);
annotation();
}
break;
case PUBLIC:
enterOuterAlt(_localctx, 2);
{
setState(1523);
match(PUBLIC);
}
break;
case ABSTRACT:
enterOuterAlt(_localctx, 3);
{
setState(1524);
match(ABSTRACT);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DefaultValueContext extends ParserRuleContext {
public ElementValueContext elementValue() {
return getRuleContext(ElementValueContext.class,0);
}
public DefaultValueContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_defaultValue; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterDefaultValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitDefaultValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitDefaultValue(this);
else return visitor.visitChildren(this);
}
}
public final DefaultValueContext defaultValue() throws RecognitionException {
DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState());
enterRule(_localctx, 240, RULE_defaultValue);
try {
enterOuterAlt(_localctx, 1);
{
setState(1527);
match(DEFAULT);
setState(1528);
elementValue();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AnnotationContext extends ParserRuleContext {
public NormalAnnotationContext normalAnnotation() {
return getRuleContext(NormalAnnotationContext.class,0);
}
public MarkerAnnotationContext markerAnnotation() {
return getRuleContext(MarkerAnnotationContext.class,0);
}
public SingleElementAnnotationContext singleElementAnnotation() {
return getRuleContext(SingleElementAnnotationContext.class,0);
}
public AnnotationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAnnotation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAnnotation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAnnotation(this);
else return visitor.visitChildren(this);
}
}
public final AnnotationContext annotation() throws RecognitionException {
AnnotationContext _localctx = new AnnotationContext(_ctx, getState());
enterRule(_localctx, 242, RULE_annotation);
try {
setState(1533);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,155,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1530);
normalAnnotation();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1531);
markerAnnotation();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1532);
singleElementAnnotation();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NormalAnnotationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public ElementValuePairListContext elementValuePairList() {
return getRuleContext(ElementValuePairListContext.class,0);
}
public NormalAnnotationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_normalAnnotation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterNormalAnnotation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitNormalAnnotation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitNormalAnnotation(this);
else return visitor.visitChildren(this);
}
}
public final NormalAnnotationContext normalAnnotation() throws RecognitionException {
NormalAnnotationContext _localctx = new NormalAnnotationContext(_ctx, getState());
enterRule(_localctx, 244, RULE_normalAnnotation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1535);
match(AT);
setState(1536);
typeName();
setState(1537);
match(LPAREN);
setState(1539);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1538);
elementValuePairList();
}
}
setState(1541);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElementValuePairListContext extends ParserRuleContext {
public List elementValuePair() {
return getRuleContexts(ElementValuePairContext.class);
}
public ElementValuePairContext elementValuePair(int i) {
return getRuleContext(ElementValuePairContext.class,i);
}
public ElementValuePairListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elementValuePairList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterElementValuePairList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitElementValuePairList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitElementValuePairList(this);
else return visitor.visitChildren(this);
}
}
public final ElementValuePairListContext elementValuePairList() throws RecognitionException {
ElementValuePairListContext _localctx = new ElementValuePairListContext(_ctx, getState());
enterRule(_localctx, 246, RULE_elementValuePairList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1543);
elementValuePair();
setState(1548);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1544);
match(COMMA);
setState(1545);
elementValuePair();
}
}
setState(1550);
_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;
}
public static class ElementValuePairContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public ElementValueContext elementValue() {
return getRuleContext(ElementValueContext.class,0);
}
public ElementValuePairContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elementValuePair; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterElementValuePair(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitElementValuePair(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitElementValuePair(this);
else return visitor.visitChildren(this);
}
}
public final ElementValuePairContext elementValuePair() throws RecognitionException {
ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState());
enterRule(_localctx, 248, RULE_elementValuePair);
try {
enterOuterAlt(_localctx, 1);
{
setState(1551);
match(Identifier);
setState(1552);
match(ASSIGN);
setState(1553);
elementValue();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElementValueContext extends ParserRuleContext {
public ConditionalExpressionContext conditionalExpression() {
return getRuleContext(ConditionalExpressionContext.class,0);
}
public ElementValueArrayInitializerContext elementValueArrayInitializer() {
return getRuleContext(ElementValueArrayInitializerContext.class,0);
}
public AnnotationContext annotation() {
return getRuleContext(AnnotationContext.class,0);
}
public ElementValueContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elementValue; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterElementValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitElementValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitElementValue(this);
else return visitor.visitChildren(this);
}
}
public final ElementValueContext elementValue() throws RecognitionException {
ElementValueContext _localctx = new ElementValueContext(_ctx, getState());
enterRule(_localctx, 250, RULE_elementValue);
try {
setState(1558);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,158,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1555);
conditionalExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1556);
elementValueArrayInitializer();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1557);
annotation();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElementValueArrayInitializerContext extends ParserRuleContext {
public ElementValueListContext elementValueList() {
return getRuleContext(ElementValueListContext.class,0);
}
public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterElementValueArrayInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitElementValueArrayInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitElementValueArrayInitializer(this);
else return visitor.visitChildren(this);
}
}
public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException {
ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState());
enterRule(_localctx, 252, RULE_elementValueArrayInitializer);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1560);
match(LBRACE);
setState(1562);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (LBRACE - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1561);
elementValueList();
}
}
setState(1565);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1564);
match(COMMA);
}
}
setState(1567);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElementValueListContext extends ParserRuleContext {
public List elementValue() {
return getRuleContexts(ElementValueContext.class);
}
public ElementValueContext elementValue(int i) {
return getRuleContext(ElementValueContext.class,i);
}
public ElementValueListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elementValueList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterElementValueList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitElementValueList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitElementValueList(this);
else return visitor.visitChildren(this);
}
}
public final ElementValueListContext elementValueList() throws RecognitionException {
ElementValueListContext _localctx = new ElementValueListContext(_ctx, getState());
enterRule(_localctx, 254, RULE_elementValueList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1569);
elementValue();
setState(1574);
_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(1570);
match(COMMA);
setState(1571);
elementValue();
}
}
}
setState(1576);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,161,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MarkerAnnotationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public MarkerAnnotationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_markerAnnotation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterMarkerAnnotation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitMarkerAnnotation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitMarkerAnnotation(this);
else return visitor.visitChildren(this);
}
}
public final MarkerAnnotationContext markerAnnotation() throws RecognitionException {
MarkerAnnotationContext _localctx = new MarkerAnnotationContext(_ctx, getState());
enterRule(_localctx, 256, RULE_markerAnnotation);
try {
enterOuterAlt(_localctx, 1);
{
setState(1577);
match(AT);
setState(1578);
typeName();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SingleElementAnnotationContext extends ParserRuleContext {
public TypeNameContext typeName() {
return getRuleContext(TypeNameContext.class,0);
}
public ElementValueContext elementValue() {
return getRuleContext(ElementValueContext.class,0);
}
public SingleElementAnnotationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleElementAnnotation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSingleElementAnnotation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSingleElementAnnotation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSingleElementAnnotation(this);
else return visitor.visitChildren(this);
}
}
public final SingleElementAnnotationContext singleElementAnnotation() throws RecognitionException {
SingleElementAnnotationContext _localctx = new SingleElementAnnotationContext(_ctx, getState());
enterRule(_localctx, 258, RULE_singleElementAnnotation);
try {
enterOuterAlt(_localctx, 1);
{
setState(1580);
match(AT);
setState(1581);
typeName();
setState(1582);
match(LPAREN);
setState(1583);
elementValue();
setState(1584);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayInitializerContext extends ParserRuleContext {
public VariableInitializerListContext variableInitializerList() {
return getRuleContext(VariableInitializerListContext.class,0);
}
public ArrayInitializerContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterArrayInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitArrayInitializer(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitArrayInitializer(this);
else return visitor.visitChildren(this);
}
}
public final ArrayInitializerContext arrayInitializer() throws RecognitionException {
ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState());
enterRule(_localctx, 260, RULE_arrayInitializer);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1586);
match(LBRACE);
setState(1588);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (LBRACE - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1587);
variableInitializerList();
}
}
setState(1591);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1590);
match(COMMA);
}
}
setState(1593);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class VariableInitializerListContext extends ParserRuleContext {
public List variableInitializer() {
return getRuleContexts(VariableInitializerContext.class);
}
public VariableInitializerContext variableInitializer(int i) {
return getRuleContext(VariableInitializerContext.class,i);
}
public VariableInitializerListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableInitializerList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterVariableInitializerList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitVariableInitializerList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitVariableInitializerList(this);
else return visitor.visitChildren(this);
}
}
public final VariableInitializerListContext variableInitializerList() throws RecognitionException {
VariableInitializerListContext _localctx = new VariableInitializerListContext(_ctx, getState());
enterRule(_localctx, 262, RULE_variableInitializerList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1595);
variableInitializer();
setState(1600);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,164,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1596);
match(COMMA);
setState(1597);
variableInitializer();
}
}
}
setState(1602);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,164,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockContext extends ParserRuleContext {
public BlockStatementsContext blockStatements() {
return getRuleContext(BlockStatementsContext.class,0);
}
public BlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBlock(this);
else return visitor.visitChildren(this);
}
}
public final BlockContext block() throws RecognitionException {
BlockContext _localctx = new BlockContext(_ctx, getState());
enterRule(_localctx, 264, RULE_block);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1603);
match(LBRACE);
setState(1605);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (LBRACE - 64)) | (1L << (SEMI - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1604);
blockStatements();
}
}
setState(1607);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockStatementsContext extends ParserRuleContext {
public List blockStatement() {
return getRuleContexts(BlockStatementContext.class);
}
public BlockStatementContext blockStatement(int i) {
return getRuleContext(BlockStatementContext.class,i);
}
public BlockStatementsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockStatements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBlockStatements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBlockStatements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBlockStatements(this);
else return visitor.visitChildren(this);
}
}
public final BlockStatementsContext blockStatements() throws RecognitionException {
BlockStatementsContext _localctx = new BlockStatementsContext(_ctx, getState());
enterRule(_localctx, 266, RULE_blockStatements);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1610);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1609);
blockStatement();
}
}
setState(1612);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (LBRACE - 64)) | (1L << (SEMI - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0) );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockStatementContext extends ParserRuleContext {
public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() {
return getRuleContext(LocalVariableDeclarationStatementContext.class,0);
}
public ClassDeclarationContext classDeclaration() {
return getRuleContext(ClassDeclarationContext.class,0);
}
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public BlockStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBlockStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBlockStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBlockStatement(this);
else return visitor.visitChildren(this);
}
}
public final BlockStatementContext blockStatement() throws RecognitionException {
BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState());
enterRule(_localctx, 268, RULE_blockStatement);
try {
setState(1617);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,167,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1614);
localVariableDeclarationStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1615);
classDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1616);
statement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LocalVariableDeclarationStatementContext extends ParserRuleContext {
public LocalVariableDeclarationContext localVariableDeclaration() {
return getRuleContext(LocalVariableDeclarationContext.class,0);
}
public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterLocalVariableDeclarationStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLocalVariableDeclarationStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLocalVariableDeclarationStatement(this);
else return visitor.visitChildren(this);
}
}
public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException {
LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState());
enterRule(_localctx, 270, RULE_localVariableDeclarationStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1619);
localVariableDeclaration();
setState(1620);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LocalVariableDeclarationContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorListContext variableDeclaratorList() {
return getRuleContext(VariableDeclaratorListContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_localVariableDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterLocalVariableDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLocalVariableDeclaration(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLocalVariableDeclaration(this);
else return visitor.visitChildren(this);
}
}
public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException {
LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState());
enterRule(_localctx, 272, RULE_localVariableDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1625);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1622);
variableModifier();
}
}
setState(1627);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1628);
unannType();
setState(1629);
variableDeclaratorList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementContext extends ParserRuleContext {
public StatementWithoutTrailingSubstatementContext statementWithoutTrailingSubstatement() {
return getRuleContext(StatementWithoutTrailingSubstatementContext.class,0);
}
public LabeledStatementContext labeledStatement() {
return getRuleContext(LabeledStatementContext.class,0);
}
public IfThenStatementContext ifThenStatement() {
return getRuleContext(IfThenStatementContext.class,0);
}
public IfThenElseStatementContext ifThenElseStatement() {
return getRuleContext(IfThenElseStatementContext.class,0);
}
public WhileStatementContext whileStatement() {
return getRuleContext(WhileStatementContext.class,0);
}
public ForStatementContext forStatement() {
return getRuleContext(ForStatementContext.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 Java9Listener ) ((Java9Listener)listener).enterStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementContext statement() throws RecognitionException {
StatementContext _localctx = new StatementContext(_ctx, getState());
enterRule(_localctx, 274, RULE_statement);
try {
setState(1637);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,169,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1631);
statementWithoutTrailingSubstatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1632);
labeledStatement();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1633);
ifThenStatement();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1634);
ifThenElseStatement();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1635);
whileStatement();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1636);
forStatement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementNoShortIfContext extends ParserRuleContext {
public StatementWithoutTrailingSubstatementContext statementWithoutTrailingSubstatement() {
return getRuleContext(StatementWithoutTrailingSubstatementContext.class,0);
}
public LabeledStatementNoShortIfContext labeledStatementNoShortIf() {
return getRuleContext(LabeledStatementNoShortIfContext.class,0);
}
public IfThenElseStatementNoShortIfContext ifThenElseStatementNoShortIf() {
return getRuleContext(IfThenElseStatementNoShortIfContext.class,0);
}
public WhileStatementNoShortIfContext whileStatementNoShortIf() {
return getRuleContext(WhileStatementNoShortIfContext.class,0);
}
public ForStatementNoShortIfContext forStatementNoShortIf() {
return getRuleContext(ForStatementNoShortIfContext.class,0);
}
public StatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final StatementNoShortIfContext statementNoShortIf() throws RecognitionException {
StatementNoShortIfContext _localctx = new StatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 276, RULE_statementNoShortIf);
try {
setState(1644);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,170,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1639);
statementWithoutTrailingSubstatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1640);
labeledStatementNoShortIf();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1641);
ifThenElseStatementNoShortIf();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1642);
whileStatementNoShortIf();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1643);
forStatementNoShortIf();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementWithoutTrailingSubstatementContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public EmptyStatementContext emptyStatement() {
return getRuleContext(EmptyStatementContext.class,0);
}
public ExpressionStatementContext expressionStatement() {
return getRuleContext(ExpressionStatementContext.class,0);
}
public AssertStatementContext assertStatement() {
return getRuleContext(AssertStatementContext.class,0);
}
public SwitchStatementContext switchStatement() {
return getRuleContext(SwitchStatementContext.class,0);
}
public DoStatementContext doStatement() {
return getRuleContext(DoStatementContext.class,0);
}
public BreakStatementContext breakStatement() {
return getRuleContext(BreakStatementContext.class,0);
}
public ContinueStatementContext continueStatement() {
return getRuleContext(ContinueStatementContext.class,0);
}
public ReturnStatementContext returnStatement() {
return getRuleContext(ReturnStatementContext.class,0);
}
public SynchronizedStatementContext synchronizedStatement() {
return getRuleContext(SynchronizedStatementContext.class,0);
}
public ThrowStatementContext throwStatement() {
return getRuleContext(ThrowStatementContext.class,0);
}
public TryStatementContext tryStatement() {
return getRuleContext(TryStatementContext.class,0);
}
public StatementWithoutTrailingSubstatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statementWithoutTrailingSubstatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStatementWithoutTrailingSubstatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStatementWithoutTrailingSubstatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStatementWithoutTrailingSubstatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementWithoutTrailingSubstatementContext statementWithoutTrailingSubstatement() throws RecognitionException {
StatementWithoutTrailingSubstatementContext _localctx = new StatementWithoutTrailingSubstatementContext(_ctx, getState());
enterRule(_localctx, 278, RULE_statementWithoutTrailingSubstatement);
try {
setState(1658);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LBRACE:
enterOuterAlt(_localctx, 1);
{
setState(1646);
block();
}
break;
case SEMI:
enterOuterAlt(_localctx, 2);
{
setState(1647);
emptyStatement();
}
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case NEW:
case SHORT:
case SUPER:
case THIS:
case VOID:
case IntegerLiteral:
case FloatingPointLiteral:
case BooleanLiteral:
case CharacterLiteral:
case StringLiteral:
case NullLiteral:
case LPAREN:
case AT:
case INC:
case DEC:
case Identifier:
enterOuterAlt(_localctx, 3);
{
setState(1648);
expressionStatement();
}
break;
case ASSERT:
enterOuterAlt(_localctx, 4);
{
setState(1649);
assertStatement();
}
break;
case SWITCH:
enterOuterAlt(_localctx, 5);
{
setState(1650);
switchStatement();
}
break;
case DO:
enterOuterAlt(_localctx, 6);
{
setState(1651);
doStatement();
}
break;
case BREAK:
enterOuterAlt(_localctx, 7);
{
setState(1652);
breakStatement();
}
break;
case CONTINUE:
enterOuterAlt(_localctx, 8);
{
setState(1653);
continueStatement();
}
break;
case RETURN:
enterOuterAlt(_localctx, 9);
{
setState(1654);
returnStatement();
}
break;
case SYNCHRONIZED:
enterOuterAlt(_localctx, 10);
{
setState(1655);
synchronizedStatement();
}
break;
case THROW:
enterOuterAlt(_localctx, 11);
{
setState(1656);
throwStatement();
}
break;
case TRY:
enterOuterAlt(_localctx, 12);
{
setState(1657);
tryStatement();
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EmptyStatementContext extends ParserRuleContext {
public EmptyStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_emptyStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEmptyStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEmptyStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEmptyStatement(this);
else return visitor.visitChildren(this);
}
}
public final EmptyStatementContext emptyStatement() throws RecognitionException {
EmptyStatementContext _localctx = new EmptyStatementContext(_ctx, getState());
enterRule(_localctx, 280, RULE_emptyStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1660);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LabeledStatementContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public StatementContext statement() {
return getRuleContext(StatementContext.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 Java9Listener ) ((Java9Listener)listener).enterLabeledStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLabeledStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLabeledStatement(this);
else return visitor.visitChildren(this);
}
}
public final LabeledStatementContext labeledStatement() throws RecognitionException {
LabeledStatementContext _localctx = new LabeledStatementContext(_ctx, getState());
enterRule(_localctx, 282, RULE_labeledStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1662);
match(Identifier);
setState(1663);
match(COLON);
setState(1664);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LabeledStatementNoShortIfContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public StatementNoShortIfContext statementNoShortIf() {
return getRuleContext(StatementNoShortIfContext.class,0);
}
public LabeledStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_labeledStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterLabeledStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitLabeledStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitLabeledStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final LabeledStatementNoShortIfContext labeledStatementNoShortIf() throws RecognitionException {
LabeledStatementNoShortIfContext _localctx = new LabeledStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 284, RULE_labeledStatementNoShortIf);
try {
enterOuterAlt(_localctx, 1);
{
setState(1666);
match(Identifier);
setState(1667);
match(COLON);
setState(1668);
statementNoShortIf();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExpressionStatementContext extends ParserRuleContext {
public StatementExpressionContext statementExpression() {
return getRuleContext(StatementExpressionContext.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 Java9Listener ) ((Java9Listener)listener).enterExpressionStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitExpressionStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitExpressionStatement(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionStatementContext expressionStatement() throws RecognitionException {
ExpressionStatementContext _localctx = new ExpressionStatementContext(_ctx, getState());
enterRule(_localctx, 286, RULE_expressionStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1670);
statementExpression();
setState(1671);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementExpressionContext extends ParserRuleContext {
public AssignmentContext assignment() {
return getRuleContext(AssignmentContext.class,0);
}
public PreIncrementExpressionContext preIncrementExpression() {
return getRuleContext(PreIncrementExpressionContext.class,0);
}
public PreDecrementExpressionContext preDecrementExpression() {
return getRuleContext(PreDecrementExpressionContext.class,0);
}
public PostIncrementExpressionContext postIncrementExpression() {
return getRuleContext(PostIncrementExpressionContext.class,0);
}
public PostDecrementExpressionContext postDecrementExpression() {
return getRuleContext(PostDecrementExpressionContext.class,0);
}
public MethodInvocationContext methodInvocation() {
return getRuleContext(MethodInvocationContext.class,0);
}
public ClassInstanceCreationExpressionContext classInstanceCreationExpression() {
return getRuleContext(ClassInstanceCreationExpressionContext.class,0);
}
public StatementExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statementExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStatementExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStatementExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStatementExpression(this);
else return visitor.visitChildren(this);
}
}
public final StatementExpressionContext statementExpression() throws RecognitionException {
StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
enterRule(_localctx, 288, RULE_statementExpression);
try {
setState(1680);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1673);
assignment();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1674);
preIncrementExpression();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1675);
preDecrementExpression();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1676);
postIncrementExpression();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1677);
postDecrementExpression();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1678);
methodInvocation();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(1679);
classInstanceCreationExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IfThenStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public IfThenStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ifThenStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterIfThenStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitIfThenStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitIfThenStatement(this);
else return visitor.visitChildren(this);
}
}
public final IfThenStatementContext ifThenStatement() throws RecognitionException {
IfThenStatementContext _localctx = new IfThenStatementContext(_ctx, getState());
enterRule(_localctx, 290, RULE_ifThenStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1682);
match(IF);
setState(1683);
match(LPAREN);
setState(1684);
expression();
setState(1685);
match(RPAREN);
setState(1686);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IfThenElseStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementNoShortIfContext statementNoShortIf() {
return getRuleContext(StatementNoShortIfContext.class,0);
}
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public IfThenElseStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ifThenElseStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterIfThenElseStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitIfThenElseStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitIfThenElseStatement(this);
else return visitor.visitChildren(this);
}
}
public final IfThenElseStatementContext ifThenElseStatement() throws RecognitionException {
IfThenElseStatementContext _localctx = new IfThenElseStatementContext(_ctx, getState());
enterRule(_localctx, 292, RULE_ifThenElseStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1688);
match(IF);
setState(1689);
match(LPAREN);
setState(1690);
expression();
setState(1691);
match(RPAREN);
setState(1692);
statementNoShortIf();
setState(1693);
match(ELSE);
setState(1694);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IfThenElseStatementNoShortIfContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public List statementNoShortIf() {
return getRuleContexts(StatementNoShortIfContext.class);
}
public StatementNoShortIfContext statementNoShortIf(int i) {
return getRuleContext(StatementNoShortIfContext.class,i);
}
public IfThenElseStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ifThenElseStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterIfThenElseStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitIfThenElseStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitIfThenElseStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final IfThenElseStatementNoShortIfContext ifThenElseStatementNoShortIf() throws RecognitionException {
IfThenElseStatementNoShortIfContext _localctx = new IfThenElseStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 294, RULE_ifThenElseStatementNoShortIf);
try {
enterOuterAlt(_localctx, 1);
{
setState(1696);
match(IF);
setState(1697);
match(LPAREN);
setState(1698);
expression();
setState(1699);
match(RPAREN);
setState(1700);
statementNoShortIf();
setState(1701);
match(ELSE);
setState(1702);
statementNoShortIf();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AssertStatementContext extends ParserRuleContext {
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public AssertStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assertStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterAssertStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitAssertStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitAssertStatement(this);
else return visitor.visitChildren(this);
}
}
public final AssertStatementContext assertStatement() throws RecognitionException {
AssertStatementContext _localctx = new AssertStatementContext(_ctx, getState());
enterRule(_localctx, 296, RULE_assertStatement);
try {
setState(1714);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,173,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1704);
match(ASSERT);
setState(1705);
expression();
setState(1706);
match(SEMI);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1708);
match(ASSERT);
setState(1709);
expression();
setState(1710);
match(COLON);
setState(1711);
expression();
setState(1712);
match(SEMI);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SwitchStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public SwitchBlockContext switchBlock() {
return getRuleContext(SwitchBlockContext.class,0);
}
public SwitchStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_switchStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSwitchStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSwitchStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSwitchStatement(this);
else return visitor.visitChildren(this);
}
}
public final SwitchStatementContext switchStatement() throws RecognitionException {
SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState());
enterRule(_localctx, 298, RULE_switchStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1716);
match(SWITCH);
setState(1717);
match(LPAREN);
setState(1718);
expression();
setState(1719);
match(RPAREN);
setState(1720);
switchBlock();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SwitchBlockContext extends ParserRuleContext {
public List switchBlockStatementGroup() {
return getRuleContexts(SwitchBlockStatementGroupContext.class);
}
public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) {
return getRuleContext(SwitchBlockStatementGroupContext.class,i);
}
public List switchLabel() {
return getRuleContexts(SwitchLabelContext.class);
}
public SwitchLabelContext switchLabel(int i) {
return getRuleContext(SwitchLabelContext.class,i);
}
public SwitchBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_switchBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSwitchBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSwitchBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSwitchBlock(this);
else return visitor.visitChildren(this);
}
}
public final SwitchBlockContext switchBlock() throws RecognitionException {
SwitchBlockContext _localctx = new SwitchBlockContext(_ctx, getState());
enterRule(_localctx, 300, RULE_switchBlock);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1722);
match(LBRACE);
setState(1726);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,174,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1723);
switchBlockStatementGroup();
}
}
}
setState(1728);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,174,_ctx);
}
setState(1732);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==CASE || _la==DEFAULT) {
{
{
setState(1729);
switchLabel();
}
}
setState(1734);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1735);
match(RBRACE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SwitchBlockStatementGroupContext extends ParserRuleContext {
public SwitchLabelsContext switchLabels() {
return getRuleContext(SwitchLabelsContext.class,0);
}
public BlockStatementsContext blockStatements() {
return getRuleContext(BlockStatementsContext.class,0);
}
public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSwitchBlockStatementGroup(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSwitchBlockStatementGroup(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSwitchBlockStatementGroup(this);
else return visitor.visitChildren(this);
}
}
public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException {
SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState());
enterRule(_localctx, 302, RULE_switchBlockStatementGroup);
try {
enterOuterAlt(_localctx, 1);
{
setState(1737);
switchLabels();
setState(1738);
blockStatements();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SwitchLabelsContext extends ParserRuleContext {
public List switchLabel() {
return getRuleContexts(SwitchLabelContext.class);
}
public SwitchLabelContext switchLabel(int i) {
return getRuleContext(SwitchLabelContext.class,i);
}
public SwitchLabelsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_switchLabels; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSwitchLabels(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSwitchLabels(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSwitchLabels(this);
else return visitor.visitChildren(this);
}
}
public final SwitchLabelsContext switchLabels() throws RecognitionException {
SwitchLabelsContext _localctx = new SwitchLabelsContext(_ctx, getState());
enterRule(_localctx, 304, RULE_switchLabels);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1741);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1740);
switchLabel();
}
}
setState(1743);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==CASE || _la==DEFAULT );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SwitchLabelContext extends ParserRuleContext {
public ConstantExpressionContext constantExpression() {
return getRuleContext(ConstantExpressionContext.class,0);
}
public EnumConstantNameContext enumConstantName() {
return getRuleContext(EnumConstantNameContext.class,0);
}
public SwitchLabelContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_switchLabel; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSwitchLabel(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSwitchLabel(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSwitchLabel(this);
else return visitor.visitChildren(this);
}
}
public final SwitchLabelContext switchLabel() throws RecognitionException {
SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState());
enterRule(_localctx, 306, RULE_switchLabel);
try {
setState(1755);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1745);
match(CASE);
setState(1746);
constantExpression();
setState(1747);
match(COLON);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1749);
match(CASE);
setState(1750);
enumConstantName();
setState(1751);
match(COLON);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1753);
match(DEFAULT);
setState(1754);
match(COLON);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnumConstantNameContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public EnumConstantNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumConstantName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnumConstantName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnumConstantName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnumConstantName(this);
else return visitor.visitChildren(this);
}
}
public final EnumConstantNameContext enumConstantName() throws RecognitionException {
EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState());
enterRule(_localctx, 308, RULE_enumConstantName);
try {
enterOuterAlt(_localctx, 1);
{
setState(1757);
match(Identifier);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WhileStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public WhileStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whileStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterWhileStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitWhileStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitWhileStatement(this);
else return visitor.visitChildren(this);
}
}
public final WhileStatementContext whileStatement() throws RecognitionException {
WhileStatementContext _localctx = new WhileStatementContext(_ctx, getState());
enterRule(_localctx, 310, RULE_whileStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1759);
match(WHILE);
setState(1760);
match(LPAREN);
setState(1761);
expression();
setState(1762);
match(RPAREN);
setState(1763);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WhileStatementNoShortIfContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementNoShortIfContext statementNoShortIf() {
return getRuleContext(StatementNoShortIfContext.class,0);
}
public WhileStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whileStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterWhileStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitWhileStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitWhileStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final WhileStatementNoShortIfContext whileStatementNoShortIf() throws RecognitionException {
WhileStatementNoShortIfContext _localctx = new WhileStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 312, RULE_whileStatementNoShortIf);
try {
enterOuterAlt(_localctx, 1);
{
setState(1765);
match(WHILE);
setState(1766);
match(LPAREN);
setState(1767);
expression();
setState(1768);
match(RPAREN);
setState(1769);
statementNoShortIf();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DoStatementContext extends ParserRuleContext {
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public DoStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_doStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterDoStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitDoStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitDoStatement(this);
else return visitor.visitChildren(this);
}
}
public final DoStatementContext doStatement() throws RecognitionException {
DoStatementContext _localctx = new DoStatementContext(_ctx, getState());
enterRule(_localctx, 314, RULE_doStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1771);
match(DO);
setState(1772);
statement();
setState(1773);
match(WHILE);
setState(1774);
match(LPAREN);
setState(1775);
expression();
setState(1776);
match(RPAREN);
setState(1777);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForStatementContext extends ParserRuleContext {
public BasicForStatementContext basicForStatement() {
return getRuleContext(BasicForStatementContext.class,0);
}
public EnhancedForStatementContext enhancedForStatement() {
return getRuleContext(EnhancedForStatementContext.class,0);
}
public ForStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterForStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitForStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitForStatement(this);
else return visitor.visitChildren(this);
}
}
public final ForStatementContext forStatement() throws RecognitionException {
ForStatementContext _localctx = new ForStatementContext(_ctx, getState());
enterRule(_localctx, 316, RULE_forStatement);
try {
setState(1781);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,178,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1779);
basicForStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1780);
enhancedForStatement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForStatementNoShortIfContext extends ParserRuleContext {
public BasicForStatementNoShortIfContext basicForStatementNoShortIf() {
return getRuleContext(BasicForStatementNoShortIfContext.class,0);
}
public EnhancedForStatementNoShortIfContext enhancedForStatementNoShortIf() {
return getRuleContext(EnhancedForStatementNoShortIfContext.class,0);
}
public ForStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterForStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitForStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitForStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final ForStatementNoShortIfContext forStatementNoShortIf() throws RecognitionException {
ForStatementNoShortIfContext _localctx = new ForStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 318, RULE_forStatementNoShortIf);
try {
setState(1785);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,179,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1783);
basicForStatementNoShortIf();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1784);
enhancedForStatementNoShortIf();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BasicForStatementContext extends ParserRuleContext {
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public ForInitContext forInit() {
return getRuleContext(ForInitContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ForUpdateContext forUpdate() {
return getRuleContext(ForUpdateContext.class,0);
}
public BasicForStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_basicForStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBasicForStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBasicForStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBasicForStatement(this);
else return visitor.visitChildren(this);
}
}
public final BasicForStatementContext basicForStatement() throws RecognitionException {
BasicForStatementContext _localctx = new BasicForStatementContext(_ctx, getState());
enterRule(_localctx, 320, RULE_basicForStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1787);
match(FOR);
setState(1788);
match(LPAREN);
setState(1790);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1789);
forInit();
}
}
setState(1792);
match(SEMI);
setState(1794);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1793);
expression();
}
}
setState(1796);
match(SEMI);
setState(1798);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1797);
forUpdate();
}
}
setState(1800);
match(RPAREN);
setState(1801);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BasicForStatementNoShortIfContext extends ParserRuleContext {
public StatementNoShortIfContext statementNoShortIf() {
return getRuleContext(StatementNoShortIfContext.class,0);
}
public ForInitContext forInit() {
return getRuleContext(ForInitContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ForUpdateContext forUpdate() {
return getRuleContext(ForUpdateContext.class,0);
}
public BasicForStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_basicForStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBasicForStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBasicForStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBasicForStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final BasicForStatementNoShortIfContext basicForStatementNoShortIf() throws RecognitionException {
BasicForStatementNoShortIfContext _localctx = new BasicForStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 322, RULE_basicForStatementNoShortIf);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1803);
match(FOR);
setState(1804);
match(LPAREN);
setState(1806);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1805);
forInit();
}
}
setState(1808);
match(SEMI);
setState(1810);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1809);
expression();
}
}
setState(1812);
match(SEMI);
setState(1814);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1813);
forUpdate();
}
}
setState(1816);
match(RPAREN);
setState(1817);
statementNoShortIf();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForInitContext extends ParserRuleContext {
public StatementExpressionListContext statementExpressionList() {
return getRuleContext(StatementExpressionListContext.class,0);
}
public LocalVariableDeclarationContext localVariableDeclaration() {
return getRuleContext(LocalVariableDeclarationContext.class,0);
}
public ForInitContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forInit; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterForInit(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitForInit(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitForInit(this);
else return visitor.visitChildren(this);
}
}
public final ForInitContext forInit() throws RecognitionException {
ForInitContext _localctx = new ForInitContext(_ctx, getState());
enterRule(_localctx, 324, RULE_forInit);
try {
setState(1821);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,186,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1819);
statementExpressionList();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1820);
localVariableDeclaration();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForUpdateContext extends ParserRuleContext {
public StatementExpressionListContext statementExpressionList() {
return getRuleContext(StatementExpressionListContext.class,0);
}
public ForUpdateContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forUpdate; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterForUpdate(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitForUpdate(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitForUpdate(this);
else return visitor.visitChildren(this);
}
}
public final ForUpdateContext forUpdate() throws RecognitionException {
ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState());
enterRule(_localctx, 326, RULE_forUpdate);
try {
enterOuterAlt(_localctx, 1);
{
setState(1823);
statementExpressionList();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementExpressionListContext extends ParserRuleContext {
public List statementExpression() {
return getRuleContexts(StatementExpressionContext.class);
}
public StatementExpressionContext statementExpression(int i) {
return getRuleContext(StatementExpressionContext.class,i);
}
public StatementExpressionListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statementExpressionList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterStatementExpressionList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitStatementExpressionList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitStatementExpressionList(this);
else return visitor.visitChildren(this);
}
}
public final StatementExpressionListContext statementExpressionList() throws RecognitionException {
StatementExpressionListContext _localctx = new StatementExpressionListContext(_ctx, getState());
enterRule(_localctx, 328, RULE_statementExpressionList);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1825);
statementExpression();
setState(1830);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1826);
match(COMMA);
setState(1827);
statementExpression();
}
}
setState(1832);
_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;
}
public static class EnhancedForStatementContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public EnhancedForStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enhancedForStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnhancedForStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnhancedForStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnhancedForStatement(this);
else return visitor.visitChildren(this);
}
}
public final EnhancedForStatementContext enhancedForStatement() throws RecognitionException {
EnhancedForStatementContext _localctx = new EnhancedForStatementContext(_ctx, getState());
enterRule(_localctx, 330, RULE_enhancedForStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1833);
match(FOR);
setState(1834);
match(LPAREN);
setState(1838);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1835);
variableModifier();
}
}
setState(1840);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1841);
unannType();
setState(1842);
variableDeclaratorId();
setState(1843);
match(COLON);
setState(1844);
expression();
setState(1845);
match(RPAREN);
setState(1846);
statement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnhancedForStatementNoShortIfContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public StatementNoShortIfContext statementNoShortIf() {
return getRuleContext(StatementNoShortIfContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public EnhancedForStatementNoShortIfContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enhancedForStatementNoShortIf; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterEnhancedForStatementNoShortIf(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitEnhancedForStatementNoShortIf(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitEnhancedForStatementNoShortIf(this);
else return visitor.visitChildren(this);
}
}
public final EnhancedForStatementNoShortIfContext enhancedForStatementNoShortIf() throws RecognitionException {
EnhancedForStatementNoShortIfContext _localctx = new EnhancedForStatementNoShortIfContext(_ctx, getState());
enterRule(_localctx, 332, RULE_enhancedForStatementNoShortIf);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1848);
match(FOR);
setState(1849);
match(LPAREN);
setState(1853);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1850);
variableModifier();
}
}
setState(1855);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1856);
unannType();
setState(1857);
variableDeclaratorId();
setState(1858);
match(COLON);
setState(1859);
expression();
setState(1860);
match(RPAREN);
setState(1861);
statementNoShortIf();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BreakStatementContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public BreakStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_breakStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterBreakStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitBreakStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitBreakStatement(this);
else return visitor.visitChildren(this);
}
}
public final BreakStatementContext breakStatement() throws RecognitionException {
BreakStatementContext _localctx = new BreakStatementContext(_ctx, getState());
enterRule(_localctx, 334, RULE_breakStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1863);
match(BREAK);
setState(1865);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1864);
match(Identifier);
}
}
setState(1867);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ContinueStatementContext extends ParserRuleContext {
public TerminalNode Identifier() { return getToken(Java9Parser.Identifier, 0); }
public ContinueStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_continueStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterContinueStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitContinueStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitContinueStatement(this);
else return visitor.visitChildren(this);
}
}
public final ContinueStatementContext continueStatement() throws RecognitionException {
ContinueStatementContext _localctx = new ContinueStatementContext(_ctx, getState());
enterRule(_localctx, 336, RULE_continueStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1869);
match(CONTINUE);
setState(1871);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Identifier) {
{
setState(1870);
match(Identifier);
}
}
setState(1873);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ReturnStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ReturnStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_returnStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterReturnStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitReturnStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitReturnStatement(this);
else return visitor.visitChildren(this);
}
}
public final ReturnStatementContext returnStatement() throws RecognitionException {
ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState());
enterRule(_localctx, 338, RULE_returnStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1875);
match(RETURN);
setState(1877);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (BooleanLiteral - 64)) | (1L << (CharacterLiteral - 64)) | (1L << (StringLiteral - 64)) | (1L << (NullLiteral - 64)) | (1L << (LPAREN - 64)) | (1L << (AT - 64)) | (1L << (BANG - 64)) | (1L << (TILDE - 64)) | (1L << (INC - 64)) | (1L << (DEC - 64)) | (1L << (ADD - 64)) | (1L << (SUB - 64)) | (1L << (Identifier - 64)))) != 0)) {
{
setState(1876);
expression();
}
}
setState(1879);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ThrowStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ThrowStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_throwStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterThrowStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitThrowStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitThrowStatement(this);
else return visitor.visitChildren(this);
}
}
public final ThrowStatementContext throwStatement() throws RecognitionException {
ThrowStatementContext _localctx = new ThrowStatementContext(_ctx, getState());
enterRule(_localctx, 340, RULE_throwStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1881);
match(THROW);
setState(1882);
expression();
setState(1883);
match(SEMI);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SynchronizedStatementContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public SynchronizedStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_synchronizedStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterSynchronizedStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitSynchronizedStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitSynchronizedStatement(this);
else return visitor.visitChildren(this);
}
}
public final SynchronizedStatementContext synchronizedStatement() throws RecognitionException {
SynchronizedStatementContext _localctx = new SynchronizedStatementContext(_ctx, getState());
enterRule(_localctx, 342, RULE_synchronizedStatement);
try {
enterOuterAlt(_localctx, 1);
{
setState(1885);
match(SYNCHRONIZED);
setState(1886);
match(LPAREN);
setState(1887);
expression();
setState(1888);
match(RPAREN);
setState(1889);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TryStatementContext extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public CatchesContext catches() {
return getRuleContext(CatchesContext.class,0);
}
public Finally_Context finally_() {
return getRuleContext(Finally_Context.class,0);
}
public TryWithResourcesStatementContext tryWithResourcesStatement() {
return getRuleContext(TryWithResourcesStatementContext.class,0);
}
public TryStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_tryStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTryStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTryStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTryStatement(this);
else return visitor.visitChildren(this);
}
}
public final TryStatementContext tryStatement() throws RecognitionException {
TryStatementContext _localctx = new TryStatementContext(_ctx, getState());
enterRule(_localctx, 344, RULE_tryStatement);
int _la;
try {
setState(1903);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,194,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1891);
match(TRY);
setState(1892);
block();
setState(1893);
catches();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1895);
match(TRY);
setState(1896);
block();
setState(1898);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==CATCH) {
{
setState(1897);
catches();
}
}
setState(1900);
finally_();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1902);
tryWithResourcesStatement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CatchesContext extends ParserRuleContext {
public List catchClause() {
return getRuleContexts(CatchClauseContext.class);
}
public CatchClauseContext catchClause(int i) {
return getRuleContext(CatchClauseContext.class,i);
}
public CatchesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_catches; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterCatches(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitCatches(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitCatches(this);
else return visitor.visitChildren(this);
}
}
public final CatchesContext catches() throws RecognitionException {
CatchesContext _localctx = new CatchesContext(_ctx, getState());
enterRule(_localctx, 346, RULE_catches);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1906);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1905);
catchClause();
}
}
setState(1908);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==CATCH );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CatchClauseContext extends ParserRuleContext {
public CatchFormalParameterContext catchFormalParameter() {
return getRuleContext(CatchFormalParameterContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public CatchClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_catchClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterCatchClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitCatchClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitCatchClause(this);
else return visitor.visitChildren(this);
}
}
public final CatchClauseContext catchClause() throws RecognitionException {
CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState());
enterRule(_localctx, 348, RULE_catchClause);
try {
enterOuterAlt(_localctx, 1);
{
setState(1910);
match(CATCH);
setState(1911);
match(LPAREN);
setState(1912);
catchFormalParameter();
setState(1913);
match(RPAREN);
setState(1914);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CatchFormalParameterContext extends ParserRuleContext {
public CatchTypeContext catchType() {
return getRuleContext(CatchTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public CatchFormalParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_catchFormalParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterCatchFormalParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitCatchFormalParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitCatchFormalParameter(this);
else return visitor.visitChildren(this);
}
}
public final CatchFormalParameterContext catchFormalParameter() throws RecognitionException {
CatchFormalParameterContext _localctx = new CatchFormalParameterContext(_ctx, getState());
enterRule(_localctx, 350, RULE_catchFormalParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1919);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==FINAL || _la==AT) {
{
{
setState(1916);
variableModifier();
}
}
setState(1921);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1922);
catchType();
setState(1923);
variableDeclaratorId();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CatchTypeContext extends ParserRuleContext {
public UnannClassTypeContext unannClassType() {
return getRuleContext(UnannClassTypeContext.class,0);
}
public List classType() {
return getRuleContexts(ClassTypeContext.class);
}
public ClassTypeContext classType(int i) {
return getRuleContext(ClassTypeContext.class,i);
}
public CatchTypeContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_catchType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterCatchType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitCatchType(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitCatchType(this);
else return visitor.visitChildren(this);
}
}
public final CatchTypeContext catchType() throws RecognitionException {
CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState());
enterRule(_localctx, 352, RULE_catchType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1925);
unannClassType();
setState(1930);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==BITOR) {
{
{
setState(1926);
match(BITOR);
setState(1927);
classType();
}
}
setState(1932);
_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;
}
public static class Finally_Context extends ParserRuleContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public Finally_Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_finally_; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterFinally_(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitFinally_(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitFinally_(this);
else return visitor.visitChildren(this);
}
}
public final Finally_Context finally_() throws RecognitionException {
Finally_Context _localctx = new Finally_Context(_ctx, getState());
enterRule(_localctx, 354, RULE_finally_);
try {
enterOuterAlt(_localctx, 1);
{
setState(1933);
match(FINALLY);
setState(1934);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class TryWithResourcesStatementContext extends ParserRuleContext {
public ResourceSpecificationContext resourceSpecification() {
return getRuleContext(ResourceSpecificationContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public CatchesContext catches() {
return getRuleContext(CatchesContext.class,0);
}
public Finally_Context finally_() {
return getRuleContext(Finally_Context.class,0);
}
public TryWithResourcesStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_tryWithResourcesStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterTryWithResourcesStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitTryWithResourcesStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitTryWithResourcesStatement(this);
else return visitor.visitChildren(this);
}
}
public final TryWithResourcesStatementContext tryWithResourcesStatement() throws RecognitionException {
TryWithResourcesStatementContext _localctx = new TryWithResourcesStatementContext(_ctx, getState());
enterRule(_localctx, 356, RULE_tryWithResourcesStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1936);
match(TRY);
setState(1937);
resourceSpecification();
setState(1938);
block();
setState(1940);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==CATCH) {
{
setState(1939);
catches();
}
}
setState(1943);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FINALLY) {
{
setState(1942);
finally_();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ResourceSpecificationContext extends ParserRuleContext {
public ResourceListContext resourceList() {
return getRuleContext(ResourceListContext.class,0);
}
public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_resourceSpecification; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterResourceSpecification(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitResourceSpecification(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitResourceSpecification(this);
else return visitor.visitChildren(this);
}
}
public final ResourceSpecificationContext resourceSpecification() throws RecognitionException {
ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState());
enterRule(_localctx, 358, RULE_resourceSpecification);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1945);
match(LPAREN);
setState(1946);
resourceList();
setState(1948);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SEMI) {
{
setState(1947);
match(SEMI);
}
}
setState(1950);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ResourceListContext extends ParserRuleContext {
public List resource() {
return getRuleContexts(ResourceContext.class);
}
public ResourceContext resource(int i) {
return getRuleContext(ResourceContext.class,i);
}
public ResourceListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_resourceList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterResourceList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitResourceList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof Java9Visitor ) return ((Java9Visitor extends T>)visitor).visitResourceList(this);
else return visitor.visitChildren(this);
}
}
public final ResourceListContext resourceList() throws RecognitionException {
ResourceListContext _localctx = new ResourceListContext(_ctx, getState());
enterRule(_localctx, 360, RULE_resourceList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1952);
resource();
setState(1957);
_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(1953);
match(SEMI);
setState(1954);
resource();
}
}
}
setState(1959);
_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;
}
public static class ResourceContext extends ParserRuleContext {
public UnannTypeContext unannType() {
return getRuleContext(UnannTypeContext.class,0);
}
public VariableDeclaratorIdContext variableDeclaratorId() {
return getRuleContext(VariableDeclaratorIdContext.class,0);
}
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public List variableModifier() {
return getRuleContexts(VariableModifierContext.class);
}
public VariableModifierContext variableModifier(int i) {
return getRuleContext(VariableModifierContext.class,i);
}
public VariableAccessContext variableAccess() {
return getRuleContext(VariableAccessContext.class,0);
}
public ResourceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_resource; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).enterResource(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof Java9Listener ) ((Java9Listener)listener).exitResource(this);
}
@Override
public