net.sourceforge.pmd.lang.kotlin.ast.KotlinParser Maven / Gradle / Ivy
// Generated from net/sourceforge/pmd/lang/kotlin/ast/KotlinParser.g4 by ANTLR 4.9.3
package net.sourceforge.pmd.lang.kotlin.ast;
import net.sourceforge.pmd.lang.ast.impl.antlr4.*;
import net.sourceforge.pmd.lang.ast.AstVisitor;
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 KotlinParser extends AntlrGeneratedParserBase {
static { RuntimeMetaData.checkVersion("4.9.3", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
ShebangLine=1, DelimitedComment=2, LineComment=3, WS=4, NL=5, RESERVED=6,
DOT=7, COMMA=8, LPAREN=9, RPAREN=10, LSQUARE=11, RSQUARE=12, LCURL=13,
RCURL=14, MULT=15, MOD=16, DIV=17, ADD=18, SUB=19, INCR=20, DECR=21, CONJ=22,
DISJ=23, EXCL_WS=24, EXCL_NO_WS=25, COLON=26, SEMICOLON=27, ASSIGNMENT=28,
ADD_ASSIGNMENT=29, SUB_ASSIGNMENT=30, MULT_ASSIGNMENT=31, DIV_ASSIGNMENT=32,
MOD_ASSIGNMENT=33, ARROW=34, DOUBLE_ARROW=35, RANGE=36, COLONCOLON=37,
DOUBLE_SEMICOLON=38, HASH=39, AT_NO_WS=40, AT_POST_WS=41, AT_PRE_WS=42,
AT_BOTH_WS=43, QUEST_WS=44, QUEST_NO_WS=45, LANGLE=46, RANGLE=47, LE=48,
GE=49, EXCL_EQ=50, EXCL_EQEQ=51, AS_SAFE=52, EQEQ=53, EQEQEQ=54, SINGLE_QUOTE=55,
AMP=56, RETURN_AT=57, CONTINUE_AT=58, BREAK_AT=59, THIS_AT=60, SUPER_AT=61,
FILE=62, FIELD=63, PROPERTY=64, GET=65, SET=66, RECEIVER=67, PARAM=68,
SETPARAM=69, DELEGATE=70, PACKAGE=71, IMPORT=72, CLASS=73, INTERFACE=74,
FUN=75, OBJECT=76, VAL=77, VAR=78, TYPE_ALIAS=79, CONSTRUCTOR=80, BY=81,
COMPANION=82, INIT=83, THIS=84, SUPER=85, TYPEOF=86, WHERE=87, IF=88,
ELSE=89, WHEN=90, TRY=91, CATCH=92, FINALLY=93, FOR=94, DO=95, WHILE=96,
THROW=97, RETURN=98, CONTINUE=99, BREAK=100, AS=101, IS=102, IN=103, NOT_IS=104,
NOT_IN=105, OUT=106, DYNAMIC=107, PUBLIC=108, PRIVATE=109, PROTECTED=110,
INTERNAL=111, ENUM=112, SEALED=113, ANNOTATION=114, DATA=115, INNER=116,
VALUE=117, TAILREC=118, OPERATOR=119, INLINE=120, INFIX=121, EXTERNAL=122,
SUSPEND=123, OVERRIDE=124, ABSTRACT=125, FINAL=126, OPEN=127, CONST=128,
LATEINIT=129, VARARG=130, NOINLINE=131, CROSSINLINE=132, REIFIED=133,
EXPECT=134, ACTUAL=135, RealLiteral=136, FloatLiteral=137, DoubleLiteral=138,
IntegerLiteral=139, HexLiteral=140, BinLiteral=141, UnsignedLiteral=142,
LongLiteral=143, BooleanLiteral=144, NullLiteral=145, CharacterLiteral=146,
Identifier=147, IdentifierOrSoftKey=148, FieldIdentifier=149, QUOTE_OPEN=150,
TRIPLE_QUOTE_OPEN=151, UNICODE_CLASS_LL=152, UNICODE_CLASS_LM=153, UNICODE_CLASS_LO=154,
UNICODE_CLASS_LT=155, UNICODE_CLASS_LU=156, UNICODE_CLASS_ND=157, UNICODE_CLASS_NL=158,
QUOTE_CLOSE=159, LineStrRef=160, LineStrText=161, LineStrEscapedChar=162,
LineStrExprStart=163, TRIPLE_QUOTE_CLOSE=164, MultiLineStringQuote=165,
MultiLineStrRef=166, MultiLineStrText=167, MultiLineStrExprStart=168,
Inside_Comment=169, Inside_WS=170, Inside_NL=171, ErrorCharacter=172;
public static final int
RULE_kotlinFile = 0, RULE_script = 1, RULE_shebangLine = 2, RULE_fileAnnotation = 3,
RULE_packageHeader = 4, RULE_importList = 5, RULE_importHeader = 6, RULE_importAlias = 7,
RULE_topLevelObject = 8, RULE_typeAlias = 9, RULE_declaration = 10, RULE_classDeclaration = 11,
RULE_primaryConstructor = 12, RULE_classBody = 13, RULE_classParameters = 14,
RULE_classParameter = 15, RULE_delegationSpecifiers = 16, RULE_delegationSpecifier = 17,
RULE_constructorInvocation = 18, RULE_annotatedDelegationSpecifier = 19,
RULE_explicitDelegation = 20, RULE_typeParameters = 21, RULE_typeParameter = 22,
RULE_typeConstraints = 23, RULE_typeConstraint = 24, RULE_classMemberDeclarations = 25,
RULE_classMemberDeclaration = 26, RULE_anonymousInitializer = 27, RULE_companionObject = 28,
RULE_functionValueParameters = 29, RULE_functionValueParameter = 30, RULE_functionDeclaration = 31,
RULE_functionBody = 32, RULE_variableDeclaration = 33, RULE_multiVariableDeclaration = 34,
RULE_propertyDeclaration = 35, RULE_propertyDelegate = 36, RULE_getter = 37,
RULE_setter = 38, RULE_parametersWithOptionalType = 39, RULE_functionValueParameterWithOptionalType = 40,
RULE_parameterWithOptionalType = 41, RULE_parameter = 42, RULE_objectDeclaration = 43,
RULE_secondaryConstructor = 44, RULE_constructorDelegationCall = 45, RULE_enumClassBody = 46,
RULE_enumEntries = 47, RULE_enumEntry = 48, RULE_type = 49, RULE_typeReference = 50,
RULE_nullableType = 51, RULE_quest = 52, RULE_userType = 53, RULE_simpleUserType = 54,
RULE_typeProjection = 55, RULE_typeProjectionModifiers = 56, RULE_typeProjectionModifier = 57,
RULE_functionType = 58, RULE_functionTypeParameters = 59, RULE_parenthesizedType = 60,
RULE_receiverType = 61, RULE_parenthesizedUserType = 62, RULE_definitelyNonNullableType = 63,
RULE_statements = 64, RULE_statement = 65, RULE_label = 66, RULE_controlStructureBody = 67,
RULE_block = 68, RULE_loopStatement = 69, RULE_forStatement = 70, RULE_whileStatement = 71,
RULE_doWhileStatement = 72, RULE_assignment = 73, RULE_semi = 74, RULE_semis = 75,
RULE_expression = 76, RULE_disjunction = 77, RULE_conjunction = 78, RULE_equality = 79,
RULE_comparison = 80, RULE_genericCallLikeComparison = 81, RULE_infixOperation = 82,
RULE_elvisExpression = 83, RULE_elvis = 84, RULE_infixFunctionCall = 85,
RULE_rangeExpression = 86, RULE_additiveExpression = 87, RULE_multiplicativeExpression = 88,
RULE_asExpression = 89, RULE_prefixUnaryExpression = 90, RULE_unaryPrefix = 91,
RULE_postfixUnaryExpression = 92, RULE_postfixUnarySuffix = 93, RULE_directlyAssignableExpression = 94,
RULE_parenthesizedDirectlyAssignableExpression = 95, RULE_assignableExpression = 96,
RULE_parenthesizedAssignableExpression = 97, RULE_assignableSuffix = 98,
RULE_indexingSuffix = 99, RULE_navigationSuffix = 100, RULE_callSuffix = 101,
RULE_annotatedLambda = 102, RULE_typeArguments = 103, RULE_valueArguments = 104,
RULE_valueArgument = 105, RULE_primaryExpression = 106, RULE_parenthesizedExpression = 107,
RULE_collectionLiteral = 108, RULE_literalConstant = 109, RULE_stringLiteral = 110,
RULE_lineStringLiteral = 111, RULE_multiLineStringLiteral = 112, RULE_lineStringContent = 113,
RULE_lineStringExpression = 114, RULE_multiLineStringContent = 115, RULE_multiLineStringExpression = 116,
RULE_lambdaLiteral = 117, RULE_lambdaParameters = 118, RULE_lambdaParameter = 119,
RULE_anonymousFunction = 120, RULE_functionLiteral = 121, RULE_objectLiteral = 122,
RULE_thisExpression = 123, RULE_superExpression = 124, RULE_ifExpression = 125,
RULE_whenSubject = 126, RULE_whenExpression = 127, RULE_whenEntry = 128,
RULE_whenCondition = 129, RULE_rangeTest = 130, RULE_typeTest = 131, RULE_tryExpression = 132,
RULE_catchBlock = 133, RULE_finallyBlock = 134, RULE_jumpExpression = 135,
RULE_callableReference = 136, RULE_assignmentAndOperator = 137, RULE_equalityOperator = 138,
RULE_comparisonOperator = 139, RULE_inOperator = 140, RULE_isOperator = 141,
RULE_additiveOperator = 142, RULE_multiplicativeOperator = 143, RULE_asOperator = 144,
RULE_prefixUnaryOperator = 145, RULE_postfixUnaryOperator = 146, RULE_excl = 147,
RULE_memberAccessOperator = 148, RULE_safeNav = 149, RULE_modifiers = 150,
RULE_parameterModifiers = 151, RULE_modifier = 152, RULE_typeModifiers = 153,
RULE_typeModifier = 154, RULE_classModifier = 155, RULE_memberModifier = 156,
RULE_visibilityModifier = 157, RULE_varianceModifier = 158, RULE_typeParameterModifiers = 159,
RULE_typeParameterModifier = 160, RULE_functionModifier = 161, RULE_propertyModifier = 162,
RULE_inheritanceModifier = 163, RULE_parameterModifier = 164, RULE_reificationModifier = 165,
RULE_platformModifier = 166, RULE_annotation = 167, RULE_singleAnnotation = 168,
RULE_multiAnnotation = 169, RULE_annotationUseSiteTarget = 170, RULE_unescapedAnnotation = 171,
RULE_simpleIdentifier = 172, RULE_identifier = 173;
private static String[] makeRuleNames() {
return new String[] {
"kotlinFile", "script", "shebangLine", "fileAnnotation", "packageHeader",
"importList", "importHeader", "importAlias", "topLevelObject", "typeAlias",
"declaration", "classDeclaration", "primaryConstructor", "classBody",
"classParameters", "classParameter", "delegationSpecifiers", "delegationSpecifier",
"constructorInvocation", "annotatedDelegationSpecifier", "explicitDelegation",
"typeParameters", "typeParameter", "typeConstraints", "typeConstraint",
"classMemberDeclarations", "classMemberDeclaration", "anonymousInitializer",
"companionObject", "functionValueParameters", "functionValueParameter",
"functionDeclaration", "functionBody", "variableDeclaration", "multiVariableDeclaration",
"propertyDeclaration", "propertyDelegate", "getter", "setter", "parametersWithOptionalType",
"functionValueParameterWithOptionalType", "parameterWithOptionalType",
"parameter", "objectDeclaration", "secondaryConstructor", "constructorDelegationCall",
"enumClassBody", "enumEntries", "enumEntry", "type", "typeReference",
"nullableType", "quest", "userType", "simpleUserType", "typeProjection",
"typeProjectionModifiers", "typeProjectionModifier", "functionType",
"functionTypeParameters", "parenthesizedType", "receiverType", "parenthesizedUserType",
"definitelyNonNullableType", "statements", "statement", "label", "controlStructureBody",
"block", "loopStatement", "forStatement", "whileStatement", "doWhileStatement",
"assignment", "semi", "semis", "expression", "disjunction", "conjunction",
"equality", "comparison", "genericCallLikeComparison", "infixOperation",
"elvisExpression", "elvis", "infixFunctionCall", "rangeExpression", "additiveExpression",
"multiplicativeExpression", "asExpression", "prefixUnaryExpression",
"unaryPrefix", "postfixUnaryExpression", "postfixUnarySuffix", "directlyAssignableExpression",
"parenthesizedDirectlyAssignableExpression", "assignableExpression",
"parenthesizedAssignableExpression", "assignableSuffix", "indexingSuffix",
"navigationSuffix", "callSuffix", "annotatedLambda", "typeArguments",
"valueArguments", "valueArgument", "primaryExpression", "parenthesizedExpression",
"collectionLiteral", "literalConstant", "stringLiteral", "lineStringLiteral",
"multiLineStringLiteral", "lineStringContent", "lineStringExpression",
"multiLineStringContent", "multiLineStringExpression", "lambdaLiteral",
"lambdaParameters", "lambdaParameter", "anonymousFunction", "functionLiteral",
"objectLiteral", "thisExpression", "superExpression", "ifExpression",
"whenSubject", "whenExpression", "whenEntry", "whenCondition", "rangeTest",
"typeTest", "tryExpression", "catchBlock", "finallyBlock", "jumpExpression",
"callableReference", "assignmentAndOperator", "equalityOperator", "comparisonOperator",
"inOperator", "isOperator", "additiveOperator", "multiplicativeOperator",
"asOperator", "prefixUnaryOperator", "postfixUnaryOperator", "excl",
"memberAccessOperator", "safeNav", "modifiers", "parameterModifiers",
"modifier", "typeModifiers", "typeModifier", "classModifier", "memberModifier",
"visibilityModifier", "varianceModifier", "typeParameterModifiers", "typeParameterModifier",
"functionModifier", "propertyModifier", "inheritanceModifier", "parameterModifier",
"reificationModifier", "platformModifier", "annotation", "singleAnnotation",
"multiAnnotation", "annotationUseSiteTarget", "unescapedAnnotation",
"simpleIdentifier", "identifier"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, null, null, null, "'...'", "'.'", "','", "'('", "')'",
"'['", "']'", "'{'", "'}'", "'*'", "'%'", "'/'", "'+'", "'-'", "'++'",
"'--'", "'&&'", "'||'", null, "'!'", "':'", "';'", "'='", "'+='", "'-='",
"'*='", "'/='", "'%='", "'->'", "'=>'", "'..'", "'::'", "';;'", "'#'",
"'@'", null, null, null, null, "'?'", "'<'", "'>'", "'<='", "'>='", "'!='",
"'!=='", "'as?'", "'=='", "'==='", "'''", "'&'", null, null, null, null,
null, "'file'", "'field'", "'property'", "'get'", "'set'", "'receiver'",
"'param'", "'setparam'", "'delegate'", "'package'", "'import'", "'class'",
"'interface'", "'fun'", "'object'", "'val'", "'var'", "'typealias'",
"'constructor'", "'by'", "'companion'", "'init'", "'this'", "'super'",
"'typeof'", "'where'", "'if'", "'else'", "'when'", "'try'", "'catch'",
"'finally'", "'for'", "'do'", "'while'", "'throw'", "'return'", "'continue'",
"'break'", "'as'", "'is'", "'in'", null, null, "'out'", "'dynamic'",
"'public'", "'private'", "'protected'", "'internal'", "'enum'", "'sealed'",
"'annotation'", "'data'", "'inner'", "'value'", "'tailrec'", "'operator'",
"'inline'", "'infix'", "'external'", "'suspend'", "'override'", "'abstract'",
"'final'", "'open'", "'const'", "'lateinit'", "'vararg'", "'noinline'",
"'crossinline'", "'reified'", "'expect'", "'actual'", null, null, null,
null, null, null, null, null, null, "'null'", null, null, null, null,
null, "'\"\"\"'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "ShebangLine", "DelimitedComment", "LineComment", "WS", "NL", "RESERVED",
"DOT", "COMMA", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURL", "RCURL",
"MULT", "MOD", "DIV", "ADD", "SUB", "INCR", "DECR", "CONJ", "DISJ", "EXCL_WS",
"EXCL_NO_WS", "COLON", "SEMICOLON", "ASSIGNMENT", "ADD_ASSIGNMENT", "SUB_ASSIGNMENT",
"MULT_ASSIGNMENT", "DIV_ASSIGNMENT", "MOD_ASSIGNMENT", "ARROW", "DOUBLE_ARROW",
"RANGE", "COLONCOLON", "DOUBLE_SEMICOLON", "HASH", "AT_NO_WS", "AT_POST_WS",
"AT_PRE_WS", "AT_BOTH_WS", "QUEST_WS", "QUEST_NO_WS", "LANGLE", "RANGLE",
"LE", "GE", "EXCL_EQ", "EXCL_EQEQ", "AS_SAFE", "EQEQ", "EQEQEQ", "SINGLE_QUOTE",
"AMP", "RETURN_AT", "CONTINUE_AT", "BREAK_AT", "THIS_AT", "SUPER_AT",
"FILE", "FIELD", "PROPERTY", "GET", "SET", "RECEIVER", "PARAM", "SETPARAM",
"DELEGATE", "PACKAGE", "IMPORT", "CLASS", "INTERFACE", "FUN", "OBJECT",
"VAL", "VAR", "TYPE_ALIAS", "CONSTRUCTOR", "BY", "COMPANION", "INIT",
"THIS", "SUPER", "TYPEOF", "WHERE", "IF", "ELSE", "WHEN", "TRY", "CATCH",
"FINALLY", "FOR", "DO", "WHILE", "THROW", "RETURN", "CONTINUE", "BREAK",
"AS", "IS", "IN", "NOT_IS", "NOT_IN", "OUT", "DYNAMIC", "PUBLIC", "PRIVATE",
"PROTECTED", "INTERNAL", "ENUM", "SEALED", "ANNOTATION", "DATA", "INNER",
"VALUE", "TAILREC", "OPERATOR", "INLINE", "INFIX", "EXTERNAL", "SUSPEND",
"OVERRIDE", "ABSTRACT", "FINAL", "OPEN", "CONST", "LATEINIT", "VARARG",
"NOINLINE", "CROSSINLINE", "REIFIED", "EXPECT", "ACTUAL", "RealLiteral",
"FloatLiteral", "DoubleLiteral", "IntegerLiteral", "HexLiteral", "BinLiteral",
"UnsignedLiteral", "LongLiteral", "BooleanLiteral", "NullLiteral", "CharacterLiteral",
"Identifier", "IdentifierOrSoftKey", "FieldIdentifier", "QUOTE_OPEN",
"TRIPLE_QUOTE_OPEN", "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO",
"UNICODE_CLASS_LT", "UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL",
"QUOTE_CLOSE", "LineStrRef", "LineStrText", "LineStrEscapedChar", "LineStrExprStart",
"TRIPLE_QUOTE_CLOSE", "MultiLineStringQuote", "MultiLineStrRef", "MultiLineStrText",
"MultiLineStrExprStart", "Inside_Comment", "Inside_WS", "Inside_NL",
"ErrorCharacter"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
@Override
public String getGrammarFileName() { return "KotlinParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
static final AntlrNameDictionary DICO = new KotlinNameDictionary(VOCABULARY, ruleNames);
@Override
protected KotlinTerminalNode createPmdTerminal(ParserRuleContext parent, Token t) {
return new KotlinTerminalNode(t);
}
@Override
protected KotlinErrorNode createPmdError(ParserRuleContext parent, Token t) {
return new KotlinErrorNode(t);
}
public KotlinParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class KtKotlinFile extends KotlinRootNode {
public KtPackageHeader packageHeader() {
return getRuleContext(KtPackageHeader.class,0);
}
public KtImportList importList() {
return getRuleContext(KtImportList.class,0);
}
public TerminalNode EOF() { return getToken(KotlinParser.EOF, 0); }
public KtShebangLine shebangLine() {
return getRuleContext(KtShebangLine.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List fileAnnotation() {
return getRuleContexts(KtFileAnnotation.class);
}
public KtFileAnnotation fileAnnotation(int i) {
return getRuleContext(KtFileAnnotation.class,i);
}
public List topLevelObject() {
return getRuleContexts(KtTopLevelObject.class);
}
public KtTopLevelObject topLevelObject(int i) {
return getRuleContext(KtTopLevelObject.class,i);
}
public KtKotlinFile(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_kotlinFile; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterKotlinFile(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitKotlinFile(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitKotlinFile(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtKotlinFile kotlinFile() throws RecognitionException {
KtKotlinFile _localctx = new KtKotlinFile(_ctx, getState());
enterRule(_localctx, 0, RULE_kotlinFile);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(349);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ShebangLine) {
{
setState(348);
shebangLine();
}
}
setState(354);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(351);
match(NL);
}
}
setState(356);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(360);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(357);
fileAnnotation();
}
}
}
setState(362);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,2,_ctx);
}
setState(363);
packageHeader();
setState(364);
importList();
setState(368);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 73)) & ~0x3f) == 0 && ((1L << (_la - 73)) & ((1L << (CLASS - 73)) | (1L << (INTERFACE - 73)) | (1L << (FUN - 73)) | (1L << (OBJECT - 73)) | (1L << (VAL - 73)) | (1L << (VAR - 73)) | (1L << (TYPE_ALIAS - 73)) | (1L << (PUBLIC - 73)) | (1L << (PRIVATE - 73)) | (1L << (PROTECTED - 73)) | (1L << (INTERNAL - 73)) | (1L << (ENUM - 73)) | (1L << (SEALED - 73)) | (1L << (ANNOTATION - 73)) | (1L << (DATA - 73)) | (1L << (INNER - 73)) | (1L << (VALUE - 73)) | (1L << (TAILREC - 73)) | (1L << (OPERATOR - 73)) | (1L << (INLINE - 73)) | (1L << (INFIX - 73)) | (1L << (EXTERNAL - 73)) | (1L << (SUSPEND - 73)) | (1L << (OVERRIDE - 73)) | (1L << (ABSTRACT - 73)) | (1L << (FINAL - 73)) | (1L << (OPEN - 73)) | (1L << (CONST - 73)) | (1L << (LATEINIT - 73)) | (1L << (VARARG - 73)) | (1L << (NOINLINE - 73)) | (1L << (CROSSINLINE - 73)) | (1L << (EXPECT - 73)) | (1L << (ACTUAL - 73)))) != 0)) {
{
{
setState(365);
topLevelObject();
}
}
setState(370);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(371);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtScript extends KotlinInnerNode {
public KtPackageHeader packageHeader() {
return getRuleContext(KtPackageHeader.class,0);
}
public KtImportList importList() {
return getRuleContext(KtImportList.class,0);
}
public TerminalNode EOF() { return getToken(KotlinParser.EOF, 0); }
public KtShebangLine shebangLine() {
return getRuleContext(KtShebangLine.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List fileAnnotation() {
return getRuleContexts(KtFileAnnotation.class);
}
public KtFileAnnotation fileAnnotation(int i) {
return getRuleContext(KtFileAnnotation.class,i);
}
public List statement() {
return getRuleContexts(KtStatement.class);
}
public KtStatement statement(int i) {
return getRuleContext(KtStatement.class,i);
}
public List semi() {
return getRuleContexts(KtSemi.class);
}
public KtSemi semi(int i) {
return getRuleContext(KtSemi.class,i);
}
public KtScript(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_script; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterScript(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitScript(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitScript(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtScript script() throws RecognitionException {
KtScript _localctx = new KtScript(_ctx, getState());
enterRule(_localctx, 2, RULE_script);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(374);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ShebangLine) {
{
setState(373);
shebangLine();
}
}
setState(379);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(376);
match(NL);
}
}
setState(381);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(385);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(382);
fileAnnotation();
}
}
}
setState(387);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,6,_ctx);
}
setState(388);
packageHeader();
setState(389);
importList();
setState(395);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL_WS) | (1L << EXCL_NO_WS) | (1L << COLONCOLON) | (1L << AT_NO_WS) | (1L << AT_PRE_WS) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << THIS_AT) | (1L << SUPER_AT) | (1L << FILE) | (1L << FIELD))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (PROPERTY - 64)) | (1L << (GET - 64)) | (1L << (SET - 64)) | (1L << (RECEIVER - 64)) | (1L << (PARAM - 64)) | (1L << (SETPARAM - 64)) | (1L << (DELEGATE - 64)) | (1L << (IMPORT - 64)) | (1L << (CLASS - 64)) | (1L << (INTERFACE - 64)) | (1L << (FUN - 64)) | (1L << (OBJECT - 64)) | (1L << (VAL - 64)) | (1L << (VAR - 64)) | (1L << (TYPE_ALIAS - 64)) | (1L << (CONSTRUCTOR - 64)) | (1L << (BY - 64)) | (1L << (COMPANION - 64)) | (1L << (INIT - 64)) | (1L << (THIS - 64)) | (1L << (SUPER - 64)) | (1L << (WHERE - 64)) | (1L << (IF - 64)) | (1L << (WHEN - 64)) | (1L << (TRY - 64)) | (1L << (CATCH - 64)) | (1L << (FINALLY - 64)) | (1L << (FOR - 64)) | (1L << (DO - 64)) | (1L << (WHILE - 64)) | (1L << (THROW - 64)) | (1L << (RETURN - 64)) | (1L << (CONTINUE - 64)) | (1L << (BREAK - 64)) | (1L << (OUT - 64)) | (1L << (DYNAMIC - 64)) | (1L << (PUBLIC - 64)) | (1L << (PRIVATE - 64)) | (1L << (PROTECTED - 64)) | (1L << (INTERNAL - 64)) | (1L << (ENUM - 64)) | (1L << (SEALED - 64)) | (1L << (ANNOTATION - 64)) | (1L << (DATA - 64)) | (1L << (INNER - 64)) | (1L << (VALUE - 64)) | (1L << (TAILREC - 64)) | (1L << (OPERATOR - 64)) | (1L << (INLINE - 64)) | (1L << (INFIX - 64)) | (1L << (EXTERNAL - 64)) | (1L << (SUSPEND - 64)) | (1L << (OVERRIDE - 64)) | (1L << (ABSTRACT - 64)) | (1L << (FINAL - 64)) | (1L << (OPEN - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (CONST - 128)) | (1L << (LATEINIT - 128)) | (1L << (VARARG - 128)) | (1L << (NOINLINE - 128)) | (1L << (CROSSINLINE - 128)) | (1L << (REIFIED - 128)) | (1L << (EXPECT - 128)) | (1L << (ACTUAL - 128)) | (1L << (RealLiteral - 128)) | (1L << (IntegerLiteral - 128)) | (1L << (HexLiteral - 128)) | (1L << (BinLiteral - 128)) | (1L << (UnsignedLiteral - 128)) | (1L << (LongLiteral - 128)) | (1L << (BooleanLiteral - 128)) | (1L << (NullLiteral - 128)) | (1L << (CharacterLiteral - 128)) | (1L << (Identifier - 128)) | (1L << (QUOTE_OPEN - 128)) | (1L << (TRIPLE_QUOTE_OPEN - 128)))) != 0)) {
{
{
setState(390);
statement();
setState(391);
semi();
}
}
setState(397);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(398);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtShebangLine extends KotlinInnerNode {
public TerminalNode ShebangLine() { return getToken(KotlinParser.ShebangLine, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtShebangLine(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_shebangLine; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterShebangLine(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitShebangLine(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitShebangLine(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtShebangLine shebangLine() throws RecognitionException {
KtShebangLine _localctx = new KtShebangLine(_ctx, getState());
enterRule(_localctx, 4, RULE_shebangLine);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(400);
match(ShebangLine);
setState(402);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(401);
match(NL);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(404);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFileAnnotation extends KotlinInnerNode {
public TerminalNode FILE() { return getToken(KotlinParser.FILE, 0); }
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public TerminalNode AT_NO_WS() { return getToken(KotlinParser.AT_NO_WS, 0); }
public TerminalNode AT_PRE_WS() { return getToken(KotlinParser.AT_PRE_WS, 0); }
public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); }
public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); }
public List unescapedAnnotation() {
return getRuleContexts(KtUnescapedAnnotation.class);
}
public KtUnescapedAnnotation unescapedAnnotation(int i) {
return getRuleContext(KtUnescapedAnnotation.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtFileAnnotation(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_fileAnnotation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFileAnnotation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFileAnnotation(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFileAnnotation(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFileAnnotation fileAnnotation() throws RecognitionException {
KtFileAnnotation _localctx = new KtFileAnnotation(_ctx, getState());
enterRule(_localctx, 6, RULE_fileAnnotation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(406);
_la = _input.LA(1);
if ( !(_la==AT_NO_WS || _la==AT_PRE_WS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(407);
match(FILE);
setState(411);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(408);
match(NL);
}
}
setState(413);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(414);
match(COLON);
setState(418);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(415);
match(NL);
}
}
setState(420);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(430);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LSQUARE:
{
setState(421);
match(LSQUARE);
setState(423);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(422);
unescapedAnnotation();
}
}
setState(425);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_la - 62)) & ~0x3f) == 0 && ((1L << (_la - 62)) & ((1L << (FILE - 62)) | (1L << (FIELD - 62)) | (1L << (PROPERTY - 62)) | (1L << (GET - 62)) | (1L << (SET - 62)) | (1L << (RECEIVER - 62)) | (1L << (PARAM - 62)) | (1L << (SETPARAM - 62)) | (1L << (DELEGATE - 62)) | (1L << (IMPORT - 62)) | (1L << (CONSTRUCTOR - 62)) | (1L << (BY - 62)) | (1L << (COMPANION - 62)) | (1L << (INIT - 62)) | (1L << (WHERE - 62)) | (1L << (CATCH - 62)) | (1L << (FINALLY - 62)) | (1L << (OUT - 62)) | (1L << (DYNAMIC - 62)) | (1L << (PUBLIC - 62)) | (1L << (PRIVATE - 62)) | (1L << (PROTECTED - 62)) | (1L << (INTERNAL - 62)) | (1L << (ENUM - 62)) | (1L << (SEALED - 62)) | (1L << (ANNOTATION - 62)) | (1L << (DATA - 62)) | (1L << (INNER - 62)) | (1L << (VALUE - 62)) | (1L << (TAILREC - 62)) | (1L << (OPERATOR - 62)) | (1L << (INLINE - 62)) | (1L << (INFIX - 62)) | (1L << (EXTERNAL - 62)) | (1L << (SUSPEND - 62)) | (1L << (OVERRIDE - 62)) | (1L << (ABSTRACT - 62)))) != 0) || ((((_la - 126)) & ~0x3f) == 0 && ((1L << (_la - 126)) & ((1L << (FINAL - 126)) | (1L << (OPEN - 126)) | (1L << (CONST - 126)) | (1L << (LATEINIT - 126)) | (1L << (VARARG - 126)) | (1L << (NOINLINE - 126)) | (1L << (CROSSINLINE - 126)) | (1L << (REIFIED - 126)) | (1L << (EXPECT - 126)) | (1L << (ACTUAL - 126)) | (1L << (Identifier - 126)))) != 0) );
setState(427);
match(RSQUARE);
}
break;
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(429);
unescapedAnnotation();
}
break;
default:
throw new NoViableAltException(this);
}
setState(435);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(432);
match(NL);
}
}
setState(437);
_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 KtPackageHeader extends KotlinInnerNode {
public TerminalNode PACKAGE() { return getToken(KotlinParser.PACKAGE, 0); }
public KtIdentifier identifier() {
return getRuleContext(KtIdentifier.class,0);
}
public KtSemi semi() {
return getRuleContext(KtSemi.class,0);
}
public KtPackageHeader(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packageHeader; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPackageHeader(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPackageHeader(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPackageHeader(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPackageHeader packageHeader() throws RecognitionException {
KtPackageHeader _localctx = new KtPackageHeader(_ctx, getState());
enterRule(_localctx, 8, RULE_packageHeader);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(443);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PACKAGE) {
{
setState(438);
match(PACKAGE);
setState(439);
identifier();
setState(441);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL || _la==SEMICOLON) {
{
setState(440);
semi();
}
}
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtImportList extends KotlinInnerNode {
public List importHeader() {
return getRuleContexts(KtImportHeader.class);
}
public KtImportHeader importHeader(int i) {
return getRuleContext(KtImportHeader.class,i);
}
public KtImportList(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_importList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterImportList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitImportList(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitImportList(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtImportList importList() throws RecognitionException {
KtImportList _localctx = new KtImportList(_ctx, getState());
enterRule(_localctx, 10, RULE_importList);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(448);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(445);
importHeader();
}
}
}
setState(450);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,16,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtImportHeader extends KotlinInnerNode {
public TerminalNode IMPORT() { return getToken(KotlinParser.IMPORT, 0); }
public KtIdentifier identifier() {
return getRuleContext(KtIdentifier.class,0);
}
public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); }
public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); }
public KtImportAlias importAlias() {
return getRuleContext(KtImportAlias.class,0);
}
public KtSemi semi() {
return getRuleContext(KtSemi.class,0);
}
public KtImportHeader(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_importHeader; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterImportHeader(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitImportHeader(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitImportHeader(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtImportHeader importHeader() throws RecognitionException {
KtImportHeader _localctx = new KtImportHeader(_ctx, getState());
enterRule(_localctx, 12, RULE_importHeader);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(451);
match(IMPORT);
setState(452);
identifier();
setState(456);
_errHandler.sync(this);
switch (_input.LA(1)) {
case DOT:
{
setState(453);
match(DOT);
setState(454);
match(MULT);
}
break;
case AS:
{
setState(455);
importAlias();
}
break;
case EOF:
case NL:
case LPAREN:
case LSQUARE:
case LCURL:
case ADD:
case SUB:
case INCR:
case DECR:
case EXCL_WS:
case EXCL_NO_WS:
case SEMICOLON:
case COLONCOLON:
case AT_NO_WS:
case AT_PRE_WS:
case RETURN_AT:
case CONTINUE_AT:
case BREAK_AT:
case THIS_AT:
case SUPER_AT:
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CLASS:
case INTERFACE:
case FUN:
case OBJECT:
case VAL:
case VAR:
case TYPE_ALIAS:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case THIS:
case SUPER:
case WHERE:
case IF:
case WHEN:
case TRY:
case CATCH:
case FINALLY:
case FOR:
case DO:
case WHILE:
case THROW:
case RETURN:
case CONTINUE:
case BREAK:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case RealLiteral:
case IntegerLiteral:
case HexLiteral:
case BinLiteral:
case UnsignedLiteral:
case LongLiteral:
case BooleanLiteral:
case NullLiteral:
case CharacterLiteral:
case Identifier:
case QUOTE_OPEN:
case TRIPLE_QUOTE_OPEN:
break;
default:
break;
}
setState(459);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL || _la==SEMICOLON) {
{
setState(458);
semi();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtImportAlias extends KotlinInnerNode {
public TerminalNode AS() { return getToken(KotlinParser.AS, 0); }
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtImportAlias(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_importAlias; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterImportAlias(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitImportAlias(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitImportAlias(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtImportAlias importAlias() throws RecognitionException {
KtImportAlias _localctx = new KtImportAlias(_ctx, getState());
enterRule(_localctx, 14, RULE_importAlias);
try {
enterOuterAlt(_localctx, 1);
{
setState(461);
match(AS);
setState(462);
simpleIdentifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTopLevelObject extends KotlinInnerNode {
public KtDeclaration declaration() {
return getRuleContext(KtDeclaration.class,0);
}
public KtSemis semis() {
return getRuleContext(KtSemis.class,0);
}
public KtTopLevelObject(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_topLevelObject; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTopLevelObject(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTopLevelObject(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTopLevelObject(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTopLevelObject topLevelObject() throws RecognitionException {
KtTopLevelObject _localctx = new KtTopLevelObject(_ctx, getState());
enterRule(_localctx, 16, RULE_topLevelObject);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(464);
declaration();
setState(466);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL || _la==SEMICOLON) {
{
setState(465);
semis();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeAlias extends KotlinInnerNode {
public TerminalNode TYPE_ALIAS() { return getToken(KotlinParser.TYPE_ALIAS, 0); }
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtTypeParameters typeParameters() {
return getRuleContext(KtTypeParameters.class,0);
}
public KtTypeAlias(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeAlias; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeAlias(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeAlias(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeAlias(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeAlias typeAlias() throws RecognitionException {
KtTypeAlias _localctx = new KtTypeAlias(_ctx, getState());
enterRule(_localctx, 18, RULE_typeAlias);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(469);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(468);
modifiers();
}
}
setState(471);
match(TYPE_ALIAS);
setState(475);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(472);
match(NL);
}
}
setState(477);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(478);
simpleIdentifier();
setState(486);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
case 1:
{
setState(482);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(479);
match(NL);
}
}
setState(484);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(485);
typeParameters();
}
break;
}
setState(491);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(488);
match(NL);
}
}
setState(493);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(494);
match(ASSIGNMENT);
setState(498);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(495);
match(NL);
}
}
setState(500);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(501);
type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDeclaration extends KotlinInnerNode {
public KtClassDeclaration classDeclaration() {
return getRuleContext(KtClassDeclaration.class,0);
}
public KtObjectDeclaration objectDeclaration() {
return getRuleContext(KtObjectDeclaration.class,0);
}
public KtFunctionDeclaration functionDeclaration() {
return getRuleContext(KtFunctionDeclaration.class,0);
}
public KtPropertyDeclaration propertyDeclaration() {
return getRuleContext(KtPropertyDeclaration.class,0);
}
public KtTypeAlias typeAlias() {
return getRuleContext(KtTypeAlias.class,0);
}
public KtDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_declaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDeclaration(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDeclaration declaration() throws RecognitionException {
KtDeclaration _localctx = new KtDeclaration(_ctx, getState());
enterRule(_localctx, 20, RULE_declaration);
try {
setState(508);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(503);
classDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(504);
objectDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(505);
functionDeclaration();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(506);
propertyDeclaration();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(507);
typeAlias();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtClassDeclaration extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode CLASS() { return getToken(KotlinParser.CLASS, 0); }
public TerminalNode INTERFACE() { return getToken(KotlinParser.INTERFACE, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtTypeParameters typeParameters() {
return getRuleContext(KtTypeParameters.class,0);
}
public KtPrimaryConstructor primaryConstructor() {
return getRuleContext(KtPrimaryConstructor.class,0);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtDelegationSpecifiers delegationSpecifiers() {
return getRuleContext(KtDelegationSpecifiers.class,0);
}
public KtTypeConstraints typeConstraints() {
return getRuleContext(KtTypeConstraints.class,0);
}
public KtClassBody classBody() {
return getRuleContext(KtClassBody.class,0);
}
public KtEnumClassBody enumClassBody() {
return getRuleContext(KtEnumClassBody.class,0);
}
public TerminalNode FUN() { return getToken(KotlinParser.FUN, 0); }
public KtClassDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassDeclaration classDeclaration() throws RecognitionException {
KtClassDeclaration _localctx = new KtClassDeclaration(_ctx, getState());
enterRule(_localctx, 22, RULE_classDeclaration);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(511);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(510);
modifiers();
}
}
setState(524);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CLASS:
{
setState(513);
match(CLASS);
}
break;
case INTERFACE:
case FUN:
{
setState(521);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==FUN) {
{
setState(514);
match(FUN);
setState(518);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(515);
match(NL);
}
}
setState(520);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(523);
match(INTERFACE);
}
break;
default:
throw new NoViableAltException(this);
}
setState(529);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(526);
match(NL);
}
}
setState(531);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(532);
simpleIdentifier();
setState(540);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
case 1:
{
setState(536);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(533);
match(NL);
}
}
setState(538);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(539);
typeParameters();
}
break;
}
setState(549);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
setState(545);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(542);
match(NL);
}
}
setState(547);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(548);
primaryConstructor();
}
break;
}
setState(565);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
{
setState(554);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(551);
match(NL);
}
}
setState(556);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(557);
match(COLON);
setState(561);
_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 ) {
{
{
setState(558);
match(NL);
}
}
}
setState(563);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,37,_ctx);
}
setState(564);
delegationSpecifiers();
}
break;
}
setState(574);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
case 1:
{
setState(570);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(567);
match(NL);
}
}
setState(572);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(573);
typeConstraints();
}
break;
}
setState(590);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) {
case 1:
{
setState(579);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(576);
match(NL);
}
}
setState(581);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(582);
classBody();
}
break;
case 2:
{
setState(586);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(583);
match(NL);
}
}
setState(588);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(589);
enumClassBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPrimaryConstructor extends KotlinInnerNode {
public KtClassParameters classParameters() {
return getRuleContext(KtClassParameters.class,0);
}
public TerminalNode CONSTRUCTOR() { return getToken(KotlinParser.CONSTRUCTOR, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtPrimaryConstructor(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryConstructor; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPrimaryConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPrimaryConstructor(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPrimaryConstructor(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPrimaryConstructor primaryConstructor() throws RecognitionException {
KtPrimaryConstructor _localctx = new KtPrimaryConstructor(_ctx, getState());
enterRule(_localctx, 24, RULE_primaryConstructor);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(602);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 80)) & ~0x3f) == 0 && ((1L << (_la - 80)) & ((1L << (CONSTRUCTOR - 80)) | (1L << (PUBLIC - 80)) | (1L << (PRIVATE - 80)) | (1L << (PROTECTED - 80)) | (1L << (INTERNAL - 80)) | (1L << (ENUM - 80)) | (1L << (SEALED - 80)) | (1L << (ANNOTATION - 80)) | (1L << (DATA - 80)) | (1L << (INNER - 80)) | (1L << (VALUE - 80)) | (1L << (TAILREC - 80)) | (1L << (OPERATOR - 80)) | (1L << (INLINE - 80)) | (1L << (INFIX - 80)) | (1L << (EXTERNAL - 80)) | (1L << (SUSPEND - 80)) | (1L << (OVERRIDE - 80)) | (1L << (ABSTRACT - 80)) | (1L << (FINAL - 80)) | (1L << (OPEN - 80)) | (1L << (CONST - 80)) | (1L << (LATEINIT - 80)) | (1L << (VARARG - 80)) | (1L << (NOINLINE - 80)) | (1L << (CROSSINLINE - 80)) | (1L << (EXPECT - 80)) | (1L << (ACTUAL - 80)))) != 0)) {
{
setState(593);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(592);
modifiers();
}
}
setState(595);
match(CONSTRUCTOR);
setState(599);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(596);
match(NL);
}
}
setState(601);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(604);
classParameters();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtClassBody extends KotlinInnerNode {
public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); }
public KtClassMemberDeclarations classMemberDeclarations() {
return getRuleContext(KtClassMemberDeclarations.class,0);
}
public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtClassBody(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassBody(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassBody(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassBody classBody() throws RecognitionException {
KtClassBody _localctx = new KtClassBody(_ctx, getState());
enterRule(_localctx, 26, RULE_classBody);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(606);
match(LCURL);
setState(610);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,47,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(607);
match(NL);
}
}
}
setState(612);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,47,_ctx);
}
setState(613);
classMemberDeclarations();
setState(617);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(614);
match(NL);
}
}
setState(619);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(620);
match(RCURL);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtClassParameters extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List classParameter() {
return getRuleContexts(KtClassParameter.class);
}
public KtClassParameter classParameter(int i) {
return getRuleContext(KtClassParameter.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtClassParameters(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassParameters(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassParameters(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassParameters classParameters() throws RecognitionException {
KtClassParameters _localctx = new KtClassParameters(_ctx, getState());
enterRule(_localctx, 28, RULE_classParameters);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(622);
match(LPAREN);
setState(626);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,49,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(623);
match(NL);
}
}
}
setState(628);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,49,_ctx);
}
setState(658);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) {
case 1:
{
setState(629);
classParameter();
setState(646);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,52,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(633);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(630);
match(NL);
}
}
setState(635);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(636);
match(COMMA);
setState(640);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,51,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(637);
match(NL);
}
}
}
setState(642);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,51,_ctx);
}
setState(643);
classParameter();
}
}
}
setState(648);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,52,_ctx);
}
setState(656);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) {
case 1:
{
setState(652);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(649);
match(NL);
}
}
setState(654);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(655);
match(COMMA);
}
break;
}
}
break;
}
setState(663);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(660);
match(NL);
}
}
setState(665);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(666);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtClassParameter extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public TerminalNode VAL() { return getToken(KotlinParser.VAL, 0); }
public TerminalNode VAR() { return getToken(KotlinParser.VAR, 0); }
public KtClassParameter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassParameter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassParameter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassParameter classParameter() throws RecognitionException {
KtClassParameter _localctx = new KtClassParameter(_ctx, getState());
enterRule(_localctx, 30, RULE_classParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(669);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) {
case 1:
{
setState(668);
modifiers();
}
break;
}
setState(672);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==VAL || _la==VAR) {
{
setState(671);
_la = _input.LA(1);
if ( !(_la==VAL || _la==VAR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(677);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(674);
match(NL);
}
}
setState(679);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(680);
simpleIdentifier();
setState(681);
match(COLON);
setState(685);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(682);
match(NL);
}
}
setState(687);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(688);
type();
setState(703);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) {
case 1:
{
setState(692);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(689);
match(NL);
}
}
setState(694);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(695);
match(ASSIGNMENT);
setState(699);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(696);
match(NL);
}
}
setState(701);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(702);
expression();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDelegationSpecifiers extends KotlinInnerNode {
public List annotatedDelegationSpecifier() {
return getRuleContexts(KtAnnotatedDelegationSpecifier.class);
}
public KtAnnotatedDelegationSpecifier annotatedDelegationSpecifier(int i) {
return getRuleContext(KtAnnotatedDelegationSpecifier.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtDelegationSpecifiers(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_delegationSpecifiers; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDelegationSpecifiers(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDelegationSpecifiers(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDelegationSpecifiers(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDelegationSpecifiers delegationSpecifiers() throws RecognitionException {
KtDelegationSpecifiers _localctx = new KtDelegationSpecifiers(_ctx, getState());
enterRule(_localctx, 32, RULE_delegationSpecifiers);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(705);
annotatedDelegationSpecifier();
setState(722);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,66,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(709);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(706);
match(NL);
}
}
setState(711);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(712);
match(COMMA);
setState(716);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,65,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(713);
match(NL);
}
}
}
setState(718);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,65,_ctx);
}
setState(719);
annotatedDelegationSpecifier();
}
}
}
setState(724);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,66,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDelegationSpecifier extends KotlinInnerNode {
public KtConstructorInvocation constructorInvocation() {
return getRuleContext(KtConstructorInvocation.class,0);
}
public KtExplicitDelegation explicitDelegation() {
return getRuleContext(KtExplicitDelegation.class,0);
}
public KtUserType userType() {
return getRuleContext(KtUserType.class,0);
}
public KtFunctionType functionType() {
return getRuleContext(KtFunctionType.class,0);
}
public TerminalNode SUSPEND() { return getToken(KotlinParser.SUSPEND, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtDelegationSpecifier(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_delegationSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDelegationSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDelegationSpecifier(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDelegationSpecifier(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDelegationSpecifier delegationSpecifier() throws RecognitionException {
KtDelegationSpecifier _localctx = new KtDelegationSpecifier(_ctx, getState());
enterRule(_localctx, 34, RULE_delegationSpecifier);
int _la;
try {
setState(737);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(725);
constructorInvocation();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(726);
explicitDelegation();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(727);
userType();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(728);
functionType();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(729);
match(SUSPEND);
setState(733);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(730);
match(NL);
}
}
setState(735);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(736);
functionType();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtConstructorInvocation extends KotlinInnerNode {
public KtUserType userType() {
return getRuleContext(KtUserType.class,0);
}
public KtValueArguments valueArguments() {
return getRuleContext(KtValueArguments.class,0);
}
public KtConstructorInvocation(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorInvocation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterConstructorInvocation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitConstructorInvocation(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitConstructorInvocation(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtConstructorInvocation constructorInvocation() throws RecognitionException {
KtConstructorInvocation _localctx = new KtConstructorInvocation(_ctx, getState());
enterRule(_localctx, 36, RULE_constructorInvocation);
try {
enterOuterAlt(_localctx, 1);
{
setState(739);
userType();
setState(740);
valueArguments();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAnnotatedDelegationSpecifier extends KotlinInnerNode {
public KtDelegationSpecifier delegationSpecifier() {
return getRuleContext(KtDelegationSpecifier.class,0);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAnnotatedDelegationSpecifier(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotatedDelegationSpecifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAnnotatedDelegationSpecifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAnnotatedDelegationSpecifier(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAnnotatedDelegationSpecifier(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAnnotatedDelegationSpecifier annotatedDelegationSpecifier() throws RecognitionException {
KtAnnotatedDelegationSpecifier _localctx = new KtAnnotatedDelegationSpecifier(_ctx, getState());
enterRule(_localctx, 38, RULE_annotatedDelegationSpecifier);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(745);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,69,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(742);
annotation();
}
}
}
setState(747);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,69,_ctx);
}
setState(751);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(748);
match(NL);
}
}
setState(753);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(754);
delegationSpecifier();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtExplicitDelegation extends KotlinInnerNode {
public TerminalNode BY() { return getToken(KotlinParser.BY, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public KtUserType userType() {
return getRuleContext(KtUserType.class,0);
}
public KtFunctionType functionType() {
return getRuleContext(KtFunctionType.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtExplicitDelegation(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_explicitDelegation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterExplicitDelegation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitExplicitDelegation(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitExplicitDelegation(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtExplicitDelegation explicitDelegation() throws RecognitionException {
KtExplicitDelegation _localctx = new KtExplicitDelegation(_ctx, getState());
enterRule(_localctx, 40, RULE_explicitDelegation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(758);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) {
case 1:
{
setState(756);
userType();
}
break;
case 2:
{
setState(757);
functionType();
}
break;
}
setState(763);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(760);
match(NL);
}
}
setState(765);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(766);
match(BY);
setState(770);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(767);
match(NL);
}
}
setState(772);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(773);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeParameters extends KotlinInnerNode {
public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); }
public List typeParameter() {
return getRuleContexts(KtTypeParameter.class);
}
public KtTypeParameter typeParameter(int i) {
return getRuleContext(KtTypeParameter.class,i);
}
public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtTypeParameters(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeParameters(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeParameters(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeParameters typeParameters() throws RecognitionException {
KtTypeParameters _localctx = new KtTypeParameters(_ctx, getState());
enterRule(_localctx, 42, RULE_typeParameters);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(775);
match(LANGLE);
setState(779);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,74,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(776);
match(NL);
}
}
}
setState(781);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,74,_ctx);
}
setState(782);
typeParameter();
setState(799);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,77,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(786);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(783);
match(NL);
}
}
setState(788);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(789);
match(COMMA);
setState(793);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,76,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(790);
match(NL);
}
}
}
setState(795);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,76,_ctx);
}
setState(796);
typeParameter();
}
}
}
setState(801);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,77,_ctx);
}
setState(809);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) {
case 1:
{
setState(805);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(802);
match(NL);
}
}
setState(807);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(808);
match(COMMA);
}
break;
}
setState(814);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(811);
match(NL);
}
}
setState(816);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(817);
match(RANGLE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeParameter extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtTypeParameterModifiers typeParameterModifiers() {
return getRuleContext(KtTypeParameterModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtTypeParameter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeParameter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeParameter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeParameter typeParameter() throws RecognitionException {
KtTypeParameter _localctx = new KtTypeParameter(_ctx, getState());
enterRule(_localctx, 44, RULE_typeParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(820);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
{
setState(819);
typeParameterModifiers();
}
break;
}
setState(825);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(822);
match(NL);
}
}
setState(827);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(828);
simpleIdentifier();
setState(843);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) {
case 1:
{
setState(832);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(829);
match(NL);
}
}
setState(834);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(835);
match(COLON);
setState(839);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(836);
match(NL);
}
}
setState(841);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(842);
type();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeConstraints extends KotlinInnerNode {
public TerminalNode WHERE() { return getToken(KotlinParser.WHERE, 0); }
public List typeConstraint() {
return getRuleContexts(KtTypeConstraint.class);
}
public KtTypeConstraint typeConstraint(int i) {
return getRuleContext(KtTypeConstraint.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtTypeConstraints(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeConstraints; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeConstraints(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeConstraints(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeConstraints(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeConstraints typeConstraints() throws RecognitionException {
KtTypeConstraints _localctx = new KtTypeConstraints(_ctx, getState());
enterRule(_localctx, 46, RULE_typeConstraints);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(845);
match(WHERE);
setState(849);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(846);
match(NL);
}
}
setState(851);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(852);
typeConstraint();
setState(869);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,89,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(856);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(853);
match(NL);
}
}
setState(858);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(859);
match(COMMA);
setState(863);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(860);
match(NL);
}
}
setState(865);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(866);
typeConstraint();
}
}
}
setState(871);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,89,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeConstraint extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtTypeConstraint(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeConstraint; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeConstraint(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeConstraint(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeConstraint(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeConstraint typeConstraint() throws RecognitionException {
KtTypeConstraint _localctx = new KtTypeConstraint(_ctx, getState());
enterRule(_localctx, 48, RULE_typeConstraint);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(875);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT_NO_WS || _la==AT_PRE_WS) {
{
{
setState(872);
annotation();
}
}
setState(877);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(878);
simpleIdentifier();
setState(882);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(879);
match(NL);
}
}
setState(884);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(885);
match(COLON);
setState(889);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(886);
match(NL);
}
}
setState(891);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(892);
type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtClassMemberDeclarations extends KotlinInnerNode {
public List classMemberDeclaration() {
return getRuleContexts(KtClassMemberDeclaration.class);
}
public KtClassMemberDeclaration classMemberDeclaration(int i) {
return getRuleContext(KtClassMemberDeclaration.class,i);
}
public List semis() {
return getRuleContexts(KtSemis.class);
}
public KtSemis semis(int i) {
return getRuleContext(KtSemis.class,i);
}
public KtClassMemberDeclarations(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classMemberDeclarations; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassMemberDeclarations(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassMemberDeclarations(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassMemberDeclarations(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassMemberDeclarations classMemberDeclarations() throws RecognitionException {
KtClassMemberDeclarations _localctx = new KtClassMemberDeclarations(_ctx, getState());
enterRule(_localctx, 50, RULE_classMemberDeclarations);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(900);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 73)) & ~0x3f) == 0 && ((1L << (_la - 73)) & ((1L << (CLASS - 73)) | (1L << (INTERFACE - 73)) | (1L << (FUN - 73)) | (1L << (OBJECT - 73)) | (1L << (VAL - 73)) | (1L << (VAR - 73)) | (1L << (TYPE_ALIAS - 73)) | (1L << (CONSTRUCTOR - 73)) | (1L << (COMPANION - 73)) | (1L << (INIT - 73)) | (1L << (PUBLIC - 73)) | (1L << (PRIVATE - 73)) | (1L << (PROTECTED - 73)) | (1L << (INTERNAL - 73)) | (1L << (ENUM - 73)) | (1L << (SEALED - 73)) | (1L << (ANNOTATION - 73)) | (1L << (DATA - 73)) | (1L << (INNER - 73)) | (1L << (VALUE - 73)) | (1L << (TAILREC - 73)) | (1L << (OPERATOR - 73)) | (1L << (INLINE - 73)) | (1L << (INFIX - 73)) | (1L << (EXTERNAL - 73)) | (1L << (SUSPEND - 73)) | (1L << (OVERRIDE - 73)) | (1L << (ABSTRACT - 73)) | (1L << (FINAL - 73)) | (1L << (OPEN - 73)) | (1L << (CONST - 73)) | (1L << (LATEINIT - 73)) | (1L << (VARARG - 73)) | (1L << (NOINLINE - 73)) | (1L << (CROSSINLINE - 73)) | (1L << (EXPECT - 73)) | (1L << (ACTUAL - 73)))) != 0)) {
{
{
setState(894);
classMemberDeclaration();
setState(896);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
case 1:
{
setState(895);
semis();
}
break;
}
}
}
setState(902);
_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 KtClassMemberDeclaration extends KotlinInnerNode {
public KtDeclaration declaration() {
return getRuleContext(KtDeclaration.class,0);
}
public KtCompanionObject companionObject() {
return getRuleContext(KtCompanionObject.class,0);
}
public KtAnonymousInitializer anonymousInitializer() {
return getRuleContext(KtAnonymousInitializer.class,0);
}
public KtSecondaryConstructor secondaryConstructor() {
return getRuleContext(KtSecondaryConstructor.class,0);
}
public KtClassMemberDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classMemberDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterClassMemberDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitClassMemberDeclaration(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitClassMemberDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtClassMemberDeclaration classMemberDeclaration() throws RecognitionException {
KtClassMemberDeclaration _localctx = new KtClassMemberDeclaration(_ctx, getState());
enterRule(_localctx, 52, RULE_classMemberDeclaration);
try {
setState(907);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(903);
declaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(904);
companionObject();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(905);
anonymousInitializer();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(906);
secondaryConstructor();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAnonymousInitializer extends KotlinInnerNode {
public TerminalNode INIT() { return getToken(KotlinParser.INIT, 0); }
public KtBlock block() {
return getRuleContext(KtBlock.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAnonymousInitializer(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_anonymousInitializer; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAnonymousInitializer(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAnonymousInitializer(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAnonymousInitializer(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAnonymousInitializer anonymousInitializer() throws RecognitionException {
KtAnonymousInitializer _localctx = new KtAnonymousInitializer(_ctx, getState());
enterRule(_localctx, 54, RULE_anonymousInitializer);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(909);
match(INIT);
setState(913);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(910);
match(NL);
}
}
setState(915);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(916);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtCompanionObject extends KotlinInnerNode {
public TerminalNode COMPANION() { return getToken(KotlinParser.COMPANION, 0); }
public TerminalNode OBJECT() { return getToken(KotlinParser.OBJECT, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtDelegationSpecifiers delegationSpecifiers() {
return getRuleContext(KtDelegationSpecifiers.class,0);
}
public KtClassBody classBody() {
return getRuleContext(KtClassBody.class,0);
}
public KtCompanionObject(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_companionObject; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterCompanionObject(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitCompanionObject(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitCompanionObject(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtCompanionObject companionObject() throws RecognitionException {
KtCompanionObject _localctx = new KtCompanionObject(_ctx, getState());
enterRule(_localctx, 56, RULE_companionObject);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(919);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(918);
modifiers();
}
}
setState(921);
match(COMPANION);
setState(925);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(922);
match(NL);
}
}
setState(927);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(928);
match(OBJECT);
setState(936);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) {
case 1:
{
setState(932);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(929);
match(NL);
}
}
setState(934);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(935);
simpleIdentifier();
}
break;
}
setState(952);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) {
case 1:
{
setState(941);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(938);
match(NL);
}
}
setState(943);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(944);
match(COLON);
setState(948);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,102,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(945);
match(NL);
}
}
}
setState(950);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,102,_ctx);
}
setState(951);
delegationSpecifiers();
}
break;
}
setState(961);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) {
case 1:
{
setState(957);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(954);
match(NL);
}
}
setState(959);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(960);
classBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionValueParameters extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List functionValueParameter() {
return getRuleContexts(KtFunctionValueParameter.class);
}
public KtFunctionValueParameter functionValueParameter(int i) {
return getRuleContext(KtFunctionValueParameter.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtFunctionValueParameters(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionValueParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionValueParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionValueParameters(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionValueParameters(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionValueParameters functionValueParameters() throws RecognitionException {
KtFunctionValueParameters _localctx = new KtFunctionValueParameters(_ctx, getState());
enterRule(_localctx, 58, RULE_functionValueParameters);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(963);
match(LPAREN);
setState(967);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,106,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(964);
match(NL);
}
}
}
setState(969);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,106,_ctx);
}
setState(999);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT_NO_WS - 40)) | (1L << (AT_PRE_WS - 40)) | (1L << (FILE - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)))) != 0) || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & ((1L << (OUT - 106)) | (1L << (DYNAMIC - 106)) | (1L << (PUBLIC - 106)) | (1L << (PRIVATE - 106)) | (1L << (PROTECTED - 106)) | (1L << (INTERNAL - 106)) | (1L << (ENUM - 106)) | (1L << (SEALED - 106)) | (1L << (ANNOTATION - 106)) | (1L << (DATA - 106)) | (1L << (INNER - 106)) | (1L << (VALUE - 106)) | (1L << (TAILREC - 106)) | (1L << (OPERATOR - 106)) | (1L << (INLINE - 106)) | (1L << (INFIX - 106)) | (1L << (EXTERNAL - 106)) | (1L << (SUSPEND - 106)) | (1L << (OVERRIDE - 106)) | (1L << (ABSTRACT - 106)) | (1L << (FINAL - 106)) | (1L << (OPEN - 106)) | (1L << (CONST - 106)) | (1L << (LATEINIT - 106)) | (1L << (VARARG - 106)) | (1L << (NOINLINE - 106)) | (1L << (CROSSINLINE - 106)) | (1L << (REIFIED - 106)) | (1L << (EXPECT - 106)) | (1L << (ACTUAL - 106)) | (1L << (Identifier - 106)))) != 0)) {
{
setState(970);
functionValueParameter();
setState(987);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,109,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(974);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(971);
match(NL);
}
}
setState(976);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(977);
match(COMMA);
setState(981);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(978);
match(NL);
}
}
setState(983);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(984);
functionValueParameter();
}
}
}
setState(989);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,109,_ctx);
}
setState(997);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,111,_ctx) ) {
case 1:
{
setState(993);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(990);
match(NL);
}
}
setState(995);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(996);
match(COMMA);
}
break;
}
}
}
setState(1004);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1001);
match(NL);
}
}
setState(1006);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1007);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionValueParameter extends KotlinInnerNode {
public KtParameter parameter() {
return getRuleContext(KtParameter.class,0);
}
public KtParameterModifiers parameterModifiers() {
return getRuleContext(KtParameterModifiers.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtFunctionValueParameter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionValueParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionValueParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionValueParameter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionValueParameter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionValueParameter functionValueParameter() throws RecognitionException {
KtFunctionValueParameter _localctx = new KtFunctionValueParameter(_ctx, getState());
enterRule(_localctx, 60, RULE_functionValueParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1010);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) {
case 1:
{
setState(1009);
parameterModifiers();
}
break;
}
setState(1012);
parameter();
setState(1027);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) {
case 1:
{
setState(1016);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1013);
match(NL);
}
}
setState(1018);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1019);
match(ASSIGNMENT);
setState(1023);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1020);
match(NL);
}
}
setState(1025);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1026);
expression();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionDeclaration extends KotlinInnerNode {
public TerminalNode FUN() { return getToken(KotlinParser.FUN, 0); }
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtFunctionValueParameters functionValueParameters() {
return getRuleContext(KtFunctionValueParameters.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public KtTypeParameters typeParameters() {
return getRuleContext(KtTypeParameters.class,0);
}
public KtReceiverType receiverType() {
return getRuleContext(KtReceiverType.class,0);
}
public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtTypeConstraints typeConstraints() {
return getRuleContext(KtTypeConstraints.class,0);
}
public KtFunctionBody functionBody() {
return getRuleContext(KtFunctionBody.class,0);
}
public KtFunctionDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionDeclaration functionDeclaration() throws RecognitionException {
KtFunctionDeclaration _localctx = new KtFunctionDeclaration(_ctx, getState());
enterRule(_localctx, 62, RULE_functionDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1030);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1029);
modifiers();
}
}
setState(1032);
match(FUN);
setState(1040);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) {
case 1:
{
setState(1036);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1033);
match(NL);
}
}
setState(1038);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1039);
typeParameters();
}
break;
}
setState(1057);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) {
case 1:
{
setState(1045);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1042);
match(NL);
}
}
setState(1047);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1048);
receiverType();
setState(1052);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1049);
match(NL);
}
}
setState(1054);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1055);
match(DOT);
}
break;
}
setState(1062);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1059);
match(NL);
}
}
setState(1064);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1065);
simpleIdentifier();
setState(1069);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1066);
match(NL);
}
}
setState(1071);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1072);
functionValueParameters();
setState(1087);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,128,_ctx) ) {
case 1:
{
setState(1076);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1073);
match(NL);
}
}
setState(1078);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1079);
match(COLON);
setState(1083);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1080);
match(NL);
}
}
setState(1085);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1086);
type();
}
break;
}
setState(1096);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) {
case 1:
{
setState(1092);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1089);
match(NL);
}
}
setState(1094);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1095);
typeConstraints();
}
break;
}
setState(1105);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,132,_ctx) ) {
case 1:
{
setState(1101);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1098);
match(NL);
}
}
setState(1103);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1104);
functionBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionBody extends KotlinInnerNode {
public KtBlock block() {
return getRuleContext(KtBlock.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtFunctionBody(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionBody(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionBody(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionBody functionBody() throws RecognitionException {
KtFunctionBody _localctx = new KtFunctionBody(_ctx, getState());
enterRule(_localctx, 64, RULE_functionBody);
int _la;
try {
setState(1116);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LCURL:
enterOuterAlt(_localctx, 1);
{
setState(1107);
block();
}
break;
case ASSIGNMENT:
enterOuterAlt(_localctx, 2);
{
setState(1108);
match(ASSIGNMENT);
setState(1112);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1109);
match(NL);
}
}
setState(1114);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1115);
expression();
}
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 KtVariableDeclaration extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtVariableDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_variableDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterVariableDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitVariableDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitVariableDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtVariableDeclaration variableDeclaration() throws RecognitionException {
KtVariableDeclaration _localctx = new KtVariableDeclaration(_ctx, getState());
enterRule(_localctx, 66, RULE_variableDeclaration);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1121);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT_NO_WS || _la==AT_PRE_WS) {
{
{
setState(1118);
annotation();
}
}
setState(1123);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1127);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1124);
match(NL);
}
}
setState(1129);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1130);
simpleIdentifier();
setState(1145);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,139,_ctx) ) {
case 1:
{
setState(1134);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1131);
match(NL);
}
}
setState(1136);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1137);
match(COLON);
setState(1141);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1138);
match(NL);
}
}
setState(1143);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1144);
type();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtMultiVariableDeclaration extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public List variableDeclaration() {
return getRuleContexts(KtVariableDeclaration.class);
}
public KtVariableDeclaration variableDeclaration(int i) {
return getRuleContext(KtVariableDeclaration.class,i);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtMultiVariableDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiVariableDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterMultiVariableDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitMultiVariableDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitMultiVariableDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtMultiVariableDeclaration multiVariableDeclaration() throws RecognitionException {
KtMultiVariableDeclaration _localctx = new KtMultiVariableDeclaration(_ctx, getState());
enterRule(_localctx, 68, RULE_multiVariableDeclaration);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1147);
match(LPAREN);
setState(1151);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,140,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1148);
match(NL);
}
}
}
setState(1153);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,140,_ctx);
}
setState(1154);
variableDeclaration();
setState(1171);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,143,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1158);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1155);
match(NL);
}
}
setState(1160);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1161);
match(COMMA);
setState(1165);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,142,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1162);
match(NL);
}
}
}
setState(1167);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,142,_ctx);
}
setState(1168);
variableDeclaration();
}
}
}
setState(1173);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,143,_ctx);
}
setState(1181);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) {
case 1:
{
setState(1177);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1174);
match(NL);
}
}
setState(1179);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1180);
match(COMMA);
}
break;
}
setState(1186);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1183);
match(NL);
}
}
setState(1188);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1189);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPropertyDeclaration extends KotlinInnerNode {
public TerminalNode VAL() { return getToken(KotlinParser.VAL, 0); }
public TerminalNode VAR() { return getToken(KotlinParser.VAR, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public KtTypeParameters typeParameters() {
return getRuleContext(KtTypeParameters.class,0);
}
public KtReceiverType receiverType() {
return getRuleContext(KtReceiverType.class,0);
}
public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); }
public KtTypeConstraints typeConstraints() {
return getRuleContext(KtTypeConstraints.class,0);
}
public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtMultiVariableDeclaration multiVariableDeclaration() {
return getRuleContext(KtMultiVariableDeclaration.class,0);
}
public KtVariableDeclaration variableDeclaration() {
return getRuleContext(KtVariableDeclaration.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public KtPropertyDelegate propertyDelegate() {
return getRuleContext(KtPropertyDelegate.class,0);
}
public KtGetter getter() {
return getRuleContext(KtGetter.class,0);
}
public KtSetter setter() {
return getRuleContext(KtSetter.class,0);
}
public KtSemi semi() {
return getRuleContext(KtSemi.class,0);
}
public KtPropertyDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_propertyDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPropertyDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPropertyDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPropertyDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPropertyDeclaration propertyDeclaration() throws RecognitionException {
KtPropertyDeclaration _localctx = new KtPropertyDeclaration(_ctx, getState());
enterRule(_localctx, 70, RULE_propertyDeclaration);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1192);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1191);
modifiers();
}
}
setState(1194);
_la = _input.LA(1);
if ( !(_la==VAL || _la==VAR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1202);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,149,_ctx) ) {
case 1:
{
setState(1198);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1195);
match(NL);
}
}
setState(1200);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1201);
typeParameters();
}
break;
}
setState(1219);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,152,_ctx) ) {
case 1:
{
setState(1207);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1204);
match(NL);
}
}
setState(1209);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1210);
receiverType();
setState(1214);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1211);
match(NL);
}
}
setState(1216);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1217);
match(DOT);
}
break;
}
{
setState(1224);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,153,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1221);
match(NL);
}
}
}
setState(1226);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,153,_ctx);
}
setState(1229);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LPAREN:
{
setState(1227);
multiVariableDeclaration();
}
break;
case NL:
case AT_NO_WS:
case AT_PRE_WS:
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1228);
variableDeclaration();
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(1238);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,156,_ctx) ) {
case 1:
{
setState(1234);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1231);
match(NL);
}
}
setState(1236);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1237);
typeConstraints();
}
break;
}
setState(1257);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,160,_ctx) ) {
case 1:
{
setState(1243);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1240);
match(NL);
}
}
setState(1245);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1255);
_errHandler.sync(this);
switch (_input.LA(1)) {
case ASSIGNMENT:
{
setState(1246);
match(ASSIGNMENT);
setState(1250);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1247);
match(NL);
}
}
setState(1252);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1253);
expression();
}
break;
case BY:
{
setState(1254);
propertyDelegate();
}
break;
default:
throw new NoViableAltException(this);
}
}
break;
}
setState(1265);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,162,_ctx) ) {
case 1:
{
setState(1260);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1259);
match(NL);
}
}
setState(1262);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==NL );
setState(1264);
match(SEMICOLON);
}
break;
}
setState(1270);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,163,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1267);
match(NL);
}
}
}
setState(1272);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,163,_ctx);
}
setState(1303);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) {
case 1:
{
setState(1274);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,164,_ctx) ) {
case 1:
{
setState(1273);
getter();
}
break;
}
setState(1286);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,167,_ctx) ) {
case 1:
{
setState(1279);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,165,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1276);
match(NL);
}
}
}
setState(1281);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,165,_ctx);
}
setState(1283);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL || _la==SEMICOLON) {
{
setState(1282);
semi();
}
}
setState(1285);
setter();
}
break;
}
}
break;
case 2:
{
setState(1289);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,168,_ctx) ) {
case 1:
{
setState(1288);
setter();
}
break;
}
setState(1301);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,171,_ctx) ) {
case 1:
{
setState(1294);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,169,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1291);
match(NL);
}
}
}
setState(1296);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,169,_ctx);
}
setState(1298);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL || _la==SEMICOLON) {
{
setState(1297);
semi();
}
}
setState(1300);
getter();
}
break;
}
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPropertyDelegate extends KotlinInnerNode {
public TerminalNode BY() { return getToken(KotlinParser.BY, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtPropertyDelegate(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_propertyDelegate; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPropertyDelegate(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPropertyDelegate(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPropertyDelegate(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPropertyDelegate propertyDelegate() throws RecognitionException {
KtPropertyDelegate _localctx = new KtPropertyDelegate(_ctx, getState());
enterRule(_localctx, 72, RULE_propertyDelegate);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1305);
match(BY);
setState(1309);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1306);
match(NL);
}
}
setState(1311);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1312);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtGetter extends KotlinInnerNode {
public TerminalNode GET() { return getToken(KotlinParser.GET, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public KtFunctionBody functionBody() {
return getRuleContext(KtFunctionBody.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtGetter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_getter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterGetter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitGetter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitGetter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtGetter getter() throws RecognitionException {
KtGetter _localctx = new KtGetter(_ctx, getState());
enterRule(_localctx, 74, RULE_getter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1315);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1314);
modifiers();
}
}
setState(1317);
match(GET);
setState(1355);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,181,_ctx) ) {
case 1:
{
setState(1321);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1318);
match(NL);
}
}
setState(1323);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1324);
match(LPAREN);
setState(1328);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1325);
match(NL);
}
}
setState(1330);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1331);
match(RPAREN);
setState(1346);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,179,_ctx) ) {
case 1:
{
setState(1335);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1332);
match(NL);
}
}
setState(1337);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1338);
match(COLON);
setState(1342);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1339);
match(NL);
}
}
setState(1344);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1345);
type();
}
break;
}
setState(1351);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1348);
match(NL);
}
}
setState(1353);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1354);
functionBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtSetter extends KotlinInnerNode {
public TerminalNode SET() { return getToken(KotlinParser.SET, 0); }
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtFunctionValueParameterWithOptionalType functionValueParameterWithOptionalType() {
return getRuleContext(KtFunctionValueParameterWithOptionalType.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public KtFunctionBody functionBody() {
return getRuleContext(KtFunctionBody.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COMMA() { return getToken(KotlinParser.COMMA, 0); }
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtSetter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_setter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterSetter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitSetter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitSetter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtSetter setter() throws RecognitionException {
KtSetter _localctx = new KtSetter(_ctx, getState());
enterRule(_localctx, 76, RULE_setter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1358);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1357);
modifiers();
}
}
setState(1360);
match(SET);
setState(1415);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) {
case 1:
{
setState(1364);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1361);
match(NL);
}
}
setState(1366);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1367);
match(LPAREN);
setState(1371);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1368);
match(NL);
}
}
setState(1373);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1374);
functionValueParameterWithOptionalType();
setState(1382);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,186,_ctx) ) {
case 1:
{
setState(1378);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1375);
match(NL);
}
}
setState(1380);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1381);
match(COMMA);
}
break;
}
setState(1387);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1384);
match(NL);
}
}
setState(1389);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1390);
match(RPAREN);
setState(1405);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,190,_ctx) ) {
case 1:
{
setState(1394);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1391);
match(NL);
}
}
setState(1396);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1397);
match(COLON);
setState(1401);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1398);
match(NL);
}
}
setState(1403);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1404);
type();
}
break;
}
setState(1410);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1407);
match(NL);
}
}
setState(1412);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1413);
functionBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParametersWithOptionalType extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List functionValueParameterWithOptionalType() {
return getRuleContexts(KtFunctionValueParameterWithOptionalType.class);
}
public KtFunctionValueParameterWithOptionalType functionValueParameterWithOptionalType(int i) {
return getRuleContext(KtFunctionValueParameterWithOptionalType.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtParametersWithOptionalType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parametersWithOptionalType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParametersWithOptionalType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParametersWithOptionalType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParametersWithOptionalType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParametersWithOptionalType parametersWithOptionalType() throws RecognitionException {
KtParametersWithOptionalType _localctx = new KtParametersWithOptionalType(_ctx, getState());
enterRule(_localctx, 78, RULE_parametersWithOptionalType);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1417);
match(LPAREN);
setState(1421);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1418);
match(NL);
}
}
}
setState(1423);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
}
setState(1453);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT_NO_WS - 40)) | (1L << (AT_PRE_WS - 40)) | (1L << (FILE - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)))) != 0) || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & ((1L << (OUT - 106)) | (1L << (DYNAMIC - 106)) | (1L << (PUBLIC - 106)) | (1L << (PRIVATE - 106)) | (1L << (PROTECTED - 106)) | (1L << (INTERNAL - 106)) | (1L << (ENUM - 106)) | (1L << (SEALED - 106)) | (1L << (ANNOTATION - 106)) | (1L << (DATA - 106)) | (1L << (INNER - 106)) | (1L << (VALUE - 106)) | (1L << (TAILREC - 106)) | (1L << (OPERATOR - 106)) | (1L << (INLINE - 106)) | (1L << (INFIX - 106)) | (1L << (EXTERNAL - 106)) | (1L << (SUSPEND - 106)) | (1L << (OVERRIDE - 106)) | (1L << (ABSTRACT - 106)) | (1L << (FINAL - 106)) | (1L << (OPEN - 106)) | (1L << (CONST - 106)) | (1L << (LATEINIT - 106)) | (1L << (VARARG - 106)) | (1L << (NOINLINE - 106)) | (1L << (CROSSINLINE - 106)) | (1L << (REIFIED - 106)) | (1L << (EXPECT - 106)) | (1L << (ACTUAL - 106)) | (1L << (Identifier - 106)))) != 0)) {
{
setState(1424);
functionValueParameterWithOptionalType();
setState(1441);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,196,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1428);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1425);
match(NL);
}
}
setState(1430);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1431);
match(COMMA);
setState(1435);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1432);
match(NL);
}
}
setState(1437);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1438);
functionValueParameterWithOptionalType();
}
}
}
setState(1443);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,196,_ctx);
}
setState(1451);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,198,_ctx) ) {
case 1:
{
setState(1447);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1444);
match(NL);
}
}
setState(1449);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1450);
match(COMMA);
}
break;
}
}
}
setState(1458);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1455);
match(NL);
}
}
setState(1460);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1461);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionValueParameterWithOptionalType extends KotlinInnerNode {
public KtParameterWithOptionalType parameterWithOptionalType() {
return getRuleContext(KtParameterWithOptionalType.class,0);
}
public KtParameterModifiers parameterModifiers() {
return getRuleContext(KtParameterModifiers.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtFunctionValueParameterWithOptionalType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionValueParameterWithOptionalType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionValueParameterWithOptionalType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionValueParameterWithOptionalType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionValueParameterWithOptionalType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionValueParameterWithOptionalType functionValueParameterWithOptionalType() throws RecognitionException {
KtFunctionValueParameterWithOptionalType _localctx = new KtFunctionValueParameterWithOptionalType(_ctx, getState());
enterRule(_localctx, 80, RULE_functionValueParameterWithOptionalType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1464);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) {
case 1:
{
setState(1463);
parameterModifiers();
}
break;
}
setState(1466);
parameterWithOptionalType();
setState(1481);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,204,_ctx) ) {
case 1:
{
setState(1470);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1467);
match(NL);
}
}
setState(1472);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1473);
match(ASSIGNMENT);
setState(1477);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1474);
match(NL);
}
}
setState(1479);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1480);
expression();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParameterWithOptionalType extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtParameterWithOptionalType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameterWithOptionalType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParameterWithOptionalType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParameterWithOptionalType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParameterWithOptionalType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParameterWithOptionalType parameterWithOptionalType() throws RecognitionException {
KtParameterWithOptionalType _localctx = new KtParameterWithOptionalType(_ctx, getState());
enterRule(_localctx, 82, RULE_parameterWithOptionalType);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1483);
simpleIdentifier();
setState(1487);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,205,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1484);
match(NL);
}
}
}
setState(1489);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,205,_ctx);
}
setState(1498);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COLON) {
{
setState(1490);
match(COLON);
setState(1494);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1491);
match(NL);
}
}
setState(1496);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1497);
type();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParameter extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParameter(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParameter(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParameter(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParameter parameter() throws RecognitionException {
KtParameter _localctx = new KtParameter(_ctx, getState());
enterRule(_localctx, 84, RULE_parameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1500);
simpleIdentifier();
setState(1504);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1501);
match(NL);
}
}
setState(1506);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1507);
match(COLON);
setState(1511);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1508);
match(NL);
}
}
setState(1513);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1514);
type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtObjectDeclaration extends KotlinInnerNode {
public TerminalNode OBJECT() { return getToken(KotlinParser.OBJECT, 0); }
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtDelegationSpecifiers delegationSpecifiers() {
return getRuleContext(KtDelegationSpecifiers.class,0);
}
public KtClassBody classBody() {
return getRuleContext(KtClassBody.class,0);
}
public KtObjectDeclaration(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_objectDeclaration; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterObjectDeclaration(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitObjectDeclaration(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitObjectDeclaration(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtObjectDeclaration objectDeclaration() throws RecognitionException {
KtObjectDeclaration _localctx = new KtObjectDeclaration(_ctx, getState());
enterRule(_localctx, 86, RULE_objectDeclaration);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1517);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1516);
modifiers();
}
}
setState(1519);
match(OBJECT);
setState(1523);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1520);
match(NL);
}
}
setState(1525);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1526);
simpleIdentifier();
setState(1541);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,214,_ctx) ) {
case 1:
{
setState(1530);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1527);
match(NL);
}
}
setState(1532);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1533);
match(COLON);
setState(1537);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,213,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1534);
match(NL);
}
}
}
setState(1539);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,213,_ctx);
}
setState(1540);
delegationSpecifiers();
}
break;
}
setState(1550);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,216,_ctx) ) {
case 1:
{
setState(1546);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1543);
match(NL);
}
}
setState(1548);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1549);
classBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtSecondaryConstructor extends KotlinInnerNode {
public TerminalNode CONSTRUCTOR() { return getToken(KotlinParser.CONSTRUCTOR, 0); }
public KtFunctionValueParameters functionValueParameters() {
return getRuleContext(KtFunctionValueParameters.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtConstructorDelegationCall constructorDelegationCall() {
return getRuleContext(KtConstructorDelegationCall.class,0);
}
public KtBlock block() {
return getRuleContext(KtBlock.class,0);
}
public KtSecondaryConstructor(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_secondaryConstructor; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterSecondaryConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitSecondaryConstructor(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitSecondaryConstructor(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtSecondaryConstructor secondaryConstructor() throws RecognitionException {
KtSecondaryConstructor _localctx = new KtSecondaryConstructor(_ctx, getState());
enterRule(_localctx, 88, RULE_secondaryConstructor);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1553);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AT_NO_WS || _la==AT_PRE_WS || ((((_la - 108)) & ~0x3f) == 0 && ((1L << (_la - 108)) & ((1L << (PUBLIC - 108)) | (1L << (PRIVATE - 108)) | (1L << (PROTECTED - 108)) | (1L << (INTERNAL - 108)) | (1L << (ENUM - 108)) | (1L << (SEALED - 108)) | (1L << (ANNOTATION - 108)) | (1L << (DATA - 108)) | (1L << (INNER - 108)) | (1L << (VALUE - 108)) | (1L << (TAILREC - 108)) | (1L << (OPERATOR - 108)) | (1L << (INLINE - 108)) | (1L << (INFIX - 108)) | (1L << (EXTERNAL - 108)) | (1L << (SUSPEND - 108)) | (1L << (OVERRIDE - 108)) | (1L << (ABSTRACT - 108)) | (1L << (FINAL - 108)) | (1L << (OPEN - 108)) | (1L << (CONST - 108)) | (1L << (LATEINIT - 108)) | (1L << (VARARG - 108)) | (1L << (NOINLINE - 108)) | (1L << (CROSSINLINE - 108)) | (1L << (EXPECT - 108)) | (1L << (ACTUAL - 108)))) != 0)) {
{
setState(1552);
modifiers();
}
}
setState(1555);
match(CONSTRUCTOR);
setState(1559);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1556);
match(NL);
}
}
setState(1561);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1562);
functionValueParameters();
setState(1577);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,221,_ctx) ) {
case 1:
{
setState(1566);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1563);
match(NL);
}
}
setState(1568);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1569);
match(COLON);
setState(1573);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1570);
match(NL);
}
}
setState(1575);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1576);
constructorDelegationCall();
}
break;
}
setState(1582);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,222,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1579);
match(NL);
}
}
}
setState(1584);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,222,_ctx);
}
setState(1586);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LCURL) {
{
setState(1585);
block();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtConstructorDelegationCall extends KotlinInnerNode {
public KtValueArguments valueArguments() {
return getRuleContext(KtValueArguments.class,0);
}
public TerminalNode THIS() { return getToken(KotlinParser.THIS, 0); }
public TerminalNode SUPER() { return getToken(KotlinParser.SUPER, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtConstructorDelegationCall(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_constructorDelegationCall; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterConstructorDelegationCall(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitConstructorDelegationCall(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitConstructorDelegationCall(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtConstructorDelegationCall constructorDelegationCall() throws RecognitionException {
KtConstructorDelegationCall _localctx = new KtConstructorDelegationCall(_ctx, getState());
enterRule(_localctx, 90, RULE_constructorDelegationCall);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1588);
_la = _input.LA(1);
if ( !(_la==THIS || _la==SUPER) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1592);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1589);
match(NL);
}
}
setState(1594);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1595);
valueArguments();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtEnumClassBody extends KotlinInnerNode {
public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); }
public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtEnumEntries enumEntries() {
return getRuleContext(KtEnumEntries.class,0);
}
public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); }
public KtClassMemberDeclarations classMemberDeclarations() {
return getRuleContext(KtClassMemberDeclarations.class,0);
}
public KtEnumClassBody(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumClassBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterEnumClassBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitEnumClassBody(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitEnumClassBody(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtEnumClassBody enumClassBody() throws RecognitionException {
KtEnumClassBody _localctx = new KtEnumClassBody(_ctx, getState());
enterRule(_localctx, 92, RULE_enumClassBody);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1597);
match(LCURL);
setState(1601);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,225,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1598);
match(NL);
}
}
}
setState(1603);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,225,_ctx);
}
setState(1605);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (AT_NO_WS - 40)) | (1L << (AT_PRE_WS - 40)) | (1L << (FILE - 40)) | (1L << (FIELD - 40)) | (1L << (PROPERTY - 40)) | (1L << (GET - 40)) | (1L << (SET - 40)) | (1L << (RECEIVER - 40)) | (1L << (PARAM - 40)) | (1L << (SETPARAM - 40)) | (1L << (DELEGATE - 40)) | (1L << (IMPORT - 40)) | (1L << (CONSTRUCTOR - 40)) | (1L << (BY - 40)) | (1L << (COMPANION - 40)) | (1L << (INIT - 40)) | (1L << (WHERE - 40)) | (1L << (CATCH - 40)) | (1L << (FINALLY - 40)))) != 0) || ((((_la - 106)) & ~0x3f) == 0 && ((1L << (_la - 106)) & ((1L << (OUT - 106)) | (1L << (DYNAMIC - 106)) | (1L << (PUBLIC - 106)) | (1L << (PRIVATE - 106)) | (1L << (PROTECTED - 106)) | (1L << (INTERNAL - 106)) | (1L << (ENUM - 106)) | (1L << (SEALED - 106)) | (1L << (ANNOTATION - 106)) | (1L << (DATA - 106)) | (1L << (INNER - 106)) | (1L << (VALUE - 106)) | (1L << (TAILREC - 106)) | (1L << (OPERATOR - 106)) | (1L << (INLINE - 106)) | (1L << (INFIX - 106)) | (1L << (EXTERNAL - 106)) | (1L << (SUSPEND - 106)) | (1L << (OVERRIDE - 106)) | (1L << (ABSTRACT - 106)) | (1L << (FINAL - 106)) | (1L << (OPEN - 106)) | (1L << (CONST - 106)) | (1L << (LATEINIT - 106)) | (1L << (VARARG - 106)) | (1L << (NOINLINE - 106)) | (1L << (CROSSINLINE - 106)) | (1L << (REIFIED - 106)) | (1L << (EXPECT - 106)) | (1L << (ACTUAL - 106)) | (1L << (Identifier - 106)))) != 0)) {
{
setState(1604);
enumEntries();
}
}
setState(1621);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,229,_ctx) ) {
case 1:
{
setState(1610);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1607);
match(NL);
}
}
setState(1612);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1613);
match(SEMICOLON);
setState(1617);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,228,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1614);
match(NL);
}
}
}
setState(1619);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,228,_ctx);
}
setState(1620);
classMemberDeclarations();
}
break;
}
setState(1626);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1623);
match(NL);
}
}
setState(1628);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1629);
match(RCURL);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtEnumEntries extends KotlinInnerNode {
public List enumEntry() {
return getRuleContexts(KtEnumEntry.class);
}
public KtEnumEntry enumEntry(int i) {
return getRuleContext(KtEnumEntry.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtEnumEntries(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumEntries; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterEnumEntries(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitEnumEntries(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitEnumEntries(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtEnumEntries enumEntries() throws RecognitionException {
KtEnumEntries _localctx = new KtEnumEntries(_ctx, getState());
enterRule(_localctx, 94, RULE_enumEntries);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1631);
enumEntry();
setState(1648);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,233,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1635);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1632);
match(NL);
}
}
setState(1637);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1638);
match(COMMA);
setState(1642);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1639);
match(NL);
}
}
setState(1644);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1645);
enumEntry();
}
}
}
setState(1650);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,233,_ctx);
}
setState(1654);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,234,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1651);
match(NL);
}
}
}
setState(1656);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,234,_ctx);
}
setState(1658);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1657);
match(COMMA);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtEnumEntry extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtModifiers modifiers() {
return getRuleContext(KtModifiers.class,0);
}
public KtValueArguments valueArguments() {
return getRuleContext(KtValueArguments.class,0);
}
public KtClassBody classBody() {
return getRuleContext(KtClassBody.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtEnumEntry(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_enumEntry; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterEnumEntry(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitEnumEntry(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitEnumEntry(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtEnumEntry enumEntry() throws RecognitionException {
KtEnumEntry _localctx = new KtEnumEntry(_ctx, getState());
enterRule(_localctx, 96, RULE_enumEntry);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1667);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,237,_ctx) ) {
case 1:
{
setState(1660);
modifiers();
setState(1664);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1661);
match(NL);
}
}
setState(1666);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
}
setState(1669);
simpleIdentifier();
setState(1677);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,239,_ctx) ) {
case 1:
{
setState(1673);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1670);
match(NL);
}
}
setState(1675);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1676);
valueArguments();
}
break;
}
setState(1686);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,241,_ctx) ) {
case 1:
{
setState(1682);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1679);
match(NL);
}
}
setState(1684);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1685);
classBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtType extends KotlinInnerNode {
public KtFunctionType functionType() {
return getRuleContext(KtFunctionType.class,0);
}
public KtParenthesizedType parenthesizedType() {
return getRuleContext(KtParenthesizedType.class,0);
}
public KtNullableType nullableType() {
return getRuleContext(KtNullableType.class,0);
}
public KtTypeReference typeReference() {
return getRuleContext(KtTypeReference.class,0);
}
public KtDefinitelyNonNullableType definitelyNonNullableType() {
return getRuleContext(KtDefinitelyNonNullableType.class,0);
}
public KtTypeModifiers typeModifiers() {
return getRuleContext(KtTypeModifiers.class,0);
}
public KtType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_type; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitType(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtType type() throws RecognitionException {
KtType _localctx = new KtType(_ctx, getState());
enterRule(_localctx, 98, RULE_type);
try {
enterOuterAlt(_localctx, 1);
{
setState(1689);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,242,_ctx) ) {
case 1:
{
setState(1688);
typeModifiers();
}
break;
}
setState(1696);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,243,_ctx) ) {
case 1:
{
setState(1691);
functionType();
}
break;
case 2:
{
setState(1692);
parenthesizedType();
}
break;
case 3:
{
setState(1693);
nullableType();
}
break;
case 4:
{
setState(1694);
typeReference();
}
break;
case 5:
{
setState(1695);
definitelyNonNullableType();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeReference extends KotlinInnerNode {
public KtUserType userType() {
return getRuleContext(KtUserType.class,0);
}
public TerminalNode DYNAMIC() { return getToken(KotlinParser.DYNAMIC, 0); }
public KtTypeReference(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeReference; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeReference(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeReference(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeReference(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeReference typeReference() throws RecognitionException {
KtTypeReference _localctx = new KtTypeReference(_ctx, getState());
enterRule(_localctx, 100, RULE_typeReference);
try {
setState(1700);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,244,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1698);
userType();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1699);
match(DYNAMIC);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtNullableType extends KotlinInnerNode {
public KtTypeReference typeReference() {
return getRuleContext(KtTypeReference.class,0);
}
public KtParenthesizedType parenthesizedType() {
return getRuleContext(KtParenthesizedType.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List quest() {
return getRuleContexts(KtQuest.class);
}
public KtQuest quest(int i) {
return getRuleContext(KtQuest.class,i);
}
public KtNullableType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_nullableType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterNullableType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitNullableType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitNullableType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtNullableType nullableType() throws RecognitionException {
KtNullableType _localctx = new KtNullableType(_ctx, getState());
enterRule(_localctx, 102, RULE_nullableType);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1704);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1702);
typeReference();
}
break;
case LPAREN:
{
setState(1703);
parenthesizedType();
}
break;
default:
throw new NoViableAltException(this);
}
setState(1709);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1706);
match(NL);
}
}
setState(1711);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1713);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1712);
quest();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1715);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,247,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtQuest extends KotlinInnerNode {
public TerminalNode QUEST_NO_WS() { return getToken(KotlinParser.QUEST_NO_WS, 0); }
public TerminalNode QUEST_WS() { return getToken(KotlinParser.QUEST_WS, 0); }
public KtQuest(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_quest; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterQuest(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitQuest(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitQuest(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtQuest quest() throws RecognitionException {
KtQuest _localctx = new KtQuest(_ctx, getState());
enterRule(_localctx, 104, RULE_quest);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1717);
_la = _input.LA(1);
if ( !(_la==QUEST_WS || _la==QUEST_NO_WS) ) {
_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 KtUserType extends KotlinInnerNode {
public List simpleUserType() {
return getRuleContexts(KtSimpleUserType.class);
}
public KtSimpleUserType simpleUserType(int i) {
return getRuleContext(KtSimpleUserType.class,i);
}
public List DOT() { return getTokens(KotlinParser.DOT); }
public TerminalNode DOT(int i) {
return getToken(KotlinParser.DOT, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtUserType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_userType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterUserType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitUserType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitUserType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtUserType userType() throws RecognitionException {
KtUserType _localctx = new KtUserType(_ctx, getState());
enterRule(_localctx, 106, RULE_userType);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1719);
simpleUserType();
setState(1736);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,250,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1723);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1720);
match(NL);
}
}
setState(1725);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1726);
match(DOT);
setState(1730);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1727);
match(NL);
}
}
setState(1732);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1733);
simpleUserType();
}
}
}
setState(1738);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,250,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtSimpleUserType extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtTypeArguments typeArguments() {
return getRuleContext(KtTypeArguments.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtSimpleUserType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_simpleUserType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterSimpleUserType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitSimpleUserType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitSimpleUserType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtSimpleUserType simpleUserType() throws RecognitionException {
KtSimpleUserType _localctx = new KtSimpleUserType(_ctx, getState());
enterRule(_localctx, 108, RULE_simpleUserType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1739);
simpleIdentifier();
setState(1747);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,252,_ctx) ) {
case 1:
{
setState(1743);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1740);
match(NL);
}
}
setState(1745);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1746);
typeArguments();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeProjection extends KotlinInnerNode {
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtTypeProjectionModifiers typeProjectionModifiers() {
return getRuleContext(KtTypeProjectionModifiers.class,0);
}
public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); }
public KtTypeProjection(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeProjection; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeProjection(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeProjection(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeProjection(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeProjection typeProjection() throws RecognitionException {
KtTypeProjection _localctx = new KtTypeProjection(_ctx, getState());
enterRule(_localctx, 110, RULE_typeProjection);
try {
setState(1754);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LPAREN:
case AT_NO_WS:
case AT_PRE_WS:
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case IN:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
enterOuterAlt(_localctx, 1);
{
setState(1750);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,253,_ctx) ) {
case 1:
{
setState(1749);
typeProjectionModifiers();
}
break;
}
setState(1752);
type();
}
break;
case MULT:
enterOuterAlt(_localctx, 2);
{
setState(1753);
match(MULT);
}
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 KtTypeProjectionModifiers extends KotlinInnerNode {
public List typeProjectionModifier() {
return getRuleContexts(KtTypeProjectionModifier.class);
}
public KtTypeProjectionModifier typeProjectionModifier(int i) {
return getRuleContext(KtTypeProjectionModifier.class,i);
}
public KtTypeProjectionModifiers(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeProjectionModifiers; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeProjectionModifiers(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeProjectionModifiers(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeProjectionModifiers(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeProjectionModifiers typeProjectionModifiers() throws RecognitionException {
KtTypeProjectionModifiers _localctx = new KtTypeProjectionModifiers(_ctx, getState());
enterRule(_localctx, 112, RULE_typeProjectionModifiers);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1757);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1756);
typeProjectionModifier();
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1759);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,255,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeProjectionModifier extends KotlinInnerNode {
public KtVarianceModifier varianceModifier() {
return getRuleContext(KtVarianceModifier.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAnnotation annotation() {
return getRuleContext(KtAnnotation.class,0);
}
public KtTypeProjectionModifier(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeProjectionModifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeProjectionModifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeProjectionModifier(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeProjectionModifier(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeProjectionModifier typeProjectionModifier() throws RecognitionException {
KtTypeProjectionModifier _localctx = new KtTypeProjectionModifier(_ctx, getState());
enterRule(_localctx, 114, RULE_typeProjectionModifier);
int _la;
try {
setState(1769);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IN:
case OUT:
enterOuterAlt(_localctx, 1);
{
setState(1761);
varianceModifier();
setState(1765);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1762);
match(NL);
}
}
setState(1767);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
case AT_NO_WS:
case AT_PRE_WS:
enterOuterAlt(_localctx, 2);
{
setState(1768);
annotation();
}
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 KtFunctionType extends KotlinInnerNode {
public KtFunctionTypeParameters functionTypeParameters() {
return getRuleContext(KtFunctionTypeParameters.class,0);
}
public TerminalNode ARROW() { return getToken(KotlinParser.ARROW, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public KtReceiverType receiverType() {
return getRuleContext(KtReceiverType.class,0);
}
public TerminalNode DOT() { return getToken(KotlinParser.DOT, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtFunctionType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionType functionType() throws RecognitionException {
KtFunctionType _localctx = new KtFunctionType(_ctx, getState());
enterRule(_localctx, 116, RULE_functionType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1785);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,260,_ctx) ) {
case 1:
{
setState(1771);
receiverType();
setState(1775);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1772);
match(NL);
}
}
setState(1777);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1778);
match(DOT);
setState(1782);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1779);
match(NL);
}
}
setState(1784);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
break;
}
setState(1787);
functionTypeParameters();
setState(1791);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1788);
match(NL);
}
}
setState(1793);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1794);
match(ARROW);
setState(1798);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1795);
match(NL);
}
}
setState(1800);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1801);
type();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtFunctionTypeParameters extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List parameter() {
return getRuleContexts(KtParameter.class);
}
public KtParameter parameter(int i) {
return getRuleContext(KtParameter.class,i);
}
public List type() {
return getRuleContexts(KtType.class);
}
public KtType type(int i) {
return getRuleContext(KtType.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtFunctionTypeParameters(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_functionTypeParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterFunctionTypeParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitFunctionTypeParameters(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitFunctionTypeParameters(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtFunctionTypeParameters functionTypeParameters() throws RecognitionException {
KtFunctionTypeParameters _localctx = new KtFunctionTypeParameters(_ctx, getState());
enterRule(_localctx, 118, RULE_functionTypeParameters);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1803);
match(LPAREN);
setState(1807);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,263,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1804);
match(NL);
}
}
}
setState(1809);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,263,_ctx);
}
setState(1812);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,264,_ctx) ) {
case 1:
{
setState(1810);
parameter();
}
break;
case 2:
{
setState(1811);
type();
}
break;
}
setState(1833);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,268,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1817);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1814);
match(NL);
}
}
setState(1819);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1820);
match(COMMA);
setState(1824);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1821);
match(NL);
}
}
setState(1826);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1829);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,267,_ctx) ) {
case 1:
{
setState(1827);
parameter();
}
break;
case 2:
{
setState(1828);
type();
}
break;
}
}
}
}
setState(1835);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,268,_ctx);
}
setState(1843);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,270,_ctx) ) {
case 1:
{
setState(1839);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1836);
match(NL);
}
}
setState(1841);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1842);
match(COMMA);
}
break;
}
setState(1848);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1845);
match(NL);
}
}
setState(1850);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1851);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParenthesizedType extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtType type() {
return getRuleContext(KtType.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParenthesizedType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenthesizedType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParenthesizedType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParenthesizedType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParenthesizedType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParenthesizedType parenthesizedType() throws RecognitionException {
KtParenthesizedType _localctx = new KtParenthesizedType(_ctx, getState());
enterRule(_localctx, 120, RULE_parenthesizedType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1853);
match(LPAREN);
setState(1857);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1854);
match(NL);
}
}
setState(1859);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1860);
type();
setState(1864);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1861);
match(NL);
}
}
setState(1866);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1867);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtReceiverType extends KotlinInnerNode {
public KtParenthesizedType parenthesizedType() {
return getRuleContext(KtParenthesizedType.class,0);
}
public KtNullableType nullableType() {
return getRuleContext(KtNullableType.class,0);
}
public KtTypeReference typeReference() {
return getRuleContext(KtTypeReference.class,0);
}
public KtTypeModifiers typeModifiers() {
return getRuleContext(KtTypeModifiers.class,0);
}
public KtReceiverType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_receiverType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterReceiverType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitReceiverType(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitReceiverType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtReceiverType receiverType() throws RecognitionException {
KtReceiverType _localctx = new KtReceiverType(_ctx, getState());
enterRule(_localctx, 122, RULE_receiverType);
try {
enterOuterAlt(_localctx, 1);
{
setState(1870);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,274,_ctx) ) {
case 1:
{
setState(1869);
typeModifiers();
}
break;
}
setState(1875);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,275,_ctx) ) {
case 1:
{
setState(1872);
parenthesizedType();
}
break;
case 2:
{
setState(1873);
nullableType();
}
break;
case 3:
{
setState(1874);
typeReference();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParenthesizedUserType extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public KtUserType userType() {
return getRuleContext(KtUserType.class,0);
}
public KtParenthesizedUserType parenthesizedUserType() {
return getRuleContext(KtParenthesizedUserType.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParenthesizedUserType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenthesizedUserType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParenthesizedUserType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParenthesizedUserType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParenthesizedUserType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParenthesizedUserType parenthesizedUserType() throws RecognitionException {
KtParenthesizedUserType _localctx = new KtParenthesizedUserType(_ctx, getState());
enterRule(_localctx, 124, RULE_parenthesizedUserType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1877);
match(LPAREN);
setState(1881);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1878);
match(NL);
}
}
setState(1883);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1886);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1884);
userType();
}
break;
case LPAREN:
{
setState(1885);
parenthesizedUserType();
}
break;
default:
throw new NoViableAltException(this);
}
setState(1891);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1888);
match(NL);
}
}
setState(1893);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1894);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDefinitelyNonNullableType extends KotlinInnerNode {
public TerminalNode AMP() { return getToken(KotlinParser.AMP, 0); }
public List userType() {
return getRuleContexts(KtUserType.class);
}
public KtUserType userType(int i) {
return getRuleContext(KtUserType.class,i);
}
public List parenthesizedUserType() {
return getRuleContexts(KtParenthesizedUserType.class);
}
public KtParenthesizedUserType parenthesizedUserType(int i) {
return getRuleContext(KtParenthesizedUserType.class,i);
}
public List typeModifiers() {
return getRuleContexts(KtTypeModifiers.class);
}
public KtTypeModifiers typeModifiers(int i) {
return getRuleContext(KtTypeModifiers.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtDefinitelyNonNullableType(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_definitelyNonNullableType; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDefinitelyNonNullableType(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDefinitelyNonNullableType(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDefinitelyNonNullableType(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDefinitelyNonNullableType definitelyNonNullableType() throws RecognitionException {
KtDefinitelyNonNullableType _localctx = new KtDefinitelyNonNullableType(_ctx, getState());
enterRule(_localctx, 126, RULE_definitelyNonNullableType);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1897);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,279,_ctx) ) {
case 1:
{
setState(1896);
typeModifiers();
}
break;
}
setState(1901);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1899);
userType();
}
break;
case LPAREN:
{
setState(1900);
parenthesizedUserType();
}
break;
default:
throw new NoViableAltException(this);
}
setState(1906);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1903);
match(NL);
}
}
setState(1908);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1909);
match(AMP);
setState(1913);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1910);
match(NL);
}
}
setState(1915);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1917);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,283,_ctx) ) {
case 1:
{
setState(1916);
typeModifiers();
}
break;
}
setState(1921);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1919);
userType();
}
break;
case LPAREN:
{
setState(1920);
parenthesizedUserType();
}
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 KtStatements extends KotlinInnerNode {
public List statement() {
return getRuleContexts(KtStatement.class);
}
public KtStatement statement(int i) {
return getRuleContext(KtStatement.class,i);
}
public List semis() {
return getRuleContexts(KtSemis.class);
}
public KtSemis semis(int i) {
return getRuleContext(KtSemis.class,i);
}
public KtStatements(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterStatements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitStatements(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitStatements(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtStatements statements() throws RecognitionException {
KtStatements _localctx = new KtStatements(_ctx, getState());
enterRule(_localctx, 128, RULE_statements);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1932);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL_WS) | (1L << EXCL_NO_WS) | (1L << COLONCOLON) | (1L << AT_NO_WS) | (1L << AT_PRE_WS) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << THIS_AT) | (1L << SUPER_AT) | (1L << FILE) | (1L << FIELD))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (PROPERTY - 64)) | (1L << (GET - 64)) | (1L << (SET - 64)) | (1L << (RECEIVER - 64)) | (1L << (PARAM - 64)) | (1L << (SETPARAM - 64)) | (1L << (DELEGATE - 64)) | (1L << (IMPORT - 64)) | (1L << (CLASS - 64)) | (1L << (INTERFACE - 64)) | (1L << (FUN - 64)) | (1L << (OBJECT - 64)) | (1L << (VAL - 64)) | (1L << (VAR - 64)) | (1L << (TYPE_ALIAS - 64)) | (1L << (CONSTRUCTOR - 64)) | (1L << (BY - 64)) | (1L << (COMPANION - 64)) | (1L << (INIT - 64)) | (1L << (THIS - 64)) | (1L << (SUPER - 64)) | (1L << (WHERE - 64)) | (1L << (IF - 64)) | (1L << (WHEN - 64)) | (1L << (TRY - 64)) | (1L << (CATCH - 64)) | (1L << (FINALLY - 64)) | (1L << (FOR - 64)) | (1L << (DO - 64)) | (1L << (WHILE - 64)) | (1L << (THROW - 64)) | (1L << (RETURN - 64)) | (1L << (CONTINUE - 64)) | (1L << (BREAK - 64)) | (1L << (OUT - 64)) | (1L << (DYNAMIC - 64)) | (1L << (PUBLIC - 64)) | (1L << (PRIVATE - 64)) | (1L << (PROTECTED - 64)) | (1L << (INTERNAL - 64)) | (1L << (ENUM - 64)) | (1L << (SEALED - 64)) | (1L << (ANNOTATION - 64)) | (1L << (DATA - 64)) | (1L << (INNER - 64)) | (1L << (VALUE - 64)) | (1L << (TAILREC - 64)) | (1L << (OPERATOR - 64)) | (1L << (INLINE - 64)) | (1L << (INFIX - 64)) | (1L << (EXTERNAL - 64)) | (1L << (SUSPEND - 64)) | (1L << (OVERRIDE - 64)) | (1L << (ABSTRACT - 64)) | (1L << (FINAL - 64)) | (1L << (OPEN - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (CONST - 128)) | (1L << (LATEINIT - 128)) | (1L << (VARARG - 128)) | (1L << (NOINLINE - 128)) | (1L << (CROSSINLINE - 128)) | (1L << (REIFIED - 128)) | (1L << (EXPECT - 128)) | (1L << (ACTUAL - 128)) | (1L << (RealLiteral - 128)) | (1L << (IntegerLiteral - 128)) | (1L << (HexLiteral - 128)) | (1L << (BinLiteral - 128)) | (1L << (UnsignedLiteral - 128)) | (1L << (LongLiteral - 128)) | (1L << (BooleanLiteral - 128)) | (1L << (NullLiteral - 128)) | (1L << (CharacterLiteral - 128)) | (1L << (Identifier - 128)) | (1L << (QUOTE_OPEN - 128)) | (1L << (TRIPLE_QUOTE_OPEN - 128)))) != 0)) {
{
setState(1923);
statement();
setState(1929);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,285,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1924);
semis();
setState(1925);
statement();
}
}
}
setState(1931);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,285,_ctx);
}
}
}
setState(1935);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,287,_ctx) ) {
case 1:
{
setState(1934);
semis();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtStatement extends KotlinInnerNode {
public KtDeclaration declaration() {
return getRuleContext(KtDeclaration.class,0);
}
public KtAssignment assignment() {
return getRuleContext(KtAssignment.class,0);
}
public KtLoopStatement loopStatement() {
return getRuleContext(KtLoopStatement.class,0);
}
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public List label() {
return getRuleContexts(KtLabel.class);
}
public KtLabel label(int i) {
return getRuleContext(KtLabel.class,i);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public KtStatement(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitStatement(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitStatement(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtStatement statement() throws RecognitionException {
KtStatement _localctx = new KtStatement(_ctx, getState());
enterRule(_localctx, 130, RULE_statement);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1941);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,289,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
setState(1939);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1937);
label();
}
break;
case AT_NO_WS:
case AT_PRE_WS:
{
setState(1938);
annotation();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
setState(1943);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,289,_ctx);
}
setState(1948);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,290,_ctx) ) {
case 1:
{
setState(1944);
declaration();
}
break;
case 2:
{
setState(1945);
assignment();
}
break;
case 3:
{
setState(1946);
loopStatement();
}
break;
case 4:
{
setState(1947);
expression();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtLabel extends KotlinInnerNode {
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode AT_NO_WS() { return getToken(KotlinParser.AT_NO_WS, 0); }
public TerminalNode AT_POST_WS() { return getToken(KotlinParser.AT_POST_WS, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtLabel(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_label; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterLabel(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitLabel(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitLabel(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtLabel label() throws RecognitionException {
KtLabel _localctx = new KtLabel(_ctx, getState());
enterRule(_localctx, 132, RULE_label);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1950);
simpleIdentifier();
setState(1951);
_la = _input.LA(1);
if ( !(_la==AT_NO_WS || _la==AT_POST_WS) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1955);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,291,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1952);
match(NL);
}
}
}
setState(1957);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,291,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtControlStructureBody extends KotlinInnerNode {
public KtBlock block() {
return getRuleContext(KtBlock.class,0);
}
public KtStatement statement() {
return getRuleContext(KtStatement.class,0);
}
public KtControlStructureBody(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_controlStructureBody; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterControlStructureBody(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitControlStructureBody(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitControlStructureBody(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtControlStructureBody controlStructureBody() throws RecognitionException {
KtControlStructureBody _localctx = new KtControlStructureBody(_ctx, getState());
enterRule(_localctx, 134, RULE_controlStructureBody);
try {
setState(1960);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,292,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1958);
block();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1959);
statement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtBlock extends KotlinInnerNode {
public TerminalNode LCURL() { return getToken(KotlinParser.LCURL, 0); }
public KtStatements statements() {
return getRuleContext(KtStatements.class,0);
}
public TerminalNode RCURL() { return getToken(KotlinParser.RCURL, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtBlock(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitBlock(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitBlock(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtBlock block() throws RecognitionException {
KtBlock _localctx = new KtBlock(_ctx, getState());
enterRule(_localctx, 136, RULE_block);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1962);
match(LCURL);
setState(1966);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,293,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1963);
match(NL);
}
}
}
setState(1968);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,293,_ctx);
}
setState(1969);
statements();
setState(1973);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1970);
match(NL);
}
}
setState(1975);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1976);
match(RCURL);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtLoopStatement extends KotlinInnerNode {
public KtForStatement forStatement() {
return getRuleContext(KtForStatement.class,0);
}
public KtWhileStatement whileStatement() {
return getRuleContext(KtWhileStatement.class,0);
}
public KtDoWhileStatement doWhileStatement() {
return getRuleContext(KtDoWhileStatement.class,0);
}
public KtLoopStatement(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_loopStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterLoopStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitLoopStatement(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitLoopStatement(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtLoopStatement loopStatement() throws RecognitionException {
KtLoopStatement _localctx = new KtLoopStatement(_ctx, getState());
enterRule(_localctx, 138, RULE_loopStatement);
try {
setState(1981);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FOR:
enterOuterAlt(_localctx, 1);
{
setState(1978);
forStatement();
}
break;
case WHILE:
enterOuterAlt(_localctx, 2);
{
setState(1979);
whileStatement();
}
break;
case DO:
enterOuterAlt(_localctx, 3);
{
setState(1980);
doWhileStatement();
}
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 KtForStatement extends KotlinInnerNode {
public TerminalNode FOR() { return getToken(KotlinParser.FOR, 0); }
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode IN() { return getToken(KotlinParser.IN, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public KtVariableDeclaration variableDeclaration() {
return getRuleContext(KtVariableDeclaration.class,0);
}
public KtMultiVariableDeclaration multiVariableDeclaration() {
return getRuleContext(KtMultiVariableDeclaration.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public KtControlStructureBody controlStructureBody() {
return getRuleContext(KtControlStructureBody.class,0);
}
public KtForStatement(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterForStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitForStatement(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitForStatement(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtForStatement forStatement() throws RecognitionException {
KtForStatement _localctx = new KtForStatement(_ctx, getState());
enterRule(_localctx, 140, RULE_forStatement);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1983);
match(FOR);
setState(1987);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1984);
match(NL);
}
}
setState(1989);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1990);
match(LPAREN);
setState(1994);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,297,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1991);
annotation();
}
}
}
setState(1996);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,297,_ctx);
}
setState(1999);
_errHandler.sync(this);
switch (_input.LA(1)) {
case NL:
case AT_NO_WS:
case AT_PRE_WS:
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(1997);
variableDeclaration();
}
break;
case LPAREN:
{
setState(1998);
multiVariableDeclaration();
}
break;
default:
throw new NoViableAltException(this);
}
setState(2001);
match(IN);
setState(2002);
expression();
setState(2003);
match(RPAREN);
setState(2007);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,299,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2004);
match(NL);
}
}
}
setState(2009);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,299,_ctx);
}
setState(2011);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,300,_ctx) ) {
case 1:
{
setState(2010);
controlStructureBody();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtWhileStatement extends KotlinInnerNode {
public TerminalNode WHILE() { return getToken(KotlinParser.WHILE, 0); }
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public KtControlStructureBody controlStructureBody() {
return getRuleContext(KtControlStructureBody.class,0);
}
public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtWhileStatement(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whileStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterWhileStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitWhileStatement(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitWhileStatement(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtWhileStatement whileStatement() throws RecognitionException {
KtWhileStatement _localctx = new KtWhileStatement(_ctx, getState());
enterRule(_localctx, 142, RULE_whileStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2013);
match(WHILE);
setState(2017);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2014);
match(NL);
}
}
setState(2019);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2020);
match(LPAREN);
setState(2021);
expression();
setState(2022);
match(RPAREN);
setState(2026);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2023);
match(NL);
}
}
setState(2028);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2031);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LPAREN:
case LSQUARE:
case LCURL:
case ADD:
case SUB:
case INCR:
case DECR:
case EXCL_WS:
case EXCL_NO_WS:
case COLONCOLON:
case AT_NO_WS:
case AT_PRE_WS:
case RETURN_AT:
case CONTINUE_AT:
case BREAK_AT:
case THIS_AT:
case SUPER_AT:
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CLASS:
case INTERFACE:
case FUN:
case OBJECT:
case VAL:
case VAR:
case TYPE_ALIAS:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case THIS:
case SUPER:
case WHERE:
case IF:
case WHEN:
case TRY:
case CATCH:
case FINALLY:
case FOR:
case DO:
case WHILE:
case THROW:
case RETURN:
case CONTINUE:
case BREAK:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case RealLiteral:
case IntegerLiteral:
case HexLiteral:
case BinLiteral:
case UnsignedLiteral:
case LongLiteral:
case BooleanLiteral:
case NullLiteral:
case CharacterLiteral:
case Identifier:
case QUOTE_OPEN:
case TRIPLE_QUOTE_OPEN:
{
setState(2029);
controlStructureBody();
}
break;
case SEMICOLON:
{
setState(2030);
match(SEMICOLON);
}
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 KtDoWhileStatement extends KotlinInnerNode {
public TerminalNode DO() { return getToken(KotlinParser.DO, 0); }
public TerminalNode WHILE() { return getToken(KotlinParser.WHILE, 0); }
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtControlStructureBody controlStructureBody() {
return getRuleContext(KtControlStructureBody.class,0);
}
public KtDoWhileStatement(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_doWhileStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDoWhileStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDoWhileStatement(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDoWhileStatement(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDoWhileStatement doWhileStatement() throws RecognitionException {
KtDoWhileStatement _localctx = new KtDoWhileStatement(_ctx, getState());
enterRule(_localctx, 144, RULE_doWhileStatement);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2033);
match(DO);
setState(2037);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,304,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2034);
match(NL);
}
}
}
setState(2039);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,304,_ctx);
}
setState(2041);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,305,_ctx) ) {
case 1:
{
setState(2040);
controlStructureBody();
}
break;
}
setState(2046);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2043);
match(NL);
}
}
setState(2048);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2049);
match(WHILE);
setState(2053);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2050);
match(NL);
}
}
setState(2055);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2056);
match(LPAREN);
setState(2057);
expression();
setState(2058);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAssignment extends KotlinInnerNode {
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public KtDirectlyAssignableExpression directlyAssignableExpression() {
return getRuleContext(KtDirectlyAssignableExpression.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public KtAssignableExpression assignableExpression() {
return getRuleContext(KtAssignableExpression.class,0);
}
public KtAssignmentAndOperator assignmentAndOperator() {
return getRuleContext(KtAssignmentAndOperator.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAssignment(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignment; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAssignment(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAssignment(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAssignment(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAssignment assignment() throws RecognitionException {
KtAssignment _localctx = new KtAssignment(_ctx, getState());
enterRule(_localctx, 146, RULE_assignment);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2066);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,308,_ctx) ) {
case 1:
{
setState(2060);
directlyAssignableExpression();
setState(2061);
match(ASSIGNMENT);
}
break;
case 2:
{
setState(2063);
assignableExpression();
setState(2064);
assignmentAndOperator();
}
break;
}
setState(2071);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2068);
match(NL);
}
}
setState(2073);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2074);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtSemi extends KotlinInnerNode {
public TerminalNode SEMICOLON() { return getToken(KotlinParser.SEMICOLON, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtSemi(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_semi; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterSemi(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitSemi(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitSemi(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtSemi semi() throws RecognitionException {
KtSemi _localctx = new KtSemi(_ctx, getState());
enterRule(_localctx, 148, RULE_semi);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2076);
_la = _input.LA(1);
if ( !(_la==NL || _la==SEMICOLON) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(2080);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,310,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2077);
match(NL);
}
}
}
setState(2082);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,310,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtSemis extends KotlinInnerNode {
public List SEMICOLON() { return getTokens(KotlinParser.SEMICOLON); }
public TerminalNode SEMICOLON(int i) {
return getToken(KotlinParser.SEMICOLON, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtSemis(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_semis; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterSemis(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitSemis(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitSemis(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtSemis semis() throws RecognitionException {
KtSemis _localctx = new KtSemis(_ctx, getState());
enterRule(_localctx, 150, RULE_semis);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2084);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(2083);
_la = _input.LA(1);
if ( !(_la==NL || _la==SEMICOLON) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(2086);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,311,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtExpression extends KotlinInnerNode {
public KtDisjunction disjunction() {
return getRuleContext(KtDisjunction.class,0);
}
public KtExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitExpression(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtExpression expression() throws RecognitionException {
KtExpression _localctx = new KtExpression(_ctx, getState());
enterRule(_localctx, 152, RULE_expression);
try {
enterOuterAlt(_localctx, 1);
{
setState(2088);
disjunction();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDisjunction extends KotlinInnerNode {
public List conjunction() {
return getRuleContexts(KtConjunction.class);
}
public KtConjunction conjunction(int i) {
return getRuleContext(KtConjunction.class,i);
}
public List DISJ() { return getTokens(KotlinParser.DISJ); }
public TerminalNode DISJ(int i) {
return getToken(KotlinParser.DISJ, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtDisjunction(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_disjunction; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDisjunction(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDisjunction(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDisjunction(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDisjunction disjunction() throws RecognitionException {
KtDisjunction _localctx = new KtDisjunction(_ctx, getState());
enterRule(_localctx, 154, RULE_disjunction);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2090);
conjunction();
setState(2107);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,314,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2094);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2091);
match(NL);
}
}
setState(2096);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2097);
match(DISJ);
setState(2101);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2098);
match(NL);
}
}
setState(2103);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2104);
conjunction();
}
}
}
setState(2109);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,314,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtConjunction extends KotlinInnerNode {
public List equality() {
return getRuleContexts(KtEquality.class);
}
public KtEquality equality(int i) {
return getRuleContext(KtEquality.class,i);
}
public List CONJ() { return getTokens(KotlinParser.CONJ); }
public TerminalNode CONJ(int i) {
return getToken(KotlinParser.CONJ, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtConjunction(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_conjunction; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterConjunction(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitConjunction(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitConjunction(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtConjunction conjunction() throws RecognitionException {
KtConjunction _localctx = new KtConjunction(_ctx, getState());
enterRule(_localctx, 156, RULE_conjunction);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2110);
equality();
setState(2127);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,317,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2114);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2111);
match(NL);
}
}
setState(2116);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2117);
match(CONJ);
setState(2121);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2118);
match(NL);
}
}
setState(2123);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2124);
equality();
}
}
}
setState(2129);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,317,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtEquality extends KotlinInnerNode {
public List comparison() {
return getRuleContexts(KtComparison.class);
}
public KtComparison comparison(int i) {
return getRuleContext(KtComparison.class,i);
}
public List equalityOperator() {
return getRuleContexts(KtEqualityOperator.class);
}
public KtEqualityOperator equalityOperator(int i) {
return getRuleContext(KtEqualityOperator.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtEquality(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_equality; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterEquality(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitEquality(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitEquality(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtEquality equality() throws RecognitionException {
KtEquality _localctx = new KtEquality(_ctx, getState());
enterRule(_localctx, 158, RULE_equality);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2130);
comparison();
setState(2142);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,319,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2131);
equalityOperator();
setState(2135);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2132);
match(NL);
}
}
setState(2137);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2138);
comparison();
}
}
}
setState(2144);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,319,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtComparison extends KotlinInnerNode {
public List genericCallLikeComparison() {
return getRuleContexts(KtGenericCallLikeComparison.class);
}
public KtGenericCallLikeComparison genericCallLikeComparison(int i) {
return getRuleContext(KtGenericCallLikeComparison.class,i);
}
public List comparisonOperator() {
return getRuleContexts(KtComparisonOperator.class);
}
public KtComparisonOperator comparisonOperator(int i) {
return getRuleContext(KtComparisonOperator.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtComparison(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_comparison; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterComparison(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitComparison(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitComparison(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtComparison comparison() throws RecognitionException {
KtComparison _localctx = new KtComparison(_ctx, getState());
enterRule(_localctx, 160, RULE_comparison);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2145);
genericCallLikeComparison();
setState(2157);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,321,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2146);
comparisonOperator();
setState(2150);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2147);
match(NL);
}
}
setState(2152);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2153);
genericCallLikeComparison();
}
}
}
setState(2159);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,321,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtGenericCallLikeComparison extends KotlinInnerNode {
public KtInfixOperation infixOperation() {
return getRuleContext(KtInfixOperation.class,0);
}
public List callSuffix() {
return getRuleContexts(KtCallSuffix.class);
}
public KtCallSuffix callSuffix(int i) {
return getRuleContext(KtCallSuffix.class,i);
}
public KtGenericCallLikeComparison(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_genericCallLikeComparison; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterGenericCallLikeComparison(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitGenericCallLikeComparison(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitGenericCallLikeComparison(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtGenericCallLikeComparison genericCallLikeComparison() throws RecognitionException {
KtGenericCallLikeComparison _localctx = new KtGenericCallLikeComparison(_ctx, getState());
enterRule(_localctx, 162, RULE_genericCallLikeComparison);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2160);
infixOperation();
setState(2164);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,322,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2161);
callSuffix();
}
}
}
setState(2166);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,322,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtInfixOperation extends KotlinInnerNode {
public List elvisExpression() {
return getRuleContexts(KtElvisExpression.class);
}
public KtElvisExpression elvisExpression(int i) {
return getRuleContext(KtElvisExpression.class,i);
}
public List inOperator() {
return getRuleContexts(KtInOperator.class);
}
public KtInOperator inOperator(int i) {
return getRuleContext(KtInOperator.class,i);
}
public List isOperator() {
return getRuleContexts(KtIsOperator.class);
}
public KtIsOperator isOperator(int i) {
return getRuleContext(KtIsOperator.class,i);
}
public List type() {
return getRuleContexts(KtType.class);
}
public KtType type(int i) {
return getRuleContext(KtType.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtInfixOperation(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_infixOperation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterInfixOperation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitInfixOperation(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitInfixOperation(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtInfixOperation infixOperation() throws RecognitionException {
KtInfixOperation _localctx = new KtInfixOperation(_ctx, getState());
enterRule(_localctx, 164, RULE_infixOperation);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2167);
elvisExpression();
setState(2188);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,326,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
setState(2186);
_errHandler.sync(this);
switch (_input.LA(1)) {
case IN:
case NOT_IN:
{
setState(2168);
inOperator();
setState(2172);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2169);
match(NL);
}
}
setState(2174);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2175);
elvisExpression();
}
break;
case IS:
case NOT_IS:
{
setState(2177);
isOperator();
setState(2181);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2178);
match(NL);
}
}
setState(2183);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2184);
type();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
setState(2190);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,326,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtElvisExpression extends KotlinInnerNode {
public List infixFunctionCall() {
return getRuleContexts(KtInfixFunctionCall.class);
}
public KtInfixFunctionCall infixFunctionCall(int i) {
return getRuleContext(KtInfixFunctionCall.class,i);
}
public List elvis() {
return getRuleContexts(KtElvis.class);
}
public KtElvis elvis(int i) {
return getRuleContext(KtElvis.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtElvisExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elvisExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterElvisExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitElvisExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitElvisExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtElvisExpression elvisExpression() throws RecognitionException {
KtElvisExpression _localctx = new KtElvisExpression(_ctx, getState());
enterRule(_localctx, 166, RULE_elvisExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2191);
infixFunctionCall();
setState(2209);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,329,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2195);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2192);
match(NL);
}
}
setState(2197);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2198);
elvis();
setState(2202);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2199);
match(NL);
}
}
setState(2204);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2205);
infixFunctionCall();
}
}
}
setState(2211);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,329,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtElvis extends KotlinInnerNode {
public TerminalNode QUEST_NO_WS() { return getToken(KotlinParser.QUEST_NO_WS, 0); }
public TerminalNode COLON() { return getToken(KotlinParser.COLON, 0); }
public KtElvis(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elvis; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterElvis(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitElvis(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitElvis(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtElvis elvis() throws RecognitionException {
KtElvis _localctx = new KtElvis(_ctx, getState());
enterRule(_localctx, 168, RULE_elvis);
try {
enterOuterAlt(_localctx, 1);
{
setState(2212);
match(QUEST_NO_WS);
setState(2213);
match(COLON);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtInfixFunctionCall extends KotlinInnerNode {
public List rangeExpression() {
return getRuleContexts(KtRangeExpression.class);
}
public KtRangeExpression rangeExpression(int i) {
return getRuleContext(KtRangeExpression.class,i);
}
public List simpleIdentifier() {
return getRuleContexts(KtSimpleIdentifier.class);
}
public KtSimpleIdentifier simpleIdentifier(int i) {
return getRuleContext(KtSimpleIdentifier.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtInfixFunctionCall(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_infixFunctionCall; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterInfixFunctionCall(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitInfixFunctionCall(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitInfixFunctionCall(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtInfixFunctionCall infixFunctionCall() throws RecognitionException {
KtInfixFunctionCall _localctx = new KtInfixFunctionCall(_ctx, getState());
enterRule(_localctx, 170, RULE_infixFunctionCall);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2215);
rangeExpression();
setState(2227);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,331,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2216);
simpleIdentifier();
setState(2220);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2217);
match(NL);
}
}
setState(2222);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2223);
rangeExpression();
}
}
}
setState(2229);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,331,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtRangeExpression extends KotlinInnerNode {
public List additiveExpression() {
return getRuleContexts(KtAdditiveExpression.class);
}
public KtAdditiveExpression additiveExpression(int i) {
return getRuleContext(KtAdditiveExpression.class,i);
}
public List RANGE() { return getTokens(KotlinParser.RANGE); }
public TerminalNode RANGE(int i) {
return getToken(KotlinParser.RANGE, i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtRangeExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_rangeExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitRangeExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitRangeExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtRangeExpression rangeExpression() throws RecognitionException {
KtRangeExpression _localctx = new KtRangeExpression(_ctx, getState());
enterRule(_localctx, 172, RULE_rangeExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2230);
additiveExpression();
setState(2241);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,333,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2231);
match(RANGE);
setState(2235);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2232);
match(NL);
}
}
setState(2237);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2238);
additiveExpression();
}
}
}
setState(2243);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,333,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAdditiveExpression extends KotlinInnerNode {
public List multiplicativeExpression() {
return getRuleContexts(KtMultiplicativeExpression.class);
}
public KtMultiplicativeExpression multiplicativeExpression(int i) {
return getRuleContext(KtMultiplicativeExpression.class,i);
}
public List additiveOperator() {
return getRuleContexts(KtAdditiveOperator.class);
}
public KtAdditiveOperator additiveOperator(int i) {
return getRuleContext(KtAdditiveOperator.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAdditiveExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_additiveExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAdditiveExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAdditiveExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAdditiveExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAdditiveExpression additiveExpression() throws RecognitionException {
KtAdditiveExpression _localctx = new KtAdditiveExpression(_ctx, getState());
enterRule(_localctx, 174, RULE_additiveExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2244);
multiplicativeExpression();
setState(2256);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,335,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2245);
additiveOperator();
setState(2249);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2246);
match(NL);
}
}
setState(2251);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2252);
multiplicativeExpression();
}
}
}
setState(2258);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,335,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtMultiplicativeExpression extends KotlinInnerNode {
public List asExpression() {
return getRuleContexts(KtAsExpression.class);
}
public KtAsExpression asExpression(int i) {
return getRuleContext(KtAsExpression.class,i);
}
public List multiplicativeOperator() {
return getRuleContexts(KtMultiplicativeOperator.class);
}
public KtMultiplicativeOperator multiplicativeOperator(int i) {
return getRuleContext(KtMultiplicativeOperator.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtMultiplicativeExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multiplicativeExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterMultiplicativeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitMultiplicativeExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitMultiplicativeExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtMultiplicativeExpression multiplicativeExpression() throws RecognitionException {
KtMultiplicativeExpression _localctx = new KtMultiplicativeExpression(_ctx, getState());
enterRule(_localctx, 176, RULE_multiplicativeExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2259);
asExpression();
setState(2271);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,337,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2260);
multiplicativeOperator();
setState(2264);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2261);
match(NL);
}
}
setState(2266);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2267);
asExpression();
}
}
}
setState(2273);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,337,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAsExpression extends KotlinInnerNode {
public KtPrefixUnaryExpression prefixUnaryExpression() {
return getRuleContext(KtPrefixUnaryExpression.class,0);
}
public List asOperator() {
return getRuleContexts(KtAsOperator.class);
}
public KtAsOperator asOperator(int i) {
return getRuleContext(KtAsOperator.class,i);
}
public List type() {
return getRuleContexts(KtType.class);
}
public KtType type(int i) {
return getRuleContext(KtType.class,i);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAsExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_asExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAsExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAsExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAsExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAsExpression asExpression() throws RecognitionException {
KtAsExpression _localctx = new KtAsExpression(_ctx, getState());
enterRule(_localctx, 178, RULE_asExpression);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2274);
prefixUnaryExpression();
setState(2292);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,340,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2278);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2275);
match(NL);
}
}
setState(2280);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2281);
asOperator();
setState(2285);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2282);
match(NL);
}
}
setState(2287);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2288);
type();
}
}
}
setState(2294);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,340,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPrefixUnaryExpression extends KotlinInnerNode {
public KtPostfixUnaryExpression postfixUnaryExpression() {
return getRuleContext(KtPostfixUnaryExpression.class,0);
}
public List unaryPrefix() {
return getRuleContexts(KtUnaryPrefix.class);
}
public KtUnaryPrefix unaryPrefix(int i) {
return getRuleContext(KtUnaryPrefix.class,i);
}
public KtPrefixUnaryExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_prefixUnaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPrefixUnaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPrefixUnaryExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPrefixUnaryExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPrefixUnaryExpression prefixUnaryExpression() throws RecognitionException {
KtPrefixUnaryExpression _localctx = new KtPrefixUnaryExpression(_ctx, getState());
enterRule(_localctx, 180, RULE_prefixUnaryExpression);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2298);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,341,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2295);
unaryPrefix();
}
}
}
setState(2300);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,341,_ctx);
}
setState(2301);
postfixUnaryExpression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtUnaryPrefix extends KotlinInnerNode {
public KtAnnotation annotation() {
return getRuleContext(KtAnnotation.class,0);
}
public KtLabel label() {
return getRuleContext(KtLabel.class,0);
}
public KtPrefixUnaryOperator prefixUnaryOperator() {
return getRuleContext(KtPrefixUnaryOperator.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtUnaryPrefix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unaryPrefix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterUnaryPrefix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitUnaryPrefix(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitUnaryPrefix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtUnaryPrefix unaryPrefix() throws RecognitionException {
KtUnaryPrefix _localctx = new KtUnaryPrefix(_ctx, getState());
enterRule(_localctx, 182, RULE_unaryPrefix);
int _la;
try {
setState(2312);
_errHandler.sync(this);
switch (_input.LA(1)) {
case AT_NO_WS:
case AT_PRE_WS:
enterOuterAlt(_localctx, 1);
{
setState(2303);
annotation();
}
break;
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
enterOuterAlt(_localctx, 2);
{
setState(2304);
label();
}
break;
case ADD:
case SUB:
case INCR:
case DECR:
case EXCL_WS:
case EXCL_NO_WS:
enterOuterAlt(_localctx, 3);
{
setState(2305);
prefixUnaryOperator();
setState(2309);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2306);
match(NL);
}
}
setState(2311);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
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 KtPostfixUnaryExpression extends KotlinInnerNode {
public KtPrimaryExpression primaryExpression() {
return getRuleContext(KtPrimaryExpression.class,0);
}
public List postfixUnarySuffix() {
return getRuleContexts(KtPostfixUnarySuffix.class);
}
public KtPostfixUnarySuffix postfixUnarySuffix(int i) {
return getRuleContext(KtPostfixUnarySuffix.class,i);
}
public KtPostfixUnaryExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_postfixUnaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPostfixUnaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPostfixUnaryExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPostfixUnaryExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPostfixUnaryExpression postfixUnaryExpression() throws RecognitionException {
KtPostfixUnaryExpression _localctx = new KtPostfixUnaryExpression(_ctx, getState());
enterRule(_localctx, 184, RULE_postfixUnaryExpression);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2314);
primaryExpression();
setState(2318);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,344,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2315);
postfixUnarySuffix();
}
}
}
setState(2320);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,344,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPostfixUnarySuffix extends KotlinInnerNode {
public KtPostfixUnaryOperator postfixUnaryOperator() {
return getRuleContext(KtPostfixUnaryOperator.class,0);
}
public KtTypeArguments typeArguments() {
return getRuleContext(KtTypeArguments.class,0);
}
public KtCallSuffix callSuffix() {
return getRuleContext(KtCallSuffix.class,0);
}
public KtIndexingSuffix indexingSuffix() {
return getRuleContext(KtIndexingSuffix.class,0);
}
public KtNavigationSuffix navigationSuffix() {
return getRuleContext(KtNavigationSuffix.class,0);
}
public KtPostfixUnarySuffix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_postfixUnarySuffix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPostfixUnarySuffix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPostfixUnarySuffix(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPostfixUnarySuffix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPostfixUnarySuffix postfixUnarySuffix() throws RecognitionException {
KtPostfixUnarySuffix _localctx = new KtPostfixUnarySuffix(_ctx, getState());
enterRule(_localctx, 186, RULE_postfixUnarySuffix);
try {
setState(2326);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,345,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(2321);
postfixUnaryOperator();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(2322);
typeArguments();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(2323);
callSuffix();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(2324);
indexingSuffix();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(2325);
navigationSuffix();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtDirectlyAssignableExpression extends KotlinInnerNode {
public KtPostfixUnaryExpression postfixUnaryExpression() {
return getRuleContext(KtPostfixUnaryExpression.class,0);
}
public KtAssignableSuffix assignableSuffix() {
return getRuleContext(KtAssignableSuffix.class,0);
}
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtParenthesizedDirectlyAssignableExpression parenthesizedDirectlyAssignableExpression() {
return getRuleContext(KtParenthesizedDirectlyAssignableExpression.class,0);
}
public KtDirectlyAssignableExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_directlyAssignableExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterDirectlyAssignableExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitDirectlyAssignableExpression(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitDirectlyAssignableExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtDirectlyAssignableExpression directlyAssignableExpression() throws RecognitionException {
KtDirectlyAssignableExpression _localctx = new KtDirectlyAssignableExpression(_ctx, getState());
enterRule(_localctx, 188, RULE_directlyAssignableExpression);
try {
setState(2333);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,346,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(2328);
postfixUnaryExpression();
setState(2329);
assignableSuffix();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(2331);
simpleIdentifier();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(2332);
parenthesizedDirectlyAssignableExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParenthesizedDirectlyAssignableExpression extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtDirectlyAssignableExpression directlyAssignableExpression() {
return getRuleContext(KtDirectlyAssignableExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParenthesizedDirectlyAssignableExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenthesizedDirectlyAssignableExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParenthesizedDirectlyAssignableExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParenthesizedDirectlyAssignableExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParenthesizedDirectlyAssignableExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParenthesizedDirectlyAssignableExpression parenthesizedDirectlyAssignableExpression() throws RecognitionException {
KtParenthesizedDirectlyAssignableExpression _localctx = new KtParenthesizedDirectlyAssignableExpression(_ctx, getState());
enterRule(_localctx, 190, RULE_parenthesizedDirectlyAssignableExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2335);
match(LPAREN);
setState(2339);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2336);
match(NL);
}
}
setState(2341);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2342);
directlyAssignableExpression();
setState(2346);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2343);
match(NL);
}
}
setState(2348);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2349);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAssignableExpression extends KotlinInnerNode {
public KtPrefixUnaryExpression prefixUnaryExpression() {
return getRuleContext(KtPrefixUnaryExpression.class,0);
}
public KtParenthesizedAssignableExpression parenthesizedAssignableExpression() {
return getRuleContext(KtParenthesizedAssignableExpression.class,0);
}
public KtAssignableExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignableExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAssignableExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAssignableExpression(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAssignableExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAssignableExpression assignableExpression() throws RecognitionException {
KtAssignableExpression _localctx = new KtAssignableExpression(_ctx, getState());
enterRule(_localctx, 192, RULE_assignableExpression);
try {
setState(2353);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,349,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(2351);
prefixUnaryExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(2352);
parenthesizedAssignableExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParenthesizedAssignableExpression extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtAssignableExpression assignableExpression() {
return getRuleContext(KtAssignableExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParenthesizedAssignableExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenthesizedAssignableExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParenthesizedAssignableExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParenthesizedAssignableExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParenthesizedAssignableExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParenthesizedAssignableExpression parenthesizedAssignableExpression() throws RecognitionException {
KtParenthesizedAssignableExpression _localctx = new KtParenthesizedAssignableExpression(_ctx, getState());
enterRule(_localctx, 194, RULE_parenthesizedAssignableExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2355);
match(LPAREN);
setState(2359);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2356);
match(NL);
}
}
setState(2361);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2362);
assignableExpression();
setState(2366);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2363);
match(NL);
}
}
setState(2368);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2369);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAssignableSuffix extends KotlinInnerNode {
public KtTypeArguments typeArguments() {
return getRuleContext(KtTypeArguments.class,0);
}
public KtIndexingSuffix indexingSuffix() {
return getRuleContext(KtIndexingSuffix.class,0);
}
public KtNavigationSuffix navigationSuffix() {
return getRuleContext(KtNavigationSuffix.class,0);
}
public KtAssignableSuffix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignableSuffix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAssignableSuffix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAssignableSuffix(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAssignableSuffix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAssignableSuffix assignableSuffix() throws RecognitionException {
KtAssignableSuffix _localctx = new KtAssignableSuffix(_ctx, getState());
enterRule(_localctx, 196, RULE_assignableSuffix);
try {
setState(2374);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LANGLE:
enterOuterAlt(_localctx, 1);
{
setState(2371);
typeArguments();
}
break;
case LSQUARE:
enterOuterAlt(_localctx, 2);
{
setState(2372);
indexingSuffix();
}
break;
case NL:
case DOT:
case COLONCOLON:
case QUEST_NO_WS:
enterOuterAlt(_localctx, 3);
{
setState(2373);
navigationSuffix();
}
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 KtIndexingSuffix extends KotlinInnerNode {
public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); }
public List expression() {
return getRuleContexts(KtExpression.class);
}
public KtExpression expression(int i) {
return getRuleContext(KtExpression.class,i);
}
public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtIndexingSuffix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_indexingSuffix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterIndexingSuffix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitIndexingSuffix(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitIndexingSuffix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtIndexingSuffix indexingSuffix() throws RecognitionException {
KtIndexingSuffix _localctx = new KtIndexingSuffix(_ctx, getState());
enterRule(_localctx, 198, RULE_indexingSuffix);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2376);
match(LSQUARE);
setState(2380);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2377);
match(NL);
}
}
setState(2382);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2383);
expression();
setState(2400);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,356,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2387);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2384);
match(NL);
}
}
setState(2389);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2390);
match(COMMA);
setState(2394);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2391);
match(NL);
}
}
setState(2396);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2397);
expression();
}
}
}
setState(2402);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,356,_ctx);
}
setState(2410);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,358,_ctx) ) {
case 1:
{
setState(2406);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2403);
match(NL);
}
}
setState(2408);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2409);
match(COMMA);
}
break;
}
setState(2415);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2412);
match(NL);
}
}
setState(2417);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2418);
match(RSQUARE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtNavigationSuffix extends KotlinInnerNode {
public KtMemberAccessOperator memberAccessOperator() {
return getRuleContext(KtMemberAccessOperator.class,0);
}
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtParenthesizedExpression parenthesizedExpression() {
return getRuleContext(KtParenthesizedExpression.class,0);
}
public TerminalNode CLASS() { return getToken(KotlinParser.CLASS, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtNavigationSuffix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_navigationSuffix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterNavigationSuffix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitNavigationSuffix(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitNavigationSuffix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtNavigationSuffix navigationSuffix() throws RecognitionException {
KtNavigationSuffix _localctx = new KtNavigationSuffix(_ctx, getState());
enterRule(_localctx, 200, RULE_navigationSuffix);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2420);
memberAccessOperator();
setState(2424);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2421);
match(NL);
}
}
setState(2426);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2430);
_errHandler.sync(this);
switch (_input.LA(1)) {
case FILE:
case FIELD:
case PROPERTY:
case GET:
case SET:
case RECEIVER:
case PARAM:
case SETPARAM:
case DELEGATE:
case IMPORT:
case CONSTRUCTOR:
case BY:
case COMPANION:
case INIT:
case WHERE:
case CATCH:
case FINALLY:
case OUT:
case DYNAMIC:
case PUBLIC:
case PRIVATE:
case PROTECTED:
case INTERNAL:
case ENUM:
case SEALED:
case ANNOTATION:
case DATA:
case INNER:
case VALUE:
case TAILREC:
case OPERATOR:
case INLINE:
case INFIX:
case EXTERNAL:
case SUSPEND:
case OVERRIDE:
case ABSTRACT:
case FINAL:
case OPEN:
case CONST:
case LATEINIT:
case VARARG:
case NOINLINE:
case CROSSINLINE:
case REIFIED:
case EXPECT:
case ACTUAL:
case Identifier:
{
setState(2427);
simpleIdentifier();
}
break;
case LPAREN:
{
setState(2428);
parenthesizedExpression();
}
break;
case CLASS:
{
setState(2429);
match(CLASS);
}
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 KtCallSuffix extends KotlinInnerNode {
public KtAnnotatedLambda annotatedLambda() {
return getRuleContext(KtAnnotatedLambda.class,0);
}
public KtValueArguments valueArguments() {
return getRuleContext(KtValueArguments.class,0);
}
public KtTypeArguments typeArguments() {
return getRuleContext(KtTypeArguments.class,0);
}
public KtCallSuffix(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_callSuffix; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterCallSuffix(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitCallSuffix(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitCallSuffix(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtCallSuffix callSuffix() throws RecognitionException {
KtCallSuffix _localctx = new KtCallSuffix(_ctx, getState());
enterRule(_localctx, 202, RULE_callSuffix);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2433);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LANGLE) {
{
setState(2432);
typeArguments();
}
}
setState(2440);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,364,_ctx) ) {
case 1:
{
setState(2436);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(2435);
valueArguments();
}
}
setState(2438);
annotatedLambda();
}
break;
case 2:
{
setState(2439);
valueArguments();
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtAnnotatedLambda extends KotlinInnerNode {
public KtLambdaLiteral lambdaLiteral() {
return getRuleContext(KtLambdaLiteral.class,0);
}
public List annotation() {
return getRuleContexts(KtAnnotation.class);
}
public KtAnnotation annotation(int i) {
return getRuleContext(KtAnnotation.class,i);
}
public KtLabel label() {
return getRuleContext(KtLabel.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtAnnotatedLambda(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_annotatedLambda; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterAnnotatedLambda(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitAnnotatedLambda(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitAnnotatedLambda(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtAnnotatedLambda annotatedLambda() throws RecognitionException {
KtAnnotatedLambda _localctx = new KtAnnotatedLambda(_ctx, getState());
enterRule(_localctx, 204, RULE_annotatedLambda);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2445);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==AT_NO_WS || _la==AT_PRE_WS) {
{
{
setState(2442);
annotation();
}
}
setState(2447);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2449);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 62)) & ~0x3f) == 0 && ((1L << (_la - 62)) & ((1L << (FILE - 62)) | (1L << (FIELD - 62)) | (1L << (PROPERTY - 62)) | (1L << (GET - 62)) | (1L << (SET - 62)) | (1L << (RECEIVER - 62)) | (1L << (PARAM - 62)) | (1L << (SETPARAM - 62)) | (1L << (DELEGATE - 62)) | (1L << (IMPORT - 62)) | (1L << (CONSTRUCTOR - 62)) | (1L << (BY - 62)) | (1L << (COMPANION - 62)) | (1L << (INIT - 62)) | (1L << (WHERE - 62)) | (1L << (CATCH - 62)) | (1L << (FINALLY - 62)) | (1L << (OUT - 62)) | (1L << (DYNAMIC - 62)) | (1L << (PUBLIC - 62)) | (1L << (PRIVATE - 62)) | (1L << (PROTECTED - 62)) | (1L << (INTERNAL - 62)) | (1L << (ENUM - 62)) | (1L << (SEALED - 62)) | (1L << (ANNOTATION - 62)) | (1L << (DATA - 62)) | (1L << (INNER - 62)) | (1L << (VALUE - 62)) | (1L << (TAILREC - 62)) | (1L << (OPERATOR - 62)) | (1L << (INLINE - 62)) | (1L << (INFIX - 62)) | (1L << (EXTERNAL - 62)) | (1L << (SUSPEND - 62)) | (1L << (OVERRIDE - 62)) | (1L << (ABSTRACT - 62)))) != 0) || ((((_la - 126)) & ~0x3f) == 0 && ((1L << (_la - 126)) & ((1L << (FINAL - 126)) | (1L << (OPEN - 126)) | (1L << (CONST - 126)) | (1L << (LATEINIT - 126)) | (1L << (VARARG - 126)) | (1L << (NOINLINE - 126)) | (1L << (CROSSINLINE - 126)) | (1L << (REIFIED - 126)) | (1L << (EXPECT - 126)) | (1L << (ACTUAL - 126)) | (1L << (Identifier - 126)))) != 0)) {
{
setState(2448);
label();
}
}
setState(2454);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2451);
match(NL);
}
}
setState(2456);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2457);
lambdaLiteral();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtTypeArguments extends KotlinInnerNode {
public TerminalNode LANGLE() { return getToken(KotlinParser.LANGLE, 0); }
public List typeProjection() {
return getRuleContexts(KtTypeProjection.class);
}
public KtTypeProjection typeProjection(int i) {
return getRuleContext(KtTypeProjection.class,i);
}
public TerminalNode RANGLE() { return getToken(KotlinParser.RANGLE, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtTypeArguments(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_typeArguments; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterTypeArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitTypeArguments(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitTypeArguments(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtTypeArguments typeArguments() throws RecognitionException {
KtTypeArguments _localctx = new KtTypeArguments(_ctx, getState());
enterRule(_localctx, 206, RULE_typeArguments);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2459);
match(LANGLE);
setState(2463);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2460);
match(NL);
}
}
setState(2465);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2466);
typeProjection();
setState(2483);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,371,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2470);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2467);
match(NL);
}
}
setState(2472);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2473);
match(COMMA);
setState(2477);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2474);
match(NL);
}
}
setState(2479);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2480);
typeProjection();
}
}
}
setState(2485);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,371,_ctx);
}
setState(2493);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,373,_ctx) ) {
case 1:
{
setState(2489);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2486);
match(NL);
}
}
setState(2491);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2492);
match(COMMA);
}
break;
}
setState(2498);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2495);
match(NL);
}
}
setState(2500);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2501);
match(RANGLE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtValueArguments extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List valueArgument() {
return getRuleContexts(KtValueArgument.class);
}
public KtValueArgument valueArgument(int i) {
return getRuleContext(KtValueArgument.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtValueArguments(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_valueArguments; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterValueArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitValueArguments(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitValueArguments(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtValueArguments valueArguments() throws RecognitionException {
KtValueArguments _localctx = new KtValueArguments(_ctx, getState());
enterRule(_localctx, 208, RULE_valueArguments);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2503);
match(LPAREN);
setState(2507);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,375,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2504);
match(NL);
}
}
}
setState(2509);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,375,_ctx);
}
setState(2545);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NL) | (1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << MULT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL_WS) | (1L << EXCL_NO_WS) | (1L << COLONCOLON) | (1L << AT_NO_WS) | (1L << AT_PRE_WS) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << THIS_AT) | (1L << SUPER_AT) | (1L << FILE) | (1L << FIELD))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (PROPERTY - 64)) | (1L << (GET - 64)) | (1L << (SET - 64)) | (1L << (RECEIVER - 64)) | (1L << (PARAM - 64)) | (1L << (SETPARAM - 64)) | (1L << (DELEGATE - 64)) | (1L << (IMPORT - 64)) | (1L << (FUN - 64)) | (1L << (OBJECT - 64)) | (1L << (CONSTRUCTOR - 64)) | (1L << (BY - 64)) | (1L << (COMPANION - 64)) | (1L << (INIT - 64)) | (1L << (THIS - 64)) | (1L << (SUPER - 64)) | (1L << (WHERE - 64)) | (1L << (IF - 64)) | (1L << (WHEN - 64)) | (1L << (TRY - 64)) | (1L << (CATCH - 64)) | (1L << (FINALLY - 64)) | (1L << (THROW - 64)) | (1L << (RETURN - 64)) | (1L << (CONTINUE - 64)) | (1L << (BREAK - 64)) | (1L << (OUT - 64)) | (1L << (DYNAMIC - 64)) | (1L << (PUBLIC - 64)) | (1L << (PRIVATE - 64)) | (1L << (PROTECTED - 64)) | (1L << (INTERNAL - 64)) | (1L << (ENUM - 64)) | (1L << (SEALED - 64)) | (1L << (ANNOTATION - 64)) | (1L << (DATA - 64)) | (1L << (INNER - 64)) | (1L << (VALUE - 64)) | (1L << (TAILREC - 64)) | (1L << (OPERATOR - 64)) | (1L << (INLINE - 64)) | (1L << (INFIX - 64)) | (1L << (EXTERNAL - 64)) | (1L << (SUSPEND - 64)) | (1L << (OVERRIDE - 64)) | (1L << (ABSTRACT - 64)) | (1L << (FINAL - 64)) | (1L << (OPEN - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (CONST - 128)) | (1L << (LATEINIT - 128)) | (1L << (VARARG - 128)) | (1L << (NOINLINE - 128)) | (1L << (CROSSINLINE - 128)) | (1L << (REIFIED - 128)) | (1L << (EXPECT - 128)) | (1L << (ACTUAL - 128)) | (1L << (RealLiteral - 128)) | (1L << (IntegerLiteral - 128)) | (1L << (HexLiteral - 128)) | (1L << (BinLiteral - 128)) | (1L << (UnsignedLiteral - 128)) | (1L << (LongLiteral - 128)) | (1L << (BooleanLiteral - 128)) | (1L << (NullLiteral - 128)) | (1L << (CharacterLiteral - 128)) | (1L << (Identifier - 128)) | (1L << (QUOTE_OPEN - 128)) | (1L << (TRIPLE_QUOTE_OPEN - 128)))) != 0)) {
{
setState(2510);
valueArgument();
setState(2527);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,378,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2514);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2511);
match(NL);
}
}
setState(2516);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2517);
match(COMMA);
setState(2521);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,377,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2518);
match(NL);
}
}
}
setState(2523);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,377,_ctx);
}
setState(2524);
valueArgument();
}
}
}
setState(2529);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,378,_ctx);
}
setState(2537);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,380,_ctx) ) {
case 1:
{
setState(2533);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2530);
match(NL);
}
}
setState(2535);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2536);
match(COMMA);
}
break;
}
setState(2542);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2539);
match(NL);
}
}
setState(2544);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(2547);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtValueArgument extends KotlinInnerNode {
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public KtAnnotation annotation() {
return getRuleContext(KtAnnotation.class,0);
}
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public TerminalNode ASSIGNMENT() { return getToken(KotlinParser.ASSIGNMENT, 0); }
public TerminalNode MULT() { return getToken(KotlinParser.MULT, 0); }
public KtValueArgument(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_valueArgument; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterValueArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitValueArgument(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitValueArgument(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtValueArgument valueArgument() throws RecognitionException {
KtValueArgument _localctx = new KtValueArgument(_ctx, getState());
enterRule(_localctx, 210, RULE_valueArgument);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2550);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,383,_ctx) ) {
case 1:
{
setState(2549);
annotation();
}
break;
}
setState(2555);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,384,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2552);
match(NL);
}
}
}
setState(2557);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,384,_ctx);
}
setState(2572);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,387,_ctx) ) {
case 1:
{
setState(2558);
simpleIdentifier();
setState(2562);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2559);
match(NL);
}
}
setState(2564);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2565);
match(ASSIGNMENT);
setState(2569);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,386,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2566);
match(NL);
}
}
}
setState(2571);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,386,_ctx);
}
}
break;
}
setState(2575);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==MULT) {
{
setState(2574);
match(MULT);
}
}
setState(2580);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2577);
match(NL);
}
}
setState(2582);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2583);
expression();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtPrimaryExpression extends KotlinInnerNode {
public KtParenthesizedExpression parenthesizedExpression() {
return getRuleContext(KtParenthesizedExpression.class,0);
}
public KtSimpleIdentifier simpleIdentifier() {
return getRuleContext(KtSimpleIdentifier.class,0);
}
public KtLiteralConstant literalConstant() {
return getRuleContext(KtLiteralConstant.class,0);
}
public KtStringLiteral stringLiteral() {
return getRuleContext(KtStringLiteral.class,0);
}
public KtCallableReference callableReference() {
return getRuleContext(KtCallableReference.class,0);
}
public KtFunctionLiteral functionLiteral() {
return getRuleContext(KtFunctionLiteral.class,0);
}
public KtObjectLiteral objectLiteral() {
return getRuleContext(KtObjectLiteral.class,0);
}
public KtCollectionLiteral collectionLiteral() {
return getRuleContext(KtCollectionLiteral.class,0);
}
public KtThisExpression thisExpression() {
return getRuleContext(KtThisExpression.class,0);
}
public KtSuperExpression superExpression() {
return getRuleContext(KtSuperExpression.class,0);
}
public KtIfExpression ifExpression() {
return getRuleContext(KtIfExpression.class,0);
}
public KtWhenExpression whenExpression() {
return getRuleContext(KtWhenExpression.class,0);
}
public KtTryExpression tryExpression() {
return getRuleContext(KtTryExpression.class,0);
}
public KtJumpExpression jumpExpression() {
return getRuleContext(KtJumpExpression.class,0);
}
public KtPrimaryExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterPrimaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitPrimaryExpression(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitPrimaryExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtPrimaryExpression primaryExpression() throws RecognitionException {
KtPrimaryExpression _localctx = new KtPrimaryExpression(_ctx, getState());
enterRule(_localctx, 212, RULE_primaryExpression);
try {
setState(2599);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,390,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(2585);
parenthesizedExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(2586);
simpleIdentifier();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(2587);
literalConstant();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(2588);
stringLiteral();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(2589);
callableReference();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(2590);
functionLiteral();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
setState(2591);
objectLiteral();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
setState(2592);
collectionLiteral();
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
setState(2593);
thisExpression();
}
break;
case 10:
enterOuterAlt(_localctx, 10);
{
setState(2594);
superExpression();
}
break;
case 11:
enterOuterAlt(_localctx, 11);
{
setState(2595);
ifExpression();
}
break;
case 12:
enterOuterAlt(_localctx, 12);
{
setState(2596);
whenExpression();
}
break;
case 13:
enterOuterAlt(_localctx, 13);
{
setState(2597);
tryExpression();
}
break;
case 14:
enterOuterAlt(_localctx, 14);
{
setState(2598);
jumpExpression();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtParenthesizedExpression extends KotlinInnerNode {
public TerminalNode LPAREN() { return getToken(KotlinParser.LPAREN, 0); }
public KtExpression expression() {
return getRuleContext(KtExpression.class,0);
}
public TerminalNode RPAREN() { return getToken(KotlinParser.RPAREN, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public KtParenthesizedExpression(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parenthesizedExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterParenthesizedExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitParenthesizedExpression(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitParenthesizedExpression(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtParenthesizedExpression parenthesizedExpression() throws RecognitionException {
KtParenthesizedExpression _localctx = new KtParenthesizedExpression(_ctx, getState());
enterRule(_localctx, 214, RULE_parenthesizedExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2601);
match(LPAREN);
setState(2605);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2602);
match(NL);
}
}
setState(2607);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2608);
expression();
setState(2612);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2609);
match(NL);
}
}
setState(2614);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2615);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtCollectionLiteral extends KotlinInnerNode {
public TerminalNode LSQUARE() { return getToken(KotlinParser.LSQUARE, 0); }
public TerminalNode RSQUARE() { return getToken(KotlinParser.RSQUARE, 0); }
public List NL() { return getTokens(KotlinParser.NL); }
public TerminalNode NL(int i) {
return getToken(KotlinParser.NL, i);
}
public List expression() {
return getRuleContexts(KtExpression.class);
}
public KtExpression expression(int i) {
return getRuleContext(KtExpression.class,i);
}
public List COMMA() { return getTokens(KotlinParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(KotlinParser.COMMA, i);
}
public KtCollectionLiteral(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_collectionLiteral; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterCollectionLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitCollectionLiteral(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitCollectionLiteral(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtCollectionLiteral collectionLiteral() throws RecognitionException {
KtCollectionLiteral _localctx = new KtCollectionLiteral(_ctx, getState());
enterRule(_localctx, 216, RULE_collectionLiteral);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(2617);
match(LSQUARE);
setState(2621);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2618);
match(NL);
}
}
setState(2623);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2659);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LPAREN) | (1L << LSQUARE) | (1L << LCURL) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << EXCL_WS) | (1L << EXCL_NO_WS) | (1L << COLONCOLON) | (1L << AT_NO_WS) | (1L << AT_PRE_WS) | (1L << RETURN_AT) | (1L << CONTINUE_AT) | (1L << BREAK_AT) | (1L << THIS_AT) | (1L << SUPER_AT) | (1L << FILE) | (1L << FIELD))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (PROPERTY - 64)) | (1L << (GET - 64)) | (1L << (SET - 64)) | (1L << (RECEIVER - 64)) | (1L << (PARAM - 64)) | (1L << (SETPARAM - 64)) | (1L << (DELEGATE - 64)) | (1L << (IMPORT - 64)) | (1L << (FUN - 64)) | (1L << (OBJECT - 64)) | (1L << (CONSTRUCTOR - 64)) | (1L << (BY - 64)) | (1L << (COMPANION - 64)) | (1L << (INIT - 64)) | (1L << (THIS - 64)) | (1L << (SUPER - 64)) | (1L << (WHERE - 64)) | (1L << (IF - 64)) | (1L << (WHEN - 64)) | (1L << (TRY - 64)) | (1L << (CATCH - 64)) | (1L << (FINALLY - 64)) | (1L << (THROW - 64)) | (1L << (RETURN - 64)) | (1L << (CONTINUE - 64)) | (1L << (BREAK - 64)) | (1L << (OUT - 64)) | (1L << (DYNAMIC - 64)) | (1L << (PUBLIC - 64)) | (1L << (PRIVATE - 64)) | (1L << (PROTECTED - 64)) | (1L << (INTERNAL - 64)) | (1L << (ENUM - 64)) | (1L << (SEALED - 64)) | (1L << (ANNOTATION - 64)) | (1L << (DATA - 64)) | (1L << (INNER - 64)) | (1L << (VALUE - 64)) | (1L << (TAILREC - 64)) | (1L << (OPERATOR - 64)) | (1L << (INLINE - 64)) | (1L << (INFIX - 64)) | (1L << (EXTERNAL - 64)) | (1L << (SUSPEND - 64)) | (1L << (OVERRIDE - 64)) | (1L << (ABSTRACT - 64)) | (1L << (FINAL - 64)) | (1L << (OPEN - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (CONST - 128)) | (1L << (LATEINIT - 128)) | (1L << (VARARG - 128)) | (1L << (NOINLINE - 128)) | (1L << (CROSSINLINE - 128)) | (1L << (REIFIED - 128)) | (1L << (EXPECT - 128)) | (1L << (ACTUAL - 128)) | (1L << (RealLiteral - 128)) | (1L << (IntegerLiteral - 128)) | (1L << (HexLiteral - 128)) | (1L << (BinLiteral - 128)) | (1L << (UnsignedLiteral - 128)) | (1L << (LongLiteral - 128)) | (1L << (BooleanLiteral - 128)) | (1L << (NullLiteral - 128)) | (1L << (CharacterLiteral - 128)) | (1L << (Identifier - 128)) | (1L << (QUOTE_OPEN - 128)) | (1L << (TRIPLE_QUOTE_OPEN - 128)))) != 0)) {
{
setState(2624);
expression();
setState(2641);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,396,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(2628);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2625);
match(NL);
}
}
setState(2630);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2631);
match(COMMA);
setState(2635);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2632);
match(NL);
}
}
setState(2637);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2638);
expression();
}
}
}
setState(2643);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,396,_ctx);
}
setState(2651);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,398,_ctx) ) {
case 1:
{
setState(2647);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2644);
match(NL);
}
}
setState(2649);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2650);
match(COMMA);
}
break;
}
setState(2656);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(2653);
match(NL);
}
}
setState(2658);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
setState(2661);
match(RSQUARE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtLiteralConstant extends KotlinInnerNode {
public TerminalNode BooleanLiteral() { return getToken(KotlinParser.BooleanLiteral, 0); }
public TerminalNode IntegerLiteral() { return getToken(KotlinParser.IntegerLiteral, 0); }
public TerminalNode HexLiteral() { return getToken(KotlinParser.HexLiteral, 0); }
public TerminalNode BinLiteral() { return getToken(KotlinParser.BinLiteral, 0); }
public TerminalNode CharacterLiteral() { return getToken(KotlinParser.CharacterLiteral, 0); }
public TerminalNode RealLiteral() { return getToken(KotlinParser.RealLiteral, 0); }
public TerminalNode NullLiteral() { return getToken(KotlinParser.NullLiteral, 0); }
public TerminalNode LongLiteral() { return getToken(KotlinParser.LongLiteral, 0); }
public TerminalNode UnsignedLiteral() { return getToken(KotlinParser.UnsignedLiteral, 0); }
public KtLiteralConstant(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_literalConstant; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterLiteralConstant(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitLiteralConstant(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitLiteralConstant(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtLiteralConstant literalConstant() throws RecognitionException {
KtLiteralConstant _localctx = new KtLiteralConstant(_ctx, getState());
enterRule(_localctx, 218, RULE_literalConstant);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2663);
_la = _input.LA(1);
if ( !(((((_la - 136)) & ~0x3f) == 0 && ((1L << (_la - 136)) & ((1L << (RealLiteral - 136)) | (1L << (IntegerLiteral - 136)) | (1L << (HexLiteral - 136)) | (1L << (BinLiteral - 136)) | (1L << (UnsignedLiteral - 136)) | (1L << (LongLiteral - 136)) | (1L << (BooleanLiteral - 136)) | (1L << (NullLiteral - 136)) | (1L << (CharacterLiteral - 136)))) != 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 KtStringLiteral extends KotlinInnerNode {
public KtLineStringLiteral lineStringLiteral() {
return getRuleContext(KtLineStringLiteral.class,0);
}
public KtMultiLineStringLiteral multiLineStringLiteral() {
return getRuleContext(KtMultiLineStringLiteral.class,0);
}
public KtStringLiteral(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_stringLiteral; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterStringLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitStringLiteral(this);
}
@Override
public
R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitStringLiteral(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtStringLiteral stringLiteral() throws RecognitionException {
KtStringLiteral _localctx = new KtStringLiteral(_ctx, getState());
enterRule(_localctx, 220, RULE_stringLiteral);
try {
setState(2667);
_errHandler.sync(this);
switch (_input.LA(1)) {
case QUOTE_OPEN:
enterOuterAlt(_localctx, 1);
{
setState(2665);
lineStringLiteral();
}
break;
case TRIPLE_QUOTE_OPEN:
enterOuterAlt(_localctx, 2);
{
setState(2666);
multiLineStringLiteral();
}
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 KtLineStringLiteral extends KotlinInnerNode {
public TerminalNode QUOTE_OPEN() { return getToken(KotlinParser.QUOTE_OPEN, 0); }
public TerminalNode QUOTE_CLOSE() { return getToken(KotlinParser.QUOTE_CLOSE, 0); }
public List lineStringContent() {
return getRuleContexts(KtLineStringContent.class);
}
public KtLineStringContent lineStringContent(int i) {
return getRuleContext(KtLineStringContent.class,i);
}
public List lineStringExpression() {
return getRuleContexts(KtLineStringExpression.class);
}
public KtLineStringExpression lineStringExpression(int i) {
return getRuleContext(KtLineStringExpression.class,i);
}
public KtLineStringLiteral(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_lineStringLiteral; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).enterLineStringLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof KotlinListener ) ((KotlinListener)listener).exitLineStringLiteral(this);
}
@Override
public R acceptVisitor(AstVisitor super P, ? extends R> visitor, P data) {
if ( visitor instanceof KotlinVisitor ) return ((KotlinVisitor super P, ? extends R>) visitor).visitLineStringLiteral(this, data);
else return super.acceptVisitor(visitor, data);
}
}
public final KtLineStringLiteral lineStringLiteral() throws RecognitionException {
KtLineStringLiteral _localctx = new KtLineStringLiteral(_ctx, getState());
enterRule(_localctx, 222, RULE_lineStringLiteral);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(2669);
match(QUOTE_OPEN);
setState(2674);
_errHandler.sync(this);
_la = _input.LA(1);
while (((((_la - 160)) & ~0x3f) == 0 && ((1L << (_la - 160)) & ((1L << (LineStrRef - 160)) | (1L << (LineStrText - 160)) | (1L << (LineStrEscapedChar - 160)) | (1L << (LineStrExprStart - 160)))) != 0)) {
{
setState(2672);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LineStrRef:
case LineStrText:
case LineStrEscapedChar:
{
setState(2670);
lineStringContent();
}
break;
case LineStrExprStart:
{
setState(2671);
lineStringExpression();
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(2676);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(2677);
match(QUOTE_CLOSE);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KtMultiLineStringLiteral extends KotlinInnerNode {
public TerminalNode TRIPLE_QUOTE_OPEN() { return getToken(KotlinParser.TRIPLE_QUOTE_OPEN, 0); }
public TerminalNode TRIPLE_QUOTE_CLOSE() { return getToken(KotlinParser.TRIPLE_QUOTE_CLOSE, 0); }
public List