Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
llmeier.rubysrc2cpg_3.2.0.440+7-e7df7a79.source-code.DeprecatedRubyParser Maven / Gradle / Ivy
// Generated from /home/mp/Projects/shiftleft/joern/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/deprecated/parser/DeprecatedRubyParser.g4 by ANTLR 4.7.2
package io.joern.rubysrc2cpg.deprecated.parser;
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 DeprecatedRubyParser extends Parser {
static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
STRING_INTERPOLATION_END=1, REGULAR_EXPRESSION_INTERPOLATION_END=2, REGULAR_EXPRESSION_START=3,
QUOTED_NON_EXPANDED_STRING_LITERAL_END=4, QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END=5,
QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END=6, QUOTED_EXPANDED_REGULAR_EXPRESSION_END=7,
QUOTED_EXPANDED_STRING_LITERAL_END=8, QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_END=9,
QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END=10, QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END=11,
DELIMITED_STRING_INTERPOLATION_END=12, DELIMITED_ARRAY_ITEM_INTERPOLATION_END=13,
NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE=14, EXPANDED_LITERAL_CHARACTER_SEQUENCE=15,
LINE__=16, ENCODING__=17, FILE__=18, BEGIN_=19, END_=20, ALIAS=21, AND=22,
BEGIN=23, BREAK=24, CASE=25, CLASS=26, DEF=27, IS_DEFINED=28, DO=29, ELSE=30,
ELSIF=31, END=32, ENSURE=33, FOR=34, FALSE=35, IF=36, IN=37, MODULE=38,
NEXT=39, NIL=40, NOT=41, OR=42, REDO=43, RESCUE=44, RETRY=45, RETURN=46,
SELF=47, SUPER=48, THEN=49, TRUE=50, UNDEF=51, UNLESS=52, UNTIL=53, WHEN=54,
WHILE=55, YIELD=56, LBRACK=57, RBRACK=58, LPAREN=59, RPAREN=60, LCURLY=61,
RCURLY=62, COLON=63, COLON2=64, COMMA=65, SEMI=66, DOT=67, DOT2=68, DOT3=69,
QMARK=70, EQGT=71, MINUSGT=72, EMARK=73, EMARKEQ=74, EMARKTILDE=75, AMP=76,
AMP2=77, AMPDOT=78, BAR=79, BAR2=80, EQ=81, EQ2=82, EQ3=83, CARET=84,
LTEQGT=85, EQTILDE=86, GT=87, GTEQ=88, LT=89, LTEQ=90, LT2=91, GT2=92,
PLUS=93, MINUS=94, STAR=95, STAR2=96, SLASH=97, PERCENT=98, TILDE=99,
PLUSAT=100, MINUSAT=101, ASSIGNMENT_OPERATOR=102, SINGLE_QUOTED_STRING_LITERAL=103,
DOUBLE_QUOTED_STRING_START=104, QUOTED_NON_EXPANDED_STRING_LITERAL_START=105,
QUOTED_EXPANDED_STRING_LITERAL_START=106, QUOTED_EXPANDED_REGULAR_EXPRESSION_START=107,
QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START=108, QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START=109,
QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START=110, HERE_DOC_IDENTIFIER=111,
HERE_DOC=112, QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START=113, QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START=114,
END_OF_PROGRAM_MARKER=115, DECIMAL_INTEGER_LITERAL=116, BINARY_INTEGER_LITERAL=117,
OCTAL_INTEGER_LITERAL=118, HEXADECIMAL_INTEGER_LITERAL=119, FLOAT_LITERAL_WITHOUT_EXPONENT=120,
FLOAT_LITERAL_WITH_EXPONENT=121, NL=122, WS=123, SYMBOL_LITERAL=124, LOCAL_VARIABLE_IDENTIFIER=125,
GLOBAL_VARIABLE_IDENTIFIER=126, INSTANCE_VARIABLE_IDENTIFIER=127, CLASS_VARIABLE_IDENTIFIER=128,
CONSTANT_IDENTIFIER=129, ASSIGNMENT_LIKE_METHOD_IDENTIFIER=130, SINGLE_LINE_COMMENT=131,
MULTI_LINE_COMMENT=132, UNRECOGNIZED=133, DOUBLE_QUOTED_STRING_END=134,
DOUBLE_QUOTED_STRING_CHARACTER_SEQUENCE=135, INTERPOLATED_CHARACTER_SEQUENCE=136,
STRING_INTERPOLATION_BEGIN=137, DELIMITED_STRING_INTERPOLATION_BEGIN=138,
EXPANDED_VARIABLE_CHARACTER_SEQUENCE=139, EXPANDED_LITERAL_CHARACTER=140,
NON_EXPANDED_LITERAL_CHARACTER=141, DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN=142,
EXPANDED_ARRAY_ITEM_SEPARATOR=143, EXPANDED_ARRAY_ITEM_CHARACTER=144,
NON_EXPANDED_ARRAY_ITEM_SEPARATOR=145, NON_EXPANDED_ARRAY_ITEM_CHARACTER=146,
REGULAR_EXPRESSION_END=147, REGULAR_EXPRESSION_BODY=148, REGULAR_EXPRESSION_INTERPOLATION_BEGIN=149,
DATA_SECTION_CONTENT=150;
public static final int
RULE_program = 0, RULE_compoundStatement = 1, RULE_statements = 2, RULE_statement = 3,
RULE_expressionOrCommand = 4, RULE_expression = 5, RULE_primary = 6, RULE_singleLeftHandSide = 7,
RULE_multipleLeftHandSide = 8, RULE_multipleLeftHandSideItem = 9, RULE_packingLeftHandSide = 10,
RULE_groupedLeftHandSide = 11, RULE_multipleRightHandSide = 12, RULE_expressionOrCommands = 13,
RULE_invocationWithoutParentheses = 14, RULE_command = 15, RULE_chainedCommandWithDoBlock = 16,
RULE_commandWithDoBlock = 17, RULE_argumentsWithoutParentheses = 18, RULE_arguments = 19,
RULE_argument = 20, RULE_blockArgument = 21, RULE_splattingArgument = 22,
RULE_indexingArguments = 23, RULE_argumentsWithParentheses = 24, RULE_expressions = 25,
RULE_block = 26, RULE_braceBlock = 27, RULE_doBlock = 28, RULE_blockParameter = 29,
RULE_blockParameters = 30, RULE_arrayConstructor = 31, RULE_expandedArrayElements = 32,
RULE_expandedArrayElement = 33, RULE_delimitedArrayItemInterpolation = 34,
RULE_nonExpandedArrayElements = 35, RULE_nonExpandedArrayElement = 36,
RULE_hashConstructor = 37, RULE_hashConstructorElements = 38, RULE_hashConstructorElement = 39,
RULE_associations = 40, RULE_association = 41, RULE_methodDefinition = 42,
RULE_procDefinition = 43, RULE_methodNamePart = 44, RULE_singletonObject = 45,
RULE_definedMethodName = 46, RULE_assignmentLikeMethodIdentifier = 47,
RULE_methodName = 48, RULE_methodIdentifier = 49, RULE_methodOnlyIdentifier = 50,
RULE_methodParameterPart = 51, RULE_parameters = 52, RULE_parameter = 53,
RULE_mandatoryParameter = 54, RULE_optionalParameter = 55, RULE_arrayParameter = 56,
RULE_hashParameter = 57, RULE_keywordParameter = 58, RULE_procParameter = 59,
RULE_ifExpression = 60, RULE_thenClause = 61, RULE_elsifClause = 62, RULE_elseClause = 63,
RULE_unlessExpression = 64, RULE_caseExpression = 65, RULE_whenClause = 66,
RULE_whenArgument = 67, RULE_whileExpression = 68, RULE_doClause = 69,
RULE_untilExpression = 70, RULE_forExpression = 71, RULE_forVariable = 72,
RULE_beginExpression = 73, RULE_bodyStatement = 74, RULE_rescueClause = 75,
RULE_exceptionClass = 76, RULE_exceptionVariableAssignment = 77, RULE_ensureClause = 78,
RULE_classDefinition = 79, RULE_classOrModuleReference = 80, RULE_moduleDefinition = 81,
RULE_yieldWithOptionalArgument = 82, RULE_jumpExpression = 83, RULE_variableReference = 84,
RULE_variableIdentifier = 85, RULE_pseudoVariableIdentifier = 86, RULE_scopedConstantReference = 87,
RULE_literal = 88, RULE_symbol = 89, RULE_stringExpression = 90, RULE_quotedStringExpression = 91,
RULE_simpleString = 92, RULE_delimitedStringInterpolation = 93, RULE_stringInterpolation = 94,
RULE_interpolatedStringSequence = 95, RULE_regexInterpolation = 96, RULE_interpolatedRegexSequence = 97,
RULE_quotedRegexInterpolation = 98, RULE_numericLiteral = 99, RULE_unsignedNumericLiteral = 100,
RULE_definedMethodNameOrSymbol = 101, RULE_keyword = 102, RULE_operatorMethodName = 103;
private static String[] makeRuleNames() {
return new String[] {
"program", "compoundStatement", "statements", "statement", "expressionOrCommand",
"expression", "primary", "singleLeftHandSide", "multipleLeftHandSide",
"multipleLeftHandSideItem", "packingLeftHandSide", "groupedLeftHandSide",
"multipleRightHandSide", "expressionOrCommands", "invocationWithoutParentheses",
"command", "chainedCommandWithDoBlock", "commandWithDoBlock", "argumentsWithoutParentheses",
"arguments", "argument", "blockArgument", "splattingArgument", "indexingArguments",
"argumentsWithParentheses", "expressions", "block", "braceBlock", "doBlock",
"blockParameter", "blockParameters", "arrayConstructor", "expandedArrayElements",
"expandedArrayElement", "delimitedArrayItemInterpolation", "nonExpandedArrayElements",
"nonExpandedArrayElement", "hashConstructor", "hashConstructorElements",
"hashConstructorElement", "associations", "association", "methodDefinition",
"procDefinition", "methodNamePart", "singletonObject", "definedMethodName",
"assignmentLikeMethodIdentifier", "methodName", "methodIdentifier", "methodOnlyIdentifier",
"methodParameterPart", "parameters", "parameter", "mandatoryParameter",
"optionalParameter", "arrayParameter", "hashParameter", "keywordParameter",
"procParameter", "ifExpression", "thenClause", "elsifClause", "elseClause",
"unlessExpression", "caseExpression", "whenClause", "whenArgument", "whileExpression",
"doClause", "untilExpression", "forExpression", "forVariable", "beginExpression",
"bodyStatement", "rescueClause", "exceptionClass", "exceptionVariableAssignment",
"ensureClause", "classDefinition", "classOrModuleReference", "moduleDefinition",
"yieldWithOptionalArgument", "jumpExpression", "variableReference", "variableIdentifier",
"pseudoVariableIdentifier", "scopedConstantReference", "literal", "symbol",
"stringExpression", "quotedStringExpression", "simpleString", "delimitedStringInterpolation",
"stringInterpolation", "interpolatedStringSequence", "regexInterpolation",
"interpolatedRegexSequence", "quotedRegexInterpolation", "numericLiteral",
"unsignedNumericLiteral", "definedMethodNameOrSymbol", "keyword", "operatorMethodName"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, "'__LINE__'", "'__ENCODING__'", "'__FILE__'",
"'BEGIN'", "'END'", "'alias'", "'and'", "'begin'", "'break'", "'case'",
"'class'", "'def'", "'defined?'", "'do'", "'else'", "'elsif'", "'end'",
"'ensure'", "'for'", "'false'", "'if'", "'in'", "'module'", "'next'",
"'nil'", "'not'", "'or'", "'redo'", "'rescue'", "'retry'", "'return'",
"'self'", "'super'", "'then'", "'true'", "'undef'", "'unless'", "'until'",
"'when'", "'while'", "'yield'", "'['", "']'", "'('", "')'", "'{'", "'}'",
"':'", "'::'", "','", "';'", "'.'", "'..'", "'...'", "'?'", "'=>'", "'->'",
"'!'", "'!='", "'!~'", "'&'", "'&&'", "'&.'", "'|'", "'||'", "'='", "'=='",
"'==='", "'^'", "'<=>'", "'=~'", "'>'", "'>='", "'<'", "'<='", "'<<'",
"'>>'", "'+'", "'-'", "'*'", "'**'", "'/'", "'%'", "'~'", "'+@'", "'-@'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "STRING_INTERPOLATION_END", "REGULAR_EXPRESSION_INTERPOLATION_END",
"REGULAR_EXPRESSION_START", "QUOTED_NON_EXPANDED_STRING_LITERAL_END",
"QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END", "QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END",
"QUOTED_EXPANDED_REGULAR_EXPRESSION_END", "QUOTED_EXPANDED_STRING_LITERAL_END",
"QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_END", "QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END",
"QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END", "DELIMITED_STRING_INTERPOLATION_END",
"DELIMITED_ARRAY_ITEM_INTERPOLATION_END", "NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE",
"EXPANDED_LITERAL_CHARACTER_SEQUENCE", "LINE__", "ENCODING__", "FILE__",
"BEGIN_", "END_", "ALIAS", "AND", "BEGIN", "BREAK", "CASE", "CLASS",
"DEF", "IS_DEFINED", "DO", "ELSE", "ELSIF", "END", "ENSURE", "FOR", "FALSE",
"IF", "IN", "MODULE", "NEXT", "NIL", "NOT", "OR", "REDO", "RESCUE", "RETRY",
"RETURN", "SELF", "SUPER", "THEN", "TRUE", "UNDEF", "UNLESS", "UNTIL",
"WHEN", "WHILE", "YIELD", "LBRACK", "RBRACK", "LPAREN", "RPAREN", "LCURLY",
"RCURLY", "COLON", "COLON2", "COMMA", "SEMI", "DOT", "DOT2", "DOT3",
"QMARK", "EQGT", "MINUSGT", "EMARK", "EMARKEQ", "EMARKTILDE", "AMP",
"AMP2", "AMPDOT", "BAR", "BAR2", "EQ", "EQ2", "EQ3", "CARET", "LTEQGT",
"EQTILDE", "GT", "GTEQ", "LT", "LTEQ", "LT2", "GT2", "PLUS", "MINUS",
"STAR", "STAR2", "SLASH", "PERCENT", "TILDE", "PLUSAT", "MINUSAT", "ASSIGNMENT_OPERATOR",
"SINGLE_QUOTED_STRING_LITERAL", "DOUBLE_QUOTED_STRING_START", "QUOTED_NON_EXPANDED_STRING_LITERAL_START",
"QUOTED_EXPANDED_STRING_LITERAL_START", "QUOTED_EXPANDED_REGULAR_EXPRESSION_START",
"QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START", "QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START",
"QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START", "HERE_DOC_IDENTIFIER",
"HERE_DOC", "QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START", "QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START",
"END_OF_PROGRAM_MARKER", "DECIMAL_INTEGER_LITERAL", "BINARY_INTEGER_LITERAL",
"OCTAL_INTEGER_LITERAL", "HEXADECIMAL_INTEGER_LITERAL", "FLOAT_LITERAL_WITHOUT_EXPONENT",
"FLOAT_LITERAL_WITH_EXPONENT", "NL", "WS", "SYMBOL_LITERAL", "LOCAL_VARIABLE_IDENTIFIER",
"GLOBAL_VARIABLE_IDENTIFIER", "INSTANCE_VARIABLE_IDENTIFIER", "CLASS_VARIABLE_IDENTIFIER",
"CONSTANT_IDENTIFIER", "ASSIGNMENT_LIKE_METHOD_IDENTIFIER", "SINGLE_LINE_COMMENT",
"MULTI_LINE_COMMENT", "UNRECOGNIZED", "DOUBLE_QUOTED_STRING_END", "DOUBLE_QUOTED_STRING_CHARACTER_SEQUENCE",
"INTERPOLATED_CHARACTER_SEQUENCE", "STRING_INTERPOLATION_BEGIN", "DELIMITED_STRING_INTERPOLATION_BEGIN",
"EXPANDED_VARIABLE_CHARACTER_SEQUENCE", "EXPANDED_LITERAL_CHARACTER",
"NON_EXPANDED_LITERAL_CHARACTER", "DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN",
"EXPANDED_ARRAY_ITEM_SEPARATOR", "EXPANDED_ARRAY_ITEM_CHARACTER", "NON_EXPANDED_ARRAY_ITEM_SEPARATOR",
"NON_EXPANDED_ARRAY_ITEM_CHARACTER", "REGULAR_EXPRESSION_END", "REGULAR_EXPRESSION_BODY",
"REGULAR_EXPRESSION_INTERPOLATION_BEGIN", "DATA_SECTION_CONTENT"
};
}
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 "DeprecatedRubyParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public DeprecatedRubyParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
public static class ProgramContext extends ParserRuleContext {
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode EOF() { return getToken(DeprecatedRubyParser.EOF, 0); }
public ProgramContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_program; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterProgram(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitProgram(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitProgram(this);
else return visitor.visitChildren(this);
}
}
public final ProgramContext program() throws RecognitionException {
ProgramContext _localctx = new ProgramContext(_ctx, getState());
enterRule(_localctx, 0, RULE_program);
try {
enterOuterAlt(_localctx, 1);
{
setState(208);
compoundStatement();
setState(209);
match(EOF);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CompoundStatementContext extends ParserRuleContext {
public StatementsContext statements() {
return getRuleContext(StatementsContext.class,0);
}
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public CompoundStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_compoundStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterCompoundStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitCompoundStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitCompoundStatement(this);
else return visitor.visitChildren(this);
}
}
public final CompoundStatementContext compoundStatement() throws RecognitionException {
CompoundStatementContext _localctx = new CompoundStatementContext(_ctx, getState());
enterRule(_localctx, 2, RULE_compoundStatement);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(214);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(211);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
}
setState(216);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,0,_ctx);
}
setState(218);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
{
setState(217);
statements();
}
break;
}
setState(223);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(220);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(225);
_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 StatementsContext extends ParserRuleContext {
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public StatementsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterStatements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitStatements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitStatements(this);
else return visitor.visitChildren(this);
}
}
public final StatementsContext statements() throws RecognitionException {
StatementsContext _localctx = new StatementsContext(_ctx, getState());
enterRule(_localctx, 4, RULE_statements);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(226);
statement(0);
setState(235);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(228);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(227);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(230);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==SEMI || _la==NL );
setState(232);
statement(0);
}
}
}
setState(237);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class StatementContext extends ParserRuleContext {
public StatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
public StatementContext() { }
public void copyFrom(StatementContext ctx) {
super.copyFrom(ctx);
}
}
public static class EndStatementContext extends StatementContext {
public TerminalNode END_() { return getToken(DeprecatedRubyParser.END_, 0); }
public TerminalNode LCURLY() { return getToken(DeprecatedRubyParser.LCURLY, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode RCURLY() { return getToken(DeprecatedRubyParser.RCURLY, 0); }
public EndStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterEndStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitEndStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitEndStatement(this);
else return visitor.visitChildren(this);
}
}
public static class BeginStatementContext extends StatementContext {
public TerminalNode BEGIN_() { return getToken(DeprecatedRubyParser.BEGIN_, 0); }
public TerminalNode LCURLY() { return getToken(DeprecatedRubyParser.LCURLY, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode RCURLY() { return getToken(DeprecatedRubyParser.RCURLY, 0); }
public BeginStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBeginStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBeginStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBeginStatement(this);
else return visitor.visitChildren(this);
}
}
public static class ModifierStatementContext extends StatementContext {
public Token mod;
public List statement() {
return getRuleContexts(StatementContext.class);
}
public StatementContext statement(int i) {
return getRuleContext(StatementContext.class,i);
}
public TerminalNode IF() { return getToken(DeprecatedRubyParser.IF, 0); }
public TerminalNode UNLESS() { return getToken(DeprecatedRubyParser.UNLESS, 0); }
public TerminalNode WHILE() { return getToken(DeprecatedRubyParser.WHILE, 0); }
public TerminalNode UNTIL() { return getToken(DeprecatedRubyParser.UNTIL, 0); }
public TerminalNode RESCUE() { return getToken(DeprecatedRubyParser.RESCUE, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ModifierStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterModifierStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitModifierStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitModifierStatement(this);
else return visitor.visitChildren(this);
}
}
public static class AliasStatementContext extends StatementContext {
public TerminalNode ALIAS() { return getToken(DeprecatedRubyParser.ALIAS, 0); }
public List definedMethodNameOrSymbol() {
return getRuleContexts(DefinedMethodNameOrSymbolContext.class);
}
public DefinedMethodNameOrSymbolContext definedMethodNameOrSymbol(int i) {
return getRuleContext(DefinedMethodNameOrSymbolContext.class,i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public AliasStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAliasStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAliasStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAliasStatement(this);
else return visitor.visitChildren(this);
}
}
public static class UndefStatementContext extends StatementContext {
public TerminalNode UNDEF() { return getToken(DeprecatedRubyParser.UNDEF, 0); }
public List definedMethodNameOrSymbol() {
return getRuleContexts(DefinedMethodNameOrSymbolContext.class);
}
public DefinedMethodNameOrSymbolContext definedMethodNameOrSymbol(int i) {
return getRuleContext(DefinedMethodNameOrSymbolContext.class,i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public UndefStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUndefStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUndefStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUndefStatement(this);
else return visitor.visitChildren(this);
}
}
public static class ExpressionOrCommandStatementContext extends StatementContext {
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ExpressionOrCommandStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionOrCommandStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionOrCommandStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionOrCommandStatement(this);
else return visitor.visitChildren(this);
}
}
public final StatementContext statement() throws RecognitionException {
return statement(0);
}
private StatementContext statement(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
StatementContext _localctx = new StatementContext(_ctx, _parentState);
StatementContext _prevctx = _localctx;
int _startState = 6;
enterRecursionRule(_localctx, 6, RULE_statement, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(275);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
{
_localctx = new AliasStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(239);
match(ALIAS);
setState(241);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(240);
match(NL);
}
}
setState(243);
definedMethodNameOrSymbol();
setState(245);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(244);
match(NL);
}
}
setState(247);
definedMethodNameOrSymbol();
}
break;
case 2:
{
_localctx = new UndefStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(249);
match(UNDEF);
setState(251);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(250);
match(NL);
}
}
setState(253);
definedMethodNameOrSymbol();
setState(261);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(254);
match(COMMA);
setState(256);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(255);
match(NL);
}
}
setState(258);
definedMethodNameOrSymbol();
}
}
}
setState(263);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,9,_ctx);
}
}
break;
case 3:
{
_localctx = new BeginStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(264);
match(BEGIN_);
setState(265);
match(LCURLY);
setState(266);
compoundStatement();
setState(267);
match(RCURLY);
}
break;
case 4:
{
_localctx = new EndStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(269);
match(END_);
setState(270);
match(LCURLY);
setState(271);
compoundStatement();
setState(272);
match(RCURLY);
}
break;
case 5:
{
_localctx = new ExpressionOrCommandStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(274);
expressionOrCommand(0);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(285);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new ModifierStatementContext(new StatementContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_statement);
setState(277);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(278);
((ModifierStatementContext)_localctx).mod = _input.LT(1);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IF) | (1L << RESCUE) | (1L << UNLESS) | (1L << UNTIL) | (1L << WHILE))) != 0)) ) {
((ModifierStatementContext)_localctx).mod = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(280);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(279);
match(NL);
}
}
setState(282);
statement(3);
}
}
}
setState(287);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class ExpressionOrCommandContext extends ParserRuleContext {
public ExpressionOrCommandContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressionOrCommand; }
public ExpressionOrCommandContext() { }
public void copyFrom(ExpressionOrCommandContext ctx) {
super.copyFrom(ctx);
}
}
public static class ExpressionExpressionOrCommandContext extends ExpressionOrCommandContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ExpressionExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class NotExpressionOrCommandContext extends ExpressionOrCommandContext {
public TerminalNode NOT() { return getToken(DeprecatedRubyParser.NOT, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public NotExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNotExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNotExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNotExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class InvocationExpressionOrCommandContext extends ExpressionOrCommandContext {
public InvocationWithoutParenthesesContext invocationWithoutParentheses() {
return getRuleContext(InvocationWithoutParenthesesContext.class,0);
}
public TerminalNode EMARK() { return getToken(DeprecatedRubyParser.EMARK, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public InvocationExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterInvocationExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitInvocationExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitInvocationExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class OrAndExpressionOrCommandContext extends ExpressionOrCommandContext {
public Token op;
public List expressionOrCommand() {
return getRuleContexts(ExpressionOrCommandContext.class);
}
public ExpressionOrCommandContext expressionOrCommand(int i) {
return getRuleContext(ExpressionOrCommandContext.class,i);
}
public TerminalNode OR() { return getToken(DeprecatedRubyParser.OR, 0); }
public TerminalNode AND() { return getToken(DeprecatedRubyParser.AND, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public OrAndExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterOrAndExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitOrAndExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitOrAndExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionOrCommandContext expressionOrCommand() throws RecognitionException {
return expressionOrCommand(0);
}
private ExpressionOrCommandContext expressionOrCommand(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ExpressionOrCommandContext _localctx = new ExpressionOrCommandContext(_ctx, _parentState);
ExpressionOrCommandContext _prevctx = _localctx;
int _startState = 8;
enterRecursionRule(_localctx, 8, RULE_expressionOrCommand, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(302);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
case 1:
{
_localctx = new ExpressionExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(289);
expression(0);
}
break;
case 2:
{
_localctx = new InvocationExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(294);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EMARK) {
{
setState(290);
match(EMARK);
setState(292);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(291);
match(NL);
}
}
}
}
setState(296);
invocationWithoutParentheses();
}
break;
case 3:
{
_localctx = new NotExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(297);
match(NOT);
setState(299);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(298);
match(NL);
}
}
setState(301);
expressionOrCommand(2);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(312);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,18,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new OrAndExpressionOrCommandContext(new ExpressionOrCommandContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expressionOrCommand);
setState(304);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(305);
((OrAndExpressionOrCommandContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==AND || _la==OR) ) {
((OrAndExpressionOrCommandContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(307);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(306);
match(NL);
}
}
setState(309);
expressionOrCommand(1);
}
}
}
setState(314);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,18,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class ExpressionContext extends ParserRuleContext {
public ExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expression; }
public ExpressionContext() { }
public void copyFrom(ExpressionContext ctx) {
super.copyFrom(ctx);
}
}
public static class PrimaryExpressionContext extends ExpressionContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public PrimaryExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPrimaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPrimaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPrimaryExpression(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorAndExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode AMP2() { return getToken(DeprecatedRubyParser.AMP2, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public OperatorAndExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterOperatorAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitOperatorAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitOperatorAndExpression(this);
else return visitor.visitChildren(this);
}
}
public static class AdditiveExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode PLUS() { return getToken(DeprecatedRubyParser.PLUS, 0); }
public TerminalNode MINUS() { return getToken(DeprecatedRubyParser.MINUS, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public AdditiveExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAdditiveExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAdditiveExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAdditiveExpression(this);
else return visitor.visitChildren(this);
}
}
public static class RelationalExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode GT() { return getToken(DeprecatedRubyParser.GT, 0); }
public TerminalNode GTEQ() { return getToken(DeprecatedRubyParser.GTEQ, 0); }
public TerminalNode LT() { return getToken(DeprecatedRubyParser.LT, 0); }
public TerminalNode LTEQ() { return getToken(DeprecatedRubyParser.LTEQ, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public RelationalExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterRelationalExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitRelationalExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitRelationalExpression(this);
else return visitor.visitChildren(this);
}
}
public static class SingleAssignmentExpressionContext extends ExpressionContext {
public Token op;
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public MultipleRightHandSideContext multipleRightHandSide() {
return getRuleContext(MultipleRightHandSideContext.class,0);
}
public TerminalNode EQ() { return getToken(DeprecatedRubyParser.EQ, 0); }
public TerminalNode ASSIGNMENT_OPERATOR() { return getToken(DeprecatedRubyParser.ASSIGNMENT_OPERATOR, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public SingleAssignmentExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSingleAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSingleAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSingleAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorOrExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode BAR2() { return getToken(DeprecatedRubyParser.BAR2, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public OperatorOrExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterOperatorOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitOperatorOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitOperatorOrExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MultiplicativeExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode STAR() { return getToken(DeprecatedRubyParser.STAR, 0); }
public TerminalNode SLASH() { return getToken(DeprecatedRubyParser.SLASH, 0); }
public TerminalNode PERCENT() { return getToken(DeprecatedRubyParser.PERCENT, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public MultiplicativeExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMultiplicativeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMultiplicativeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMultiplicativeExpression(this);
else return visitor.visitChildren(this);
}
}
public static class BitwiseShiftExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode LT2() { return getToken(DeprecatedRubyParser.LT2, 0); }
public TerminalNode GT2() { return getToken(DeprecatedRubyParser.GT2, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BitwiseShiftExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBitwiseShiftExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBitwiseShiftExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBitwiseShiftExpression(this);
else return visitor.visitChildren(this);
}
}
public static class ConditionalOperatorExpressionContext extends ExpressionContext {
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode QMARK() { return getToken(DeprecatedRubyParser.QMARK, 0); }
public TerminalNode COLON() { return getToken(DeprecatedRubyParser.COLON, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ConditionalOperatorExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterConditionalOperatorExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitConditionalOperatorExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitConditionalOperatorExpression(this);
else return visitor.visitChildren(this);
}
}
public static class UnaryMinusExpressionContext extends ExpressionContext {
public TerminalNode MINUS() { return getToken(DeprecatedRubyParser.MINUS, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public UnaryMinusExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUnaryMinusExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUnaryMinusExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUnaryMinusExpression(this);
else return visitor.visitChildren(this);
}
}
public static class PowerExpressionContext extends ExpressionContext {
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode STAR2() { return getToken(DeprecatedRubyParser.STAR2, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public PowerExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPowerExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPowerExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPowerExpression(this);
else return visitor.visitChildren(this);
}
}
public static class BitwiseOrExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode BAR() { return getToken(DeprecatedRubyParser.BAR, 0); }
public TerminalNode CARET() { return getToken(DeprecatedRubyParser.CARET, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BitwiseOrExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBitwiseOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBitwiseOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBitwiseOrExpression(this);
else return visitor.visitChildren(this);
}
}
public static class IsDefinedExpressionContext extends ExpressionContext {
public TerminalNode IS_DEFINED() { return getToken(DeprecatedRubyParser.IS_DEFINED, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public IsDefinedExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterIsDefinedExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitIsDefinedExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitIsDefinedExpression(this);
else return visitor.visitChildren(this);
}
}
public static class BitwiseAndExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode AMP() { return getToken(DeprecatedRubyParser.AMP, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BitwiseAndExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBitwiseAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBitwiseAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBitwiseAndExpression(this);
else return visitor.visitChildren(this);
}
}
public static class EqualityExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode LTEQGT() { return getToken(DeprecatedRubyParser.LTEQGT, 0); }
public TerminalNode EQ2() { return getToken(DeprecatedRubyParser.EQ2, 0); }
public TerminalNode EQ3() { return getToken(DeprecatedRubyParser.EQ3, 0); }
public TerminalNode EMARKEQ() { return getToken(DeprecatedRubyParser.EMARKEQ, 0); }
public TerminalNode EQTILDE() { return getToken(DeprecatedRubyParser.EQTILDE, 0); }
public TerminalNode EMARKTILDE() { return getToken(DeprecatedRubyParser.EMARKTILDE, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public EqualityExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterEqualityExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitEqualityExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitEqualityExpression(this);
else return visitor.visitChildren(this);
}
}
public static class RangeExpressionContext extends ExpressionContext {
public Token op;
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public TerminalNode DOT2() { return getToken(DeprecatedRubyParser.DOT2, 0); }
public TerminalNode DOT3() { return getToken(DeprecatedRubyParser.DOT3, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public RangeExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitRangeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitRangeExpression(this);
else return visitor.visitChildren(this);
}
}
public static class UnaryExpressionContext extends ExpressionContext {
public Token op;
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode TILDE() { return getToken(DeprecatedRubyParser.TILDE, 0); }
public TerminalNode PLUS() { return getToken(DeprecatedRubyParser.PLUS, 0); }
public TerminalNode EMARK() { return getToken(DeprecatedRubyParser.EMARK, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public UnaryExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUnaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUnaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUnaryExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MultipleAssignmentExpressionContext extends ExpressionContext {
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public TerminalNode EQ() { return getToken(DeprecatedRubyParser.EQ, 0); }
public MultipleRightHandSideContext multipleRightHandSide() {
return getRuleContext(MultipleRightHandSideContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public MultipleAssignmentExpressionContext(ExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMultipleAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMultipleAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMultipleAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionContext expression() throws RecognitionException {
return expression(0);
}
private ExpressionContext expression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState);
ExpressionContext _prevctx = _localctx;
int _startState = 10;
enterRecursionRule(_localctx, 10, RULE_expression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(346);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
{
_localctx = new SingleAssignmentExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(316);
singleLeftHandSide();
setState(317);
((SingleAssignmentExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==EQ || _la==ASSIGNMENT_OPERATOR) ) {
((SingleAssignmentExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(319);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(318);
match(NL);
}
}
setState(321);
multipleRightHandSide();
}
break;
case 2:
{
_localctx = new MultipleAssignmentExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(323);
multipleLeftHandSide();
setState(324);
match(EQ);
setState(326);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(325);
match(NL);
}
}
setState(328);
multipleRightHandSide();
}
break;
case 3:
{
_localctx = new PrimaryExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(330);
primary(0);
}
break;
case 4:
{
_localctx = new UnaryExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(331);
((UnaryExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(((((_la - 73)) & ~0x3f) == 0 && ((1L << (_la - 73)) & ((1L << (EMARK - 73)) | (1L << (PLUS - 73)) | (1L << (TILDE - 73)))) != 0)) ) {
((UnaryExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(333);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(332);
match(NL);
}
}
setState(335);
expression(15);
}
break;
case 5:
{
_localctx = new UnaryMinusExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(336);
match(MINUS);
setState(338);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(337);
match(NL);
}
}
setState(340);
expression(13);
}
break;
case 6:
{
_localctx = new IsDefinedExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(341);
match(IS_DEFINED);
setState(343);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(342);
match(NL);
}
}
setState(345);
expression(1);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(435);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,42,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(433);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) {
case 1:
{
_localctx = new PowerExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(348);
if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)");
setState(349);
match(STAR2);
setState(351);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(350);
match(NL);
}
}
setState(353);
expression(14);
}
break;
case 2:
{
_localctx = new MultiplicativeExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(354);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
setState(355);
((MultiplicativeExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(((((_la - 95)) & ~0x3f) == 0 && ((1L << (_la - 95)) & ((1L << (STAR - 95)) | (1L << (SLASH - 95)) | (1L << (PERCENT - 95)))) != 0)) ) {
((MultiplicativeExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(357);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(356);
match(NL);
}
}
setState(359);
expression(13);
}
break;
case 3:
{
_localctx = new AdditiveExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(360);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
setState(361);
((AdditiveExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
((AdditiveExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(363);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(362);
match(NL);
}
}
setState(365);
expression(12);
}
break;
case 4:
{
_localctx = new BitwiseShiftExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(366);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(367);
((BitwiseShiftExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==LT2 || _la==GT2) ) {
((BitwiseShiftExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(369);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(368);
match(NL);
}
}
setState(371);
expression(11);
}
break;
case 5:
{
_localctx = new BitwiseAndExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(372);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(373);
((BitwiseAndExpressionContext)_localctx).op = match(AMP);
setState(375);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(374);
match(NL);
}
}
setState(377);
expression(10);
}
break;
case 6:
{
_localctx = new BitwiseOrExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(378);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(379);
((BitwiseOrExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==BAR || _la==CARET) ) {
((BitwiseOrExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(381);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(380);
match(NL);
}
}
setState(383);
expression(9);
}
break;
case 7:
{
_localctx = new RelationalExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(384);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(385);
((RelationalExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(((((_la - 87)) & ~0x3f) == 0 && ((1L << (_la - 87)) & ((1L << (GT - 87)) | (1L << (GTEQ - 87)) | (1L << (LT - 87)) | (1L << (LTEQ - 87)))) != 0)) ) {
((RelationalExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(387);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(386);
match(NL);
}
}
setState(389);
expression(8);
}
break;
case 8:
{
_localctx = new OperatorAndExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(390);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
setState(391);
((OperatorAndExpressionContext)_localctx).op = match(AMP2);
setState(393);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(392);
match(NL);
}
}
setState(395);
expression(6);
}
break;
case 9:
{
_localctx = new OperatorOrExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(396);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(397);
((OperatorOrExpressionContext)_localctx).op = match(BAR2);
setState(399);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(398);
match(NL);
}
}
setState(401);
expression(5);
}
break;
case 10:
{
_localctx = new ConditionalOperatorExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(402);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(403);
match(QMARK);
setState(405);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(404);
match(NL);
}
}
setState(407);
expression(0);
setState(409);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(408);
match(NL);
}
}
setState(411);
match(COLON);
setState(413);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(412);
match(NL);
}
}
setState(415);
expression(3);
}
break;
case 11:
{
_localctx = new EqualityExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(417);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(418);
((EqualityExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(((((_la - 74)) & ~0x3f) == 0 && ((1L << (_la - 74)) & ((1L << (EMARKEQ - 74)) | (1L << (EMARKTILDE - 74)) | (1L << (EQ2 - 74)) | (1L << (EQ3 - 74)) | (1L << (LTEQGT - 74)) | (1L << (EQTILDE - 74)))) != 0)) ) {
((EqualityExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(420);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
{
setState(419);
match(NL);
}
break;
}
setState(423);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
{
setState(422);
expression(0);
}
break;
}
}
break;
case 12:
{
_localctx = new RangeExpressionContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
setState(425);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(426);
((RangeExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==DOT2 || _la==DOT3) ) {
((RangeExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(428);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
{
setState(427);
match(NL);
}
break;
}
setState(431);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
case 1:
{
setState(430);
expression(0);
}
break;
}
}
break;
}
}
}
setState(437);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,42,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class PrimaryContext extends ParserRuleContext {
public PrimaryContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primary; }
public PrimaryContext() { }
public void copyFrom(PrimaryContext ctx) {
super.copyFrom(ctx);
}
}
public static class CaseExpressionPrimaryContext extends PrimaryContext {
public CaseExpressionContext caseExpression() {
return getRuleContext(CaseExpressionContext.class,0);
}
public CaseExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterCaseExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitCaseExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitCaseExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class BeginExpressionPrimaryContext extends PrimaryContext {
public BeginExpressionContext beginExpression() {
return getRuleContext(BeginExpressionContext.class,0);
}
public BeginExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBeginExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBeginExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBeginExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class UnlessExpressionPrimaryContext extends PrimaryContext {
public UnlessExpressionContext unlessExpression() {
return getRuleContext(UnlessExpressionContext.class,0);
}
public UnlessExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUnlessExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUnlessExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUnlessExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class IfExpressionPrimaryContext extends PrimaryContext {
public IfExpressionContext ifExpression() {
return getRuleContext(IfExpressionContext.class,0);
}
public IfExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterIfExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitIfExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitIfExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedScopedConstantReferencePrimaryContext extends PrimaryContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public ChainedScopedConstantReferencePrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedScopedConstantReferencePrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedScopedConstantReferencePrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedScopedConstantReferencePrimary(this);
else return visitor.visitChildren(this);
}
}
public static class LiteralPrimaryContext extends PrimaryContext {
public LiteralContext literal() {
return getRuleContext(LiteralContext.class,0);
}
public LiteralPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterLiteralPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitLiteralPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitLiteralPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class IsDefinedPrimaryContext extends PrimaryContext {
public TerminalNode IS_DEFINED() { return getToken(DeprecatedRubyParser.IS_DEFINED, 0); }
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public IsDefinedPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterIsDefinedPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitIsDefinedPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitIsDefinedPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class UntilExpressionPrimaryContext extends PrimaryContext {
public UntilExpressionContext untilExpression() {
return getRuleContext(UntilExpressionContext.class,0);
}
public UntilExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUntilExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUntilExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUntilExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class StringInterpolationPrimaryContext extends PrimaryContext {
public StringInterpolationContext stringInterpolation() {
return getRuleContext(StringInterpolationContext.class,0);
}
public StringInterpolationPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterStringInterpolationPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitStringInterpolationPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitStringInterpolationPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class StringExpressionPrimaryContext extends PrimaryContext {
public StringExpressionContext stringExpression() {
return getRuleContext(StringExpressionContext.class,0);
}
public StringExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterStringExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitStringExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitStringExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ClassDefinitionPrimaryContext extends PrimaryContext {
public ClassDefinitionContext classDefinition() {
return getRuleContext(ClassDefinitionContext.class,0);
}
public ClassDefinitionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterClassDefinitionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitClassDefinitionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitClassDefinitionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class IndexingExpressionPrimaryContext extends PrimaryContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode LBRACK() { return getToken(DeprecatedRubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(DeprecatedRubyParser.RBRACK, 0); }
public IndexingArgumentsContext indexingArguments() {
return getRuleContext(IndexingArgumentsContext.class,0);
}
public IndexingExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterIndexingExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitIndexingExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitIndexingExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class GroupingExpressionPrimaryContext extends PrimaryContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public GroupingExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterGroupingExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitGroupingExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitGroupingExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class InvocationWithBlockOnlyPrimaryContext extends PrimaryContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public InvocationWithBlockOnlyPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterInvocationWithBlockOnlyPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitInvocationWithBlockOnlyPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitInvocationWithBlockOnlyPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ProcDefinitionPrimaryContext extends PrimaryContext {
public ProcDefinitionContext procDefinition() {
return getRuleContext(ProcDefinitionContext.class,0);
}
public ProcDefinitionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterProcDefinitionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitProcDefinitionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitProcDefinitionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class YieldWithOptionalArgumentPrimaryContext extends PrimaryContext {
public YieldWithOptionalArgumentContext yieldWithOptionalArgument() {
return getRuleContext(YieldWithOptionalArgumentContext.class,0);
}
public YieldWithOptionalArgumentPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterYieldWithOptionalArgumentPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitYieldWithOptionalArgumentPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitYieldWithOptionalArgumentPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class WhileExpressionPrimaryContext extends PrimaryContext {
public WhileExpressionContext whileExpression() {
return getRuleContext(WhileExpressionContext.class,0);
}
public WhileExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterWhileExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitWhileExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitWhileExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class SimpleScopedConstantReferencePrimaryContext extends PrimaryContext {
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public SimpleScopedConstantReferencePrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSimpleScopedConstantReferencePrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSimpleScopedConstantReferencePrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSimpleScopedConstantReferencePrimary(this);
else return visitor.visitChildren(this);
}
}
public static class InvocationWithParenthesesPrimaryContext extends PrimaryContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public ArgumentsWithParenthesesContext argumentsWithParentheses() {
return getRuleContext(ArgumentsWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public InvocationWithParenthesesPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterInvocationWithParenthesesPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitInvocationWithParenthesesPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitInvocationWithParenthesesPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedStringExpressionPrimaryContext extends PrimaryContext {
public QuotedStringExpressionContext quotedStringExpression() {
return getRuleContext(QuotedStringExpressionContext.class,0);
}
public QuotedStringExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterQuotedStringExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitQuotedStringExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitQuotedStringExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedInvocationPrimaryContext extends PrimaryContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public TerminalNode DOT() { return getToken(DeprecatedRubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode AMPDOT() { return getToken(DeprecatedRubyParser.AMPDOT, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ArgumentsWithParenthesesContext argumentsWithParentheses() {
return getRuleContext(ArgumentsWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public ChainedInvocationPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedInvocationPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedInvocationPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedInvocationPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedRegexInterpolationPrimaryContext extends PrimaryContext {
public QuotedRegexInterpolationContext quotedRegexInterpolation() {
return getRuleContext(QuotedRegexInterpolationContext.class,0);
}
public QuotedRegexInterpolationPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterQuotedRegexInterpolationPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitQuotedRegexInterpolationPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitQuotedRegexInterpolationPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class MethodDefinitionPrimaryContext extends PrimaryContext {
public MethodDefinitionContext methodDefinition() {
return getRuleContext(MethodDefinitionContext.class,0);
}
public MethodDefinitionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodDefinitionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodDefinitionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodDefinitionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class HashConstructorPrimaryContext extends PrimaryContext {
public HashConstructorContext hashConstructor() {
return getRuleContext(HashConstructorContext.class,0);
}
public HashConstructorPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHashConstructorPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHashConstructorPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHashConstructorPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedInvocationWithoutArgumentsPrimaryContext extends PrimaryContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public ChainedInvocationWithoutArgumentsPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedInvocationWithoutArgumentsPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedInvocationWithoutArgumentsPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedInvocationWithoutArgumentsPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ArrayConstructorPrimaryContext extends PrimaryContext {
public ArrayConstructorContext arrayConstructor() {
return getRuleContext(ArrayConstructorContext.class,0);
}
public ArrayConstructorPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArrayConstructorPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArrayConstructorPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArrayConstructorPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class JumpExpressionPrimaryContext extends PrimaryContext {
public JumpExpressionContext jumpExpression() {
return getRuleContext(JumpExpressionContext.class,0);
}
public JumpExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterJumpExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitJumpExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitJumpExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class SuperExpressionPrimaryContext extends PrimaryContext {
public TerminalNode SUPER() { return getToken(DeprecatedRubyParser.SUPER, 0); }
public ArgumentsWithParenthesesContext argumentsWithParentheses() {
return getRuleContext(ArgumentsWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public SuperExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSuperExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSuperExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSuperExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class VariableReferencePrimaryContext extends PrimaryContext {
public VariableReferenceContext variableReference() {
return getRuleContext(VariableReferenceContext.class,0);
}
public VariableReferencePrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterVariableReferencePrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitVariableReferencePrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitVariableReferencePrimary(this);
else return visitor.visitChildren(this);
}
}
public static class RegexInterpolationPrimaryContext extends PrimaryContext {
public RegexInterpolationContext regexInterpolation() {
return getRuleContext(RegexInterpolationContext.class,0);
}
public RegexInterpolationPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterRegexInterpolationPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitRegexInterpolationPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitRegexInterpolationPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ForExpressionPrimaryContext extends PrimaryContext {
public ForExpressionContext forExpression() {
return getRuleContext(ForExpressionContext.class,0);
}
public ForExpressionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterForExpressionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitForExpressionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitForExpressionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class MethodOnlyIdentifierPrimaryContext extends PrimaryContext {
public MethodOnlyIdentifierContext methodOnlyIdentifier() {
return getRuleContext(MethodOnlyIdentifierContext.class,0);
}
public MethodOnlyIdentifierPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodOnlyIdentifierPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodOnlyIdentifierPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodOnlyIdentifierPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ModuleDefinitionPrimaryContext extends PrimaryContext {
public ModuleDefinitionContext moduleDefinition() {
return getRuleContext(ModuleDefinitionContext.class,0);
}
public ModuleDefinitionPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterModuleDefinitionPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitModuleDefinitionPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitModuleDefinitionPrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ReturnWithParenthesesPrimaryContext extends PrimaryContext {
public TerminalNode RETURN() { return getToken(DeprecatedRubyParser.RETURN, 0); }
public ArgumentsWithParenthesesContext argumentsWithParentheses() {
return getRuleContext(ArgumentsWithParenthesesContext.class,0);
}
public ReturnWithParenthesesPrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterReturnWithParenthesesPrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitReturnWithParenthesesPrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitReturnWithParenthesesPrimary(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryContext primary() throws RecognitionException {
return primary(0);
}
private PrimaryContext primary(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PrimaryContext _localctx = new PrimaryContext(_ctx, _parentState);
PrimaryContext _prevctx = _localctx;
int _startState = 12;
enterRecursionRule(_localctx, 12, RULE_primary, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(490);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) {
case 1:
{
_localctx = new ClassDefinitionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(439);
classDefinition();
}
break;
case 2:
{
_localctx = new ModuleDefinitionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(440);
moduleDefinition();
}
break;
case 3:
{
_localctx = new MethodDefinitionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(441);
methodDefinition();
}
break;
case 4:
{
_localctx = new ProcDefinitionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(442);
procDefinition();
}
break;
case 5:
{
_localctx = new YieldWithOptionalArgumentPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(443);
yieldWithOptionalArgument();
}
break;
case 6:
{
_localctx = new IfExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(444);
ifExpression();
}
break;
case 7:
{
_localctx = new UnlessExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(445);
unlessExpression();
}
break;
case 8:
{
_localctx = new CaseExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(446);
caseExpression();
}
break;
case 9:
{
_localctx = new WhileExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(447);
whileExpression();
}
break;
case 10:
{
_localctx = new UntilExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(448);
untilExpression();
}
break;
case 11:
{
_localctx = new ForExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(449);
forExpression();
}
break;
case 12:
{
_localctx = new ReturnWithParenthesesPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(450);
match(RETURN);
setState(451);
argumentsWithParentheses();
}
break;
case 13:
{
_localctx = new JumpExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(452);
jumpExpression();
}
break;
case 14:
{
_localctx = new BeginExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(453);
beginExpression();
}
break;
case 15:
{
_localctx = new GroupingExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(454);
match(LPAREN);
setState(455);
compoundStatement();
setState(456);
match(RPAREN);
}
break;
case 16:
{
_localctx = new VariableReferencePrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(458);
variableReference();
}
break;
case 17:
{
_localctx = new SimpleScopedConstantReferencePrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(459);
match(COLON2);
setState(460);
match(CONSTANT_IDENTIFIER);
}
break;
case 18:
{
_localctx = new ArrayConstructorPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(461);
arrayConstructor();
}
break;
case 19:
{
_localctx = new HashConstructorPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(462);
hashConstructor();
}
break;
case 20:
{
_localctx = new LiteralPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(463);
literal();
}
break;
case 21:
{
_localctx = new StringExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(464);
stringExpression(0);
}
break;
case 22:
{
_localctx = new StringInterpolationPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(465);
stringInterpolation();
}
break;
case 23:
{
_localctx = new QuotedStringExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(466);
quotedStringExpression();
}
break;
case 24:
{
_localctx = new RegexInterpolationPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(467);
regexInterpolation();
}
break;
case 25:
{
_localctx = new QuotedRegexInterpolationPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(468);
quotedRegexInterpolation();
}
break;
case 26:
{
_localctx = new IsDefinedPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(469);
match(IS_DEFINED);
setState(470);
match(LPAREN);
setState(471);
expressionOrCommand(0);
setState(472);
match(RPAREN);
}
break;
case 27:
{
_localctx = new SuperExpressionPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(474);
match(SUPER);
setState(476);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) {
case 1:
{
setState(475);
argumentsWithParentheses();
}
break;
}
setState(479);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) {
case 1:
{
setState(478);
block();
}
break;
}
}
break;
case 28:
{
_localctx = new MethodOnlyIdentifierPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(481);
methodOnlyIdentifier();
}
break;
case 29:
{
_localctx = new InvocationWithBlockOnlyPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(482);
methodIdentifier();
setState(483);
block();
}
break;
case 30:
{
_localctx = new InvocationWithParenthesesPrimaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(485);
methodIdentifier();
setState(486);
argumentsWithParentheses();
setState(488);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) {
case 1:
{
setState(487);
block();
}
break;
}
}
break;
}
_ctx.stop = _input.LT(-1);
setState(524);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,54,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(522);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) {
case 1:
{
_localctx = new ChainedScopedConstantReferencePrimaryContext(new PrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primary);
setState(492);
if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)");
setState(493);
match(COLON2);
setState(494);
match(CONSTANT_IDENTIFIER);
}
break;
case 2:
{
_localctx = new IndexingExpressionPrimaryContext(new PrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primary);
setState(495);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(496);
match(LBRACK);
setState(498);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LINE__ - 3)) | (1L << (ENCODING__ - 3)) | (1L << (FILE__ - 3)) | (1L << (BEGIN_ - 3)) | (1L << (END_ - 3)) | (1L << (ALIAS - 3)) | (1L << (AND - 3)) | (1L << (BEGIN - 3)) | (1L << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (DO - 3)) | (1L << (ELSE - 3)) | (1L << (ELSIF - 3)) | (1L << (END - 3)) | (1L << (ENSURE - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (IN - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (NOT - 3)) | (1L << (OR - 3)) | (1L << (REDO - 3)) | (1L << (RESCUE - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (THEN - 3)) | (1L << (TRUE - 3)) | (1L << (UNDEF - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 3)) | (1L << (WHEN - 3)) | (1L << (WHILE - 3)) | (1L << (YIELD - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (MINUSGT - 72)) | (1L << (EMARK - 72)) | (1L << (PLUS - 72)) | (1L << (MINUS - 72)) | (1L << (STAR - 72)) | (1L << (STAR2 - 72)) | (1L << (TILDE - 72)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 72)) | (1L << (DOUBLE_QUOTED_STRING_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 72)) | (1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (HERE_DOC - 72)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (DECIMAL_INTEGER_LITERAL - 72)) | (1L << (BINARY_INTEGER_LITERAL - 72)) | (1L << (OCTAL_INTEGER_LITERAL - 72)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 72)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 72)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 72)) | (1L << (SYMBOL_LITERAL - 72)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 72)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 72)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 72)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 72)) | (1L << (CONSTANT_IDENTIFIER - 72)))) != 0)) {
{
setState(497);
indexingArguments();
}
}
setState(500);
match(RBRACK);
}
break;
case 3:
{
_localctx = new ChainedInvocationPrimaryContext(new PrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primary);
setState(501);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(503);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(502);
match(NL);
}
}
setState(505);
_la = _input.LA(1);
if ( !(((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (COLON2 - 64)) | (1L << (DOT - 64)) | (1L << (AMPDOT - 64)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(507);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(506);
match(NL);
}
}
setState(509);
methodName();
setState(511);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
{
setState(510);
argumentsWithParentheses();
}
break;
}
setState(514);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,51,_ctx) ) {
case 1:
{
setState(513);
block();
}
break;
}
}
break;
case 4:
{
_localctx = new ChainedInvocationWithoutArgumentsPrimaryContext(new PrimaryContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primary);
setState(516);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(517);
match(COLON2);
setState(518);
methodName();
setState(520);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) {
case 1:
{
setState(519);
block();
}
break;
}
}
break;
}
}
}
setState(526);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,54,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class SingleLeftHandSideContext extends ParserRuleContext {
public SingleLeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleLeftHandSide; }
public SingleLeftHandSideContext() { }
public void copyFrom(SingleLeftHandSideContext ctx) {
super.copyFrom(ctx);
}
}
public static class PrimaryInsideBracketsSingleLeftHandSideContext extends SingleLeftHandSideContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode LBRACK() { return getToken(DeprecatedRubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(DeprecatedRubyParser.RBRACK, 0); }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public PrimaryInsideBracketsSingleLeftHandSideContext(SingleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPrimaryInsideBracketsSingleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPrimaryInsideBracketsSingleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPrimaryInsideBracketsSingleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class XdotySingleLeftHandSideContext extends SingleLeftHandSideContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode DOT() { return getToken(DeprecatedRubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public XdotySingleLeftHandSideContext(SingleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterXdotySingleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitXdotySingleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitXdotySingleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class VariableIdentifierOnlySingleLeftHandSideContext extends SingleLeftHandSideContext {
public VariableIdentifierContext variableIdentifier() {
return getRuleContext(VariableIdentifierContext.class,0);
}
public VariableIdentifierOnlySingleLeftHandSideContext(SingleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterVariableIdentifierOnlySingleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitVariableIdentifierOnlySingleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitVariableIdentifierOnlySingleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class ScopedConstantAccessSingleLeftHandSideContext extends SingleLeftHandSideContext {
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public ScopedConstantAccessSingleLeftHandSideContext(SingleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterScopedConstantAccessSingleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitScopedConstantAccessSingleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitScopedConstantAccessSingleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public final SingleLeftHandSideContext singleLeftHandSide() throws RecognitionException {
SingleLeftHandSideContext _localctx = new SingleLeftHandSideContext(_ctx, getState());
enterRule(_localctx, 14, RULE_singleLeftHandSide);
int _la;
try {
setState(541);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) {
case 1:
_localctx = new VariableIdentifierOnlySingleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(527);
variableIdentifier();
}
break;
case 2:
_localctx = new PrimaryInsideBracketsSingleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(528);
primary(0);
setState(529);
match(LBRACK);
setState(531);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LINE__ - 3)) | (1L << (ENCODING__ - 3)) | (1L << (FILE__ - 3)) | (1L << (BEGIN_ - 3)) | (1L << (END_ - 3)) | (1L << (ALIAS - 3)) | (1L << (AND - 3)) | (1L << (BEGIN - 3)) | (1L << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (DO - 3)) | (1L << (ELSE - 3)) | (1L << (ELSIF - 3)) | (1L << (END - 3)) | (1L << (ENSURE - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (IN - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (NOT - 3)) | (1L << (OR - 3)) | (1L << (REDO - 3)) | (1L << (RESCUE - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (THEN - 3)) | (1L << (TRUE - 3)) | (1L << (UNDEF - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 3)) | (1L << (WHEN - 3)) | (1L << (WHILE - 3)) | (1L << (YIELD - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (MINUSGT - 72)) | (1L << (EMARK - 72)) | (1L << (AMP - 72)) | (1L << (PLUS - 72)) | (1L << (MINUS - 72)) | (1L << (STAR - 72)) | (1L << (STAR2 - 72)) | (1L << (TILDE - 72)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 72)) | (1L << (DOUBLE_QUOTED_STRING_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 72)) | (1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (HERE_DOC_IDENTIFIER - 72)) | (1L << (HERE_DOC - 72)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (DECIMAL_INTEGER_LITERAL - 72)) | (1L << (BINARY_INTEGER_LITERAL - 72)) | (1L << (OCTAL_INTEGER_LITERAL - 72)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 72)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 72)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 72)) | (1L << (SYMBOL_LITERAL - 72)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 72)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 72)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 72)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 72)) | (1L << (CONSTANT_IDENTIFIER - 72)))) != 0)) {
{
setState(530);
arguments();
}
}
setState(533);
match(RBRACK);
}
break;
case 3:
_localctx = new XdotySingleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(535);
primary(0);
setState(536);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(537);
_la = _input.LA(1);
if ( !(_la==LOCAL_VARIABLE_IDENTIFIER || _la==CONSTANT_IDENTIFIER) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
break;
case 4:
_localctx = new ScopedConstantAccessSingleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(539);
match(COLON2);
setState(540);
match(CONSTANT_IDENTIFIER);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultipleLeftHandSideContext extends ParserRuleContext {
public MultipleLeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleLeftHandSide; }
public MultipleLeftHandSideContext() { }
public void copyFrom(MultipleLeftHandSideContext ctx) {
super.copyFrom(ctx);
}
}
public static class GroupedLeftHandSideOnlyMultipleLeftHandSideContext extends MultipleLeftHandSideContext {
public GroupedLeftHandSideContext groupedLeftHandSide() {
return getRuleContext(GroupedLeftHandSideContext.class,0);
}
public GroupedLeftHandSideOnlyMultipleLeftHandSideContext(MultipleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterGroupedLeftHandSideOnlyMultipleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitGroupedLeftHandSideOnlyMultipleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitGroupedLeftHandSideOnlyMultipleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class MultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSideContext extends MultipleLeftHandSideContext {
public List multipleLeftHandSideItem() {
return getRuleContexts(MultipleLeftHandSideItemContext.class);
}
public MultipleLeftHandSideItemContext multipleLeftHandSideItem(int i) {
return getRuleContext(MultipleLeftHandSideItemContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public PackingLeftHandSideContext packingLeftHandSide() {
return getRuleContext(PackingLeftHandSideContext.class,0);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public MultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSideContext(MultipleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class PackingLeftHandSideOnlyMultipleLeftHandSideContext extends MultipleLeftHandSideContext {
public PackingLeftHandSideContext packingLeftHandSide() {
return getRuleContext(PackingLeftHandSideContext.class,0);
}
public PackingLeftHandSideOnlyMultipleLeftHandSideContext(MultipleLeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPackingLeftHandSideOnlyMultipleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPackingLeftHandSideOnlyMultipleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPackingLeftHandSideOnlyMultipleLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public final MultipleLeftHandSideContext multipleLeftHandSide() throws RecognitionException {
MultipleLeftHandSideContext _localctx = new MultipleLeftHandSideContext(_ctx, getState());
enterRule(_localctx, 16, RULE_multipleLeftHandSide);
int _la;
try {
int _alt;
setState(558);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,60,_ctx) ) {
case 1:
_localctx = new MultipleLeftHandSideAndpackingLeftHandSideMultipleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(548);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(543);
multipleLeftHandSideItem();
setState(544);
match(COMMA);
setState(546);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(545);
match(NL);
}
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(550);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,58,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(554);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) {
case 1:
{
setState(552);
multipleLeftHandSideItem();
}
break;
case 2:
{
setState(553);
packingLeftHandSide();
}
break;
}
}
break;
case 2:
_localctx = new PackingLeftHandSideOnlyMultipleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(556);
packingLeftHandSide();
}
break;
case 3:
_localctx = new GroupedLeftHandSideOnlyMultipleLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(557);
groupedLeftHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultipleLeftHandSideItemContext extends ParserRuleContext {
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public GroupedLeftHandSideContext groupedLeftHandSide() {
return getRuleContext(GroupedLeftHandSideContext.class,0);
}
public MultipleLeftHandSideItemContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleLeftHandSideItem; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMultipleLeftHandSideItem(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMultipleLeftHandSideItem(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMultipleLeftHandSideItem(this);
else return visitor.visitChildren(this);
}
}
public final MultipleLeftHandSideItemContext multipleLeftHandSideItem() throws RecognitionException {
MultipleLeftHandSideItemContext _localctx = new MultipleLeftHandSideItemContext(_ctx, getState());
enterRule(_localctx, 18, RULE_multipleLeftHandSideItem);
try {
setState(562);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(560);
singleLeftHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(561);
groupedLeftHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PackingLeftHandSideContext extends ParserRuleContext {
public TerminalNode STAR() { return getToken(DeprecatedRubyParser.STAR, 0); }
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public PackingLeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_packingLeftHandSide; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPackingLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPackingLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPackingLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public final PackingLeftHandSideContext packingLeftHandSide() throws RecognitionException {
PackingLeftHandSideContext _localctx = new PackingLeftHandSideContext(_ctx, getState());
enterRule(_localctx, 20, RULE_packingLeftHandSide);
try {
enterOuterAlt(_localctx, 1);
{
setState(564);
match(STAR);
setState(565);
singleLeftHandSide();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class GroupedLeftHandSideContext extends ParserRuleContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public GroupedLeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_groupedLeftHandSide; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterGroupedLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitGroupedLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitGroupedLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public final GroupedLeftHandSideContext groupedLeftHandSide() throws RecognitionException {
GroupedLeftHandSideContext _localctx = new GroupedLeftHandSideContext(_ctx, getState());
enterRule(_localctx, 22, RULE_groupedLeftHandSide);
try {
enterOuterAlt(_localctx, 1);
{
setState(567);
match(LPAREN);
setState(568);
multipleLeftHandSide();
setState(569);
match(RPAREN);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultipleRightHandSideContext extends ParserRuleContext {
public ExpressionOrCommandsContext expressionOrCommands() {
return getRuleContext(ExpressionOrCommandsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public MultipleRightHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleRightHandSide; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMultipleRightHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMultipleRightHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMultipleRightHandSide(this);
else return visitor.visitChildren(this);
}
}
public final MultipleRightHandSideContext multipleRightHandSide() throws RecognitionException {
MultipleRightHandSideContext _localctx = new MultipleRightHandSideContext(_ctx, getState());
enterRule(_localctx, 24, RULE_multipleRightHandSide);
int _la;
try {
setState(580);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,64,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(571);
expressionOrCommands();
setState(577);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) {
case 1:
{
setState(572);
match(COMMA);
setState(574);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(573);
match(NL);
}
}
setState(576);
splattingArgument();
}
break;
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(579);
splattingArgument();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExpressionOrCommandsContext extends ParserRuleContext {
public List expressionOrCommand() {
return getRuleContexts(ExpressionOrCommandContext.class);
}
public ExpressionOrCommandContext expressionOrCommand(int i) {
return getRuleContext(ExpressionOrCommandContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ExpressionOrCommandsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressionOrCommands; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionOrCommands(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionOrCommands(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionOrCommands(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionOrCommandsContext expressionOrCommands() throws RecognitionException {
ExpressionOrCommandsContext _localctx = new ExpressionOrCommandsContext(_ctx, getState());
enterRule(_localctx, 26, RULE_expressionOrCommands);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(582);
expressionOrCommand(0);
setState(590);
_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(583);
match(COMMA);
setState(585);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(584);
match(NL);
}
}
setState(587);
expressionOrCommand(0);
}
}
}
setState(592);
_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 InvocationWithoutParenthesesContext extends ParserRuleContext {
public InvocationWithoutParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_invocationWithoutParentheses; }
public InvocationWithoutParenthesesContext() { }
public void copyFrom(InvocationWithoutParenthesesContext ctx) {
super.copyFrom(ctx);
}
}
public static class ChainedCommandDoBlockInvocationWithoutParenthesesContext extends InvocationWithoutParenthesesContext {
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public ChainedCommandDoBlockInvocationWithoutParenthesesContext(InvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedCommandDoBlockInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedCommandDoBlockInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedCommandDoBlockInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class SingleCommandOnlyInvocationWithoutParenthesesContext extends InvocationWithoutParenthesesContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public SingleCommandOnlyInvocationWithoutParenthesesContext(InvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSingleCommandOnlyInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSingleCommandOnlyInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSingleCommandOnlyInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class BreakArgsInvocationWithoutParenthesesContext extends InvocationWithoutParenthesesContext {
public TerminalNode BREAK() { return getToken(DeprecatedRubyParser.BREAK, 0); }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public BreakArgsInvocationWithoutParenthesesContext(InvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBreakArgsInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBreakArgsInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBreakArgsInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ReturnArgsInvocationWithoutParenthesesContext extends InvocationWithoutParenthesesContext {
public TerminalNode RETURN() { return getToken(DeprecatedRubyParser.RETURN, 0); }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public ReturnArgsInvocationWithoutParenthesesContext(InvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterReturnArgsInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitReturnArgsInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitReturnArgsInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class NextArgsInvocationWithoutParenthesesContext extends InvocationWithoutParenthesesContext {
public TerminalNode NEXT() { return getToken(DeprecatedRubyParser.NEXT, 0); }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public NextArgsInvocationWithoutParenthesesContext(InvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNextArgsInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNextArgsInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNextArgsInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public final InvocationWithoutParenthesesContext invocationWithoutParentheses() throws RecognitionException {
InvocationWithoutParenthesesContext _localctx = new InvocationWithoutParenthesesContext(_ctx, getState());
enterRule(_localctx, 28, RULE_invocationWithoutParentheses);
try {
setState(603);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) {
case 1:
_localctx = new ChainedCommandDoBlockInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(593);
chainedCommandWithDoBlock();
}
break;
case 2:
_localctx = new SingleCommandOnlyInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(594);
command();
}
break;
case 3:
_localctx = new ReturnArgsInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(595);
match(RETURN);
setState(597);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,67,_ctx) ) {
case 1:
{
setState(596);
arguments();
}
break;
}
}
break;
case 4:
_localctx = new BreakArgsInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(599);
match(BREAK);
setState(600);
arguments();
}
break;
case 5:
_localctx = new NextArgsInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(601);
match(NEXT);
setState(602);
arguments();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandContext extends ParserRuleContext {
public CommandContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_command; }
public CommandContext() { }
public void copyFrom(CommandContext ctx) {
super.copyFrom(ctx);
}
}
public static class SimpleMethodCommandContext extends CommandContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public SimpleMethodCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSimpleMethodCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSimpleMethodCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSimpleMethodCommand(this);
else return visitor.visitChildren(this);
}
}
public static class MemberAccessCommandContext extends CommandContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public TerminalNode DOT() { return getToken(DeprecatedRubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public TerminalNode AMPDOT() { return getToken(DeprecatedRubyParser.AMPDOT, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public MemberAccessCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMemberAccessCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMemberAccessCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMemberAccessCommand(this);
else return visitor.visitChildren(this);
}
}
public static class SuperCommandContext extends CommandContext {
public TerminalNode SUPER() { return getToken(DeprecatedRubyParser.SUPER, 0); }
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public SuperCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSuperCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSuperCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSuperCommand(this);
else return visitor.visitChildren(this);
}
}
public static class YieldCommandContext extends CommandContext {
public TerminalNode YIELD() { return getToken(DeprecatedRubyParser.YIELD, 0); }
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public YieldCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterYieldCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitYieldCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitYieldCommand(this);
else return visitor.visitChildren(this);
}
}
public final CommandContext command() throws RecognitionException {
CommandContext _localctx = new CommandContext(_ctx, getState());
enterRule(_localctx, 30, RULE_command);
int _la;
try {
setState(620);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) {
case 1:
_localctx = new SuperCommandContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(605);
match(SUPER);
setState(606);
argumentsWithoutParentheses();
}
break;
case 2:
_localctx = new YieldCommandContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(607);
match(YIELD);
setState(608);
argumentsWithoutParentheses();
}
break;
case 3:
_localctx = new SimpleMethodCommandContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(609);
methodIdentifier();
setState(610);
argumentsWithoutParentheses();
}
break;
case 4:
_localctx = new MemberAccessCommandContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(612);
primary(0);
setState(613);
_la = _input.LA(1);
if ( !(((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (COLON2 - 64)) | (1L << (DOT - 64)) | (1L << (AMPDOT - 64)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(615);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(614);
match(NL);
}
}
setState(617);
methodName();
setState(618);
argumentsWithoutParentheses();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ChainedCommandWithDoBlockContext extends ParserRuleContext {
public CommandWithDoBlockContext commandWithDoBlock() {
return getRuleContext(CommandWithDoBlockContext.class,0);
}
public List methodName() {
return getRuleContexts(MethodNameContext.class);
}
public MethodNameContext methodName(int i) {
return getRuleContext(MethodNameContext.class,i);
}
public List DOT() { return getTokens(DeprecatedRubyParser.DOT); }
public TerminalNode DOT(int i) {
return getToken(DeprecatedRubyParser.DOT, i);
}
public List COLON2() { return getTokens(DeprecatedRubyParser.COLON2); }
public TerminalNode COLON2(int i) {
return getToken(DeprecatedRubyParser.COLON2, i);
}
public List argumentsWithParentheses() {
return getRuleContexts(ArgumentsWithParenthesesContext.class);
}
public ArgumentsWithParenthesesContext argumentsWithParentheses(int i) {
return getRuleContext(ArgumentsWithParenthesesContext.class,i);
}
public ChainedCommandWithDoBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_chainedCommandWithDoBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() throws RecognitionException {
ChainedCommandWithDoBlockContext _localctx = new ChainedCommandWithDoBlockContext(_ctx, getState());
enterRule(_localctx, 32, RULE_chainedCommandWithDoBlock);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(622);
commandWithDoBlock();
setState(630);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,72,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(623);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(624);
methodName();
setState(626);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) {
case 1:
{
setState(625);
argumentsWithParentheses();
}
break;
}
}
}
}
setState(632);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,72,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandWithDoBlockContext extends ParserRuleContext {
public CommandWithDoBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandWithDoBlock; }
public CommandWithDoBlockContext() { }
public void copyFrom(CommandWithDoBlockContext ctx) {
super.copyFrom(ctx);
}
}
public static class PrimaryMethodArgsDoBlockCommandWithDoBlockContext extends CommandWithDoBlockContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public DoBlockContext doBlock() {
return getRuleContext(DoBlockContext.class,0);
}
public TerminalNode DOT() { return getToken(DeprecatedRubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public PrimaryMethodArgsDoBlockCommandWithDoBlockContext(CommandWithDoBlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterPrimaryMethodArgsDoBlockCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitPrimaryMethodArgsDoBlockCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitPrimaryMethodArgsDoBlockCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public static class ArgsAndDoBlockAndMethodIdCommandWithDoBlockContext extends CommandWithDoBlockContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public DoBlockContext doBlock() {
return getRuleContext(DoBlockContext.class,0);
}
public ArgsAndDoBlockAndMethodIdCommandWithDoBlockContext(CommandWithDoBlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArgsAndDoBlockAndMethodIdCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArgsAndDoBlockAndMethodIdCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArgsAndDoBlockAndMethodIdCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public static class ArgsAndDoBlockCommandWithDoBlockContext extends CommandWithDoBlockContext {
public TerminalNode SUPER() { return getToken(DeprecatedRubyParser.SUPER, 0); }
public ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() {
return getRuleContext(ArgumentsWithoutParenthesesContext.class,0);
}
public DoBlockContext doBlock() {
return getRuleContext(DoBlockContext.class,0);
}
public ArgsAndDoBlockCommandWithDoBlockContext(CommandWithDoBlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArgsAndDoBlockCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArgsAndDoBlockCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArgsAndDoBlockCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final CommandWithDoBlockContext commandWithDoBlock() throws RecognitionException {
CommandWithDoBlockContext _localctx = new CommandWithDoBlockContext(_ctx, getState());
enterRule(_localctx, 34, RULE_commandWithDoBlock);
int _la;
try {
setState(647);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) {
case 1:
_localctx = new ArgsAndDoBlockCommandWithDoBlockContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(633);
match(SUPER);
setState(634);
argumentsWithoutParentheses();
setState(635);
doBlock();
}
break;
case 2:
_localctx = new ArgsAndDoBlockAndMethodIdCommandWithDoBlockContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(637);
methodIdentifier();
setState(638);
argumentsWithoutParentheses();
setState(639);
doBlock();
}
break;
case 3:
_localctx = new PrimaryMethodArgsDoBlockCommandWithDoBlockContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(641);
primary(0);
setState(642);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(643);
methodName();
setState(644);
argumentsWithoutParentheses();
setState(645);
doBlock();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentsWithoutParenthesesContext extends ParserRuleContext {
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public ArgumentsWithoutParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_argumentsWithoutParentheses; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArgumentsWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArgumentsWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArgumentsWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentsWithoutParenthesesContext argumentsWithoutParentheses() throws RecognitionException {
ArgumentsWithoutParenthesesContext _localctx = new ArgumentsWithoutParenthesesContext(_ctx, getState());
enterRule(_localctx, 36, RULE_argumentsWithoutParentheses);
try {
enterOuterAlt(_localctx, 1);
{
setState(649);
arguments();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentsContext extends ParserRuleContext {
public List argument() {
return getRuleContexts(ArgumentContext.class);
}
public ArgumentContext argument(int i) {
return getRuleContext(ArgumentContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ArgumentsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arguments; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArguments(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentsContext arguments() throws RecognitionException {
ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState());
enterRule(_localctx, 38, RULE_arguments);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(651);
argument();
setState(659);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,75,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(652);
match(COMMA);
setState(654);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(653);
match(NL);
}
}
setState(656);
argument();
}
}
}
setState(661);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,75,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentContext extends ParserRuleContext {
public ArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_argument; }
public ArgumentContext() { }
public void copyFrom(ArgumentContext ctx) {
super.copyFrom(ctx);
}
}
public static class ExpressionArgumentContext extends ArgumentContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public ExpressionArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionArgument(this);
else return visitor.visitChildren(this);
}
}
public static class BlockArgumentArgumentContext extends ArgumentContext {
public BlockArgumentContext blockArgument() {
return getRuleContext(BlockArgumentContext.class,0);
}
public BlockArgumentArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBlockArgumentArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBlockArgumentArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBlockArgumentArgument(this);
else return visitor.visitChildren(this);
}
}
public static class CommandArgumentContext extends ArgumentContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterCommandArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitCommandArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitCommandArgument(this);
else return visitor.visitChildren(this);
}
}
public static class SplattingArgumentArgumentContext extends ArgumentContext {
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public SplattingArgumentArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSplattingArgumentArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSplattingArgumentArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSplattingArgumentArgument(this);
else return visitor.visitChildren(this);
}
}
public static class AssociationArgumentContext extends ArgumentContext {
public AssociationContext association() {
return getRuleContext(AssociationContext.class,0);
}
public AssociationArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAssociationArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAssociationArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAssociationArgument(this);
else return visitor.visitChildren(this);
}
}
public static class HereDocArgumentContext extends ArgumentContext {
public TerminalNode HERE_DOC_IDENTIFIER() { return getToken(DeprecatedRubyParser.HERE_DOC_IDENTIFIER, 0); }
public HereDocArgumentContext(ArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHereDocArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHereDocArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHereDocArgument(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentContext argument() throws RecognitionException {
ArgumentContext _localctx = new ArgumentContext(_ctx, getState());
enterRule(_localctx, 40, RULE_argument);
try {
setState(668);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) {
case 1:
_localctx = new HereDocArgumentContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(662);
match(HERE_DOC_IDENTIFIER);
}
break;
case 2:
_localctx = new BlockArgumentArgumentContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(663);
blockArgument();
}
break;
case 3:
_localctx = new SplattingArgumentArgumentContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(664);
splattingArgument();
}
break;
case 4:
_localctx = new AssociationArgumentContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(665);
association();
}
break;
case 5:
_localctx = new ExpressionArgumentContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(666);
expression(0);
}
break;
case 6:
_localctx = new CommandArgumentContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(667);
command();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockArgumentContext extends ParserRuleContext {
public TerminalNode AMP() { return getToken(DeprecatedRubyParser.AMP, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public BlockArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockArgument; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBlockArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBlockArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBlockArgument(this);
else return visitor.visitChildren(this);
}
}
public final BlockArgumentContext blockArgument() throws RecognitionException {
BlockArgumentContext _localctx = new BlockArgumentContext(_ctx, getState());
enterRule(_localctx, 42, RULE_blockArgument);
try {
enterOuterAlt(_localctx, 1);
{
setState(670);
match(AMP);
setState(671);
expression(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SplattingArgumentContext extends ParserRuleContext {
public TerminalNode STAR() { return getToken(DeprecatedRubyParser.STAR, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode STAR2() { return getToken(DeprecatedRubyParser.STAR2, 0); }
public SplattingArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_splattingArgument; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSplattingArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSplattingArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSplattingArgument(this);
else return visitor.visitChildren(this);
}
}
public final SplattingArgumentContext splattingArgument() throws RecognitionException {
SplattingArgumentContext _localctx = new SplattingArgumentContext(_ctx, getState());
enterRule(_localctx, 44, RULE_splattingArgument);
try {
setState(677);
_errHandler.sync(this);
switch (_input.LA(1)) {
case STAR:
enterOuterAlt(_localctx, 1);
{
setState(673);
match(STAR);
setState(674);
expressionOrCommand(0);
}
break;
case STAR2:
enterOuterAlt(_localctx, 2);
{
setState(675);
match(STAR2);
setState(676);
expressionOrCommand(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IndexingArgumentsContext extends ParserRuleContext {
public IndexingArgumentsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_indexingArguments; }
public IndexingArgumentsContext() { }
public void copyFrom(IndexingArgumentsContext ctx) {
super.copyFrom(ctx);
}
}
public static class ExpressionsAndSplattingIndexingArgumentsContext extends IndexingArgumentsContext {
public ExpressionsContext expressions() {
return getRuleContext(ExpressionsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ExpressionsAndSplattingIndexingArgumentsContext(IndexingArgumentsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionsAndSplattingIndexingArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionsAndSplattingIndexingArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionsAndSplattingIndexingArguments(this);
else return visitor.visitChildren(this);
}
}
public static class SplattingOnlyIndexingArgumentsContext extends IndexingArgumentsContext {
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public SplattingOnlyIndexingArgumentsContext(IndexingArgumentsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSplattingOnlyIndexingArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSplattingOnlyIndexingArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSplattingOnlyIndexingArguments(this);
else return visitor.visitChildren(this);
}
}
public static class AssociationsOnlyIndexingArgumentsContext extends IndexingArgumentsContext {
public AssociationsContext associations() {
return getRuleContext(AssociationsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public AssociationsOnlyIndexingArgumentsContext(IndexingArgumentsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAssociationsOnlyIndexingArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAssociationsOnlyIndexingArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAssociationsOnlyIndexingArguments(this);
else return visitor.visitChildren(this);
}
}
public static class CommandOnlyIndexingArgumentsContext extends IndexingArgumentsContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandOnlyIndexingArgumentsContext(IndexingArgumentsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterCommandOnlyIndexingArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitCommandOnlyIndexingArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitCommandOnlyIndexingArguments(this);
else return visitor.visitChildren(this);
}
}
public static class ExpressionsOnlyIndexingArgumentsContext extends IndexingArgumentsContext {
public ExpressionsContext expressions() {
return getRuleContext(ExpressionsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ExpressionsOnlyIndexingArgumentsContext(IndexingArgumentsContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionsOnlyIndexingArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionsOnlyIndexingArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionsOnlyIndexingArguments(this);
else return visitor.visitChildren(this);
}
}
public final IndexingArgumentsContext indexingArguments() throws RecognitionException {
IndexingArgumentsContext _localctx = new IndexingArgumentsContext(_ctx, getState());
enterRule(_localctx, 46, RULE_indexingArguments);
int _la;
try {
setState(702);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) {
case 1:
_localctx = new ExpressionsOnlyIndexingArgumentsContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(679);
expressions();
setState(684);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(680);
match(COMMA);
setState(682);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) {
case 1:
{
setState(681);
match(NL);
}
break;
}
}
}
}
break;
case 2:
_localctx = new ExpressionsAndSplattingIndexingArgumentsContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(686);
expressions();
setState(687);
match(COMMA);
setState(689);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(688);
match(NL);
}
}
setState(691);
splattingArgument();
}
break;
case 3:
_localctx = new AssociationsOnlyIndexingArgumentsContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(693);
associations();
setState(698);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(694);
match(COMMA);
setState(696);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
{
setState(695);
match(NL);
}
break;
}
}
}
}
break;
case 4:
_localctx = new SplattingOnlyIndexingArgumentsContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(700);
splattingArgument();
}
break;
case 5:
_localctx = new CommandOnlyIndexingArgumentsContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(701);
command();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentsWithParenthesesContext extends ParserRuleContext {
public ArgumentsWithParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_argumentsWithParentheses; }
public ArgumentsWithParenthesesContext() { }
public void copyFrom(ArgumentsWithParenthesesContext ctx) {
super.copyFrom(ctx);
}
}
public static class ArgsOnlyArgumentsWithParenthesesContext extends ArgumentsWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public ArgsOnlyArgumentsWithParenthesesContext(ArgumentsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArgsOnlyArgumentsWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArgsOnlyArgumentsWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArgsOnlyArgumentsWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class BlankArgsArgumentsWithParenthesesContext extends ArgumentsWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BlankArgsArgumentsWithParenthesesContext(ArgumentsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBlankArgsArgumentsWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBlankArgsArgumentsWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBlankArgsArgumentsWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedCommandWithDoBlockOnlyArgumentsWithParenthesesContext extends ArgumentsWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ChainedCommandWithDoBlockOnlyArgumentsWithParenthesesContext(ArgumentsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterChainedCommandWithDoBlockOnlyArgumentsWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitChainedCommandWithDoBlockOnlyArgumentsWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitChainedCommandWithDoBlockOnlyArgumentsWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ExpressionsAndChainedCommandWithDoBlockArgumentsWithParenthesesContext extends ArgumentsWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public ExpressionsContext expressions() {
return getRuleContext(ExpressionsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ExpressionsAndChainedCommandWithDoBlockArgumentsWithParenthesesContext(ArgumentsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressionsAndChainedCommandWithDoBlockArgumentsWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressionsAndChainedCommandWithDoBlockArgumentsWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressionsAndChainedCommandWithDoBlockArgumentsWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentsWithParenthesesContext argumentsWithParentheses() throws RecognitionException {
ArgumentsWithParenthesesContext _localctx = new ArgumentsWithParenthesesContext(_ctx, getState());
enterRule(_localctx, 48, RULE_argumentsWithParentheses);
int _la;
try {
setState(747);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
case 1:
_localctx = new BlankArgsArgumentsWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(704);
match(LPAREN);
setState(706);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(705);
match(NL);
}
}
setState(708);
match(RPAREN);
}
break;
case 2:
_localctx = new ArgsOnlyArgumentsWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(709);
match(LPAREN);
setState(711);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(710);
match(NL);
}
}
setState(713);
arguments();
setState(715);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(714);
match(COMMA);
}
}
setState(718);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(717);
match(NL);
}
}
setState(720);
match(RPAREN);
}
break;
case 3:
_localctx = new ExpressionsAndChainedCommandWithDoBlockArgumentsWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(722);
match(LPAREN);
setState(724);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(723);
match(NL);
}
}
setState(726);
expressions();
setState(727);
match(COMMA);
setState(729);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(728);
match(NL);
}
}
setState(731);
chainedCommandWithDoBlock();
setState(733);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(732);
match(NL);
}
}
setState(735);
match(RPAREN);
}
break;
case 4:
_localctx = new ChainedCommandWithDoBlockOnlyArgumentsWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(737);
match(LPAREN);
setState(739);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(738);
match(NL);
}
}
setState(741);
chainedCommandWithDoBlock();
setState(743);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(742);
match(NL);
}
}
setState(745);
match(RPAREN);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExpressionsContext extends ParserRuleContext {
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ExpressionsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expressions; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpressions(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpressions(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpressions(this);
else return visitor.visitChildren(this);
}
}
public final ExpressionsContext expressions() throws RecognitionException {
ExpressionsContext _localctx = new ExpressionsContext(_ctx, getState());
enterRule(_localctx, 50, RULE_expressions);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(749);
expression(0);
setState(757);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,95,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(750);
match(COMMA);
setState(752);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(751);
match(NL);
}
}
setState(754);
expression(0);
}
}
}
setState(759);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,95,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockContext extends ParserRuleContext {
public BlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
public BlockContext() { }
public void copyFrom(BlockContext ctx) {
super.copyFrom(ctx);
}
}
public static class BraceBlockBlockContext extends BlockContext {
public BraceBlockContext braceBlock() {
return getRuleContext(BraceBlockContext.class,0);
}
public BraceBlockBlockContext(BlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBraceBlockBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBraceBlockBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBraceBlockBlock(this);
else return visitor.visitChildren(this);
}
}
public static class DoBlockBlockContext extends BlockContext {
public DoBlockContext doBlock() {
return getRuleContext(DoBlockContext.class,0);
}
public DoBlockBlockContext(BlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterDoBlockBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitDoBlockBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitDoBlockBlock(this);
else return visitor.visitChildren(this);
}
}
public final BlockContext block() throws RecognitionException {
BlockContext _localctx = new BlockContext(_ctx, getState());
enterRule(_localctx, 52, RULE_block);
try {
setState(762);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LCURLY:
_localctx = new BraceBlockBlockContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(760);
braceBlock();
}
break;
case DO:
_localctx = new DoBlockBlockContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(761);
doBlock();
}
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 BraceBlockContext extends ParserRuleContext {
public TerminalNode LCURLY() { return getToken(DeprecatedRubyParser.LCURLY, 0); }
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode RCURLY() { return getToken(DeprecatedRubyParser.RCURLY, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BlockParameterContext blockParameter() {
return getRuleContext(BlockParameterContext.class,0);
}
public BraceBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_braceBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBraceBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBraceBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBraceBlock(this);
else return visitor.visitChildren(this);
}
}
public final BraceBlockContext braceBlock() throws RecognitionException {
BraceBlockContext _localctx = new BraceBlockContext(_ctx, getState());
enterRule(_localctx, 54, RULE_braceBlock);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(764);
match(LCURLY);
setState(766);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,97,_ctx) ) {
case 1:
{
setState(765);
match(NL);
}
break;
}
setState(769);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==BAR) {
{
setState(768);
blockParameter();
}
}
setState(771);
bodyStatement();
setState(772);
match(RCURLY);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DoBlockContext extends ParserRuleContext {
public TerminalNode DO() { return getToken(DeprecatedRubyParser.DO, 0); }
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public BlockParameterContext blockParameter() {
return getRuleContext(BlockParameterContext.class,0);
}
public DoBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_doBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final DoBlockContext doBlock() throws RecognitionException {
DoBlockContext _localctx = new DoBlockContext(_ctx, getState());
enterRule(_localctx, 56, RULE_doBlock);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(774);
match(DO);
setState(776);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
{
setState(775);
match(NL);
}
break;
}
setState(779);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==BAR) {
{
setState(778);
blockParameter();
}
}
setState(781);
bodyStatement();
setState(782);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockParameterContext extends ParserRuleContext {
public List BAR() { return getTokens(DeprecatedRubyParser.BAR); }
public TerminalNode BAR(int i) {
return getToken(DeprecatedRubyParser.BAR, i);
}
public BlockParametersContext blockParameters() {
return getRuleContext(BlockParametersContext.class,0);
}
public BlockParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBlockParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBlockParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBlockParameter(this);
else return visitor.visitChildren(this);
}
}
public final BlockParameterContext blockParameter() throws RecognitionException {
BlockParameterContext _localctx = new BlockParameterContext(_ctx, getState());
enterRule(_localctx, 58, RULE_blockParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(784);
match(BAR);
setState(786);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LINE__ - 3)) | (1L << (ENCODING__ - 3)) | (1L << (FILE__ - 3)) | (1L << (BEGIN_ - 3)) | (1L << (END_ - 3)) | (1L << (ALIAS - 3)) | (1L << (AND - 3)) | (1L << (BEGIN - 3)) | (1L << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (DO - 3)) | (1L << (ELSE - 3)) | (1L << (ELSIF - 3)) | (1L << (END - 3)) | (1L << (ENSURE - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (IN - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (NOT - 3)) | (1L << (OR - 3)) | (1L << (REDO - 3)) | (1L << (RESCUE - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (THEN - 3)) | (1L << (TRUE - 3)) | (1L << (UNDEF - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 3)) | (1L << (WHEN - 3)) | (1L << (WHILE - 3)) | (1L << (YIELD - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (MINUSGT - 72)) | (1L << (PLUS - 72)) | (1L << (MINUS - 72)) | (1L << (STAR - 72)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 72)) | (1L << (DOUBLE_QUOTED_STRING_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 72)) | (1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (HERE_DOC - 72)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (DECIMAL_INTEGER_LITERAL - 72)) | (1L << (BINARY_INTEGER_LITERAL - 72)) | (1L << (OCTAL_INTEGER_LITERAL - 72)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 72)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 72)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 72)) | (1L << (SYMBOL_LITERAL - 72)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 72)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 72)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 72)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 72)) | (1L << (CONSTANT_IDENTIFIER - 72)))) != 0)) {
{
setState(785);
blockParameters();
}
}
setState(788);
match(BAR);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockParametersContext extends ParserRuleContext {
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public BlockParametersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_blockParameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBlockParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBlockParameters(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBlockParameters(this);
else return visitor.visitChildren(this);
}
}
public final BlockParametersContext blockParameters() throws RecognitionException {
BlockParametersContext _localctx = new BlockParametersContext(_ctx, getState());
enterRule(_localctx, 60, RULE_blockParameters);
try {
setState(792);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(790);
singleLeftHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(791);
multipleLeftHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayConstructorContext extends ParserRuleContext {
public ArrayConstructorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayConstructor; }
public ArrayConstructorContext() { }
public void copyFrom(ArrayConstructorContext ctx) {
super.copyFrom(ctx);
}
}
public static class ExpandedWordArrayConstructorContext extends ArrayConstructorContext {
public TerminalNode QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START() { return getToken(DeprecatedRubyParser.QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END() { return getToken(DeprecatedRubyParser.QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END, 0); }
public ExpandedArrayElementsContext expandedArrayElements() {
return getRuleContext(ExpandedArrayElementsContext.class,0);
}
public ExpandedWordArrayConstructorContext(ArrayConstructorContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpandedWordArrayConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpandedWordArrayConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpandedWordArrayConstructor(this);
else return visitor.visitChildren(this);
}
}
public static class NonExpandedSymbolArrayConstructorContext extends ArrayConstructorContext {
public TerminalNode QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START() { return getToken(DeprecatedRubyParser.QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END() { return getToken(DeprecatedRubyParser.QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END, 0); }
public NonExpandedArrayElementsContext nonExpandedArrayElements() {
return getRuleContext(NonExpandedArrayElementsContext.class,0);
}
public NonExpandedSymbolArrayConstructorContext(ArrayConstructorContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNonExpandedSymbolArrayConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNonExpandedSymbolArrayConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNonExpandedSymbolArrayConstructor(this);
else return visitor.visitChildren(this);
}
}
public static class BracketedArrayConstructorContext extends ArrayConstructorContext {
public TerminalNode LBRACK() { return getToken(DeprecatedRubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(DeprecatedRubyParser.RBRACK, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public IndexingArgumentsContext indexingArguments() {
return getRuleContext(IndexingArgumentsContext.class,0);
}
public BracketedArrayConstructorContext(ArrayConstructorContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBracketedArrayConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBracketedArrayConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBracketedArrayConstructor(this);
else return visitor.visitChildren(this);
}
}
public static class ExpandedSymbolArrayConstructorContext extends ArrayConstructorContext {
public TerminalNode QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START() { return getToken(DeprecatedRubyParser.QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END() { return getToken(DeprecatedRubyParser.QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END, 0); }
public ExpandedArrayElementsContext expandedArrayElements() {
return getRuleContext(ExpandedArrayElementsContext.class,0);
}
public ExpandedSymbolArrayConstructorContext(ArrayConstructorContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpandedSymbolArrayConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpandedSymbolArrayConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpandedSymbolArrayConstructor(this);
else return visitor.visitChildren(this);
}
}
public static class NonExpandedWordArrayConstructorContext extends ArrayConstructorContext {
public TerminalNode QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START() { return getToken(DeprecatedRubyParser.QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END() { return getToken(DeprecatedRubyParser.QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END, 0); }
public NonExpandedArrayElementsContext nonExpandedArrayElements() {
return getRuleContext(NonExpandedArrayElementsContext.class,0);
}
public NonExpandedWordArrayConstructorContext(ArrayConstructorContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNonExpandedWordArrayConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNonExpandedWordArrayConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNonExpandedWordArrayConstructor(this);
else return visitor.visitChildren(this);
}
}
public final ArrayConstructorContext arrayConstructor() throws RecognitionException {
ArrayConstructorContext _localctx = new ArrayConstructorContext(_ctx, getState());
enterRule(_localctx, 62, RULE_arrayConstructor);
int _la;
try {
setState(825);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LBRACK:
_localctx = new BracketedArrayConstructorContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(794);
match(LBRACK);
setState(796);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) {
case 1:
{
setState(795);
match(NL);
}
break;
}
setState(799);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LINE__ - 3)) | (1L << (ENCODING__ - 3)) | (1L << (FILE__ - 3)) | (1L << (BEGIN_ - 3)) | (1L << (END_ - 3)) | (1L << (ALIAS - 3)) | (1L << (AND - 3)) | (1L << (BEGIN - 3)) | (1L << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (DO - 3)) | (1L << (ELSE - 3)) | (1L << (ELSIF - 3)) | (1L << (END - 3)) | (1L << (ENSURE - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (IN - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (NOT - 3)) | (1L << (OR - 3)) | (1L << (REDO - 3)) | (1L << (RESCUE - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (THEN - 3)) | (1L << (TRUE - 3)) | (1L << (UNDEF - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 3)) | (1L << (WHEN - 3)) | (1L << (WHILE - 3)) | (1L << (YIELD - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (MINUSGT - 72)) | (1L << (EMARK - 72)) | (1L << (PLUS - 72)) | (1L << (MINUS - 72)) | (1L << (STAR - 72)) | (1L << (STAR2 - 72)) | (1L << (TILDE - 72)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 72)) | (1L << (DOUBLE_QUOTED_STRING_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 72)) | (1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (HERE_DOC - 72)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (DECIMAL_INTEGER_LITERAL - 72)) | (1L << (BINARY_INTEGER_LITERAL - 72)) | (1L << (OCTAL_INTEGER_LITERAL - 72)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 72)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 72)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 72)) | (1L << (SYMBOL_LITERAL - 72)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 72)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 72)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 72)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 72)) | (1L << (CONSTANT_IDENTIFIER - 72)))) != 0)) {
{
setState(798);
indexingArguments();
}
}
setState(802);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(801);
match(NL);
}
}
setState(804);
match(RBRACK);
}
break;
case QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START:
_localctx = new NonExpandedWordArrayConstructorContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(805);
match(QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START);
setState(807);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR || _la==NON_EXPANDED_ARRAY_ITEM_CHARACTER) {
{
setState(806);
nonExpandedArrayElements();
}
}
setState(809);
match(QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END);
}
break;
case QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START:
_localctx = new NonExpandedSymbolArrayConstructorContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(810);
match(QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START);
setState(812);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR || _la==NON_EXPANDED_ARRAY_ITEM_CHARACTER) {
{
setState(811);
nonExpandedArrayElements();
}
}
setState(814);
match(QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END);
}
break;
case QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START:
_localctx = new ExpandedSymbolArrayConstructorContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(815);
match(QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START);
setState(817);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 142)) & ~0x3f) == 0 && ((1L << (_la - 142)) & ((1L << (DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN - 142)) | (1L << (EXPANDED_ARRAY_ITEM_SEPARATOR - 142)) | (1L << (EXPANDED_ARRAY_ITEM_CHARACTER - 142)))) != 0)) {
{
setState(816);
expandedArrayElements();
}
}
setState(819);
match(QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END);
}
break;
case QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START:
_localctx = new ExpandedWordArrayConstructorContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(820);
match(QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START);
setState(822);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 142)) & ~0x3f) == 0 && ((1L << (_la - 142)) & ((1L << (DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN - 142)) | (1L << (EXPANDED_ARRAY_ITEM_SEPARATOR - 142)) | (1L << (EXPANDED_ARRAY_ITEM_CHARACTER - 142)))) != 0)) {
{
setState(821);
expandedArrayElements();
}
}
setState(824);
match(QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END);
}
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 ExpandedArrayElementsContext extends ParserRuleContext {
public List expandedArrayElement() {
return getRuleContexts(ExpandedArrayElementContext.class);
}
public ExpandedArrayElementContext expandedArrayElement(int i) {
return getRuleContext(ExpandedArrayElementContext.class,i);
}
public List EXPANDED_ARRAY_ITEM_SEPARATOR() { return getTokens(DeprecatedRubyParser.EXPANDED_ARRAY_ITEM_SEPARATOR); }
public TerminalNode EXPANDED_ARRAY_ITEM_SEPARATOR(int i) {
return getToken(DeprecatedRubyParser.EXPANDED_ARRAY_ITEM_SEPARATOR, i);
}
public ExpandedArrayElementsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expandedArrayElements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpandedArrayElements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpandedArrayElements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpandedArrayElements(this);
else return visitor.visitChildren(this);
}
}
public final ExpandedArrayElementsContext expandedArrayElements() throws RecognitionException {
ExpandedArrayElementsContext _localctx = new ExpandedArrayElementsContext(_ctx, getState());
enterRule(_localctx, 64, RULE_expandedArrayElements);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(830);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==EXPANDED_ARRAY_ITEM_SEPARATOR) {
{
{
setState(827);
match(EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(832);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(833);
expandedArrayElement();
setState(842);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,113,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(835);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(834);
match(EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(837);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==EXPANDED_ARRAY_ITEM_SEPARATOR );
setState(839);
expandedArrayElement();
}
}
}
setState(844);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,113,_ctx);
}
setState(848);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==EXPANDED_ARRAY_ITEM_SEPARATOR) {
{
{
setState(845);
match(EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(850);
_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 ExpandedArrayElementContext extends ParserRuleContext {
public List EXPANDED_ARRAY_ITEM_CHARACTER() { return getTokens(DeprecatedRubyParser.EXPANDED_ARRAY_ITEM_CHARACTER); }
public TerminalNode EXPANDED_ARRAY_ITEM_CHARACTER(int i) {
return getToken(DeprecatedRubyParser.EXPANDED_ARRAY_ITEM_CHARACTER, i);
}
public List delimitedArrayItemInterpolation() {
return getRuleContexts(DelimitedArrayItemInterpolationContext.class);
}
public DelimitedArrayItemInterpolationContext delimitedArrayItemInterpolation(int i) {
return getRuleContext(DelimitedArrayItemInterpolationContext.class,i);
}
public ExpandedArrayElementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expandedArrayElement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExpandedArrayElement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExpandedArrayElement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExpandedArrayElement(this);
else return visitor.visitChildren(this);
}
}
public final ExpandedArrayElementContext expandedArrayElement() throws RecognitionException {
ExpandedArrayElementContext _localctx = new ExpandedArrayElementContext(_ctx, getState());
enterRule(_localctx, 66, RULE_expandedArrayElement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(853);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
setState(853);
_errHandler.sync(this);
switch (_input.LA(1)) {
case EXPANDED_ARRAY_ITEM_CHARACTER:
{
setState(851);
match(EXPANDED_ARRAY_ITEM_CHARACTER);
}
break;
case DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN:
{
setState(852);
delimitedArrayItemInterpolation();
}
break;
default:
throw new NoViableAltException(this);
}
}
setState(855);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN || _la==EXPANDED_ARRAY_ITEM_CHARACTER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DelimitedArrayItemInterpolationContext extends ParserRuleContext {
public TerminalNode DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN() { return getToken(DeprecatedRubyParser.DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode DELIMITED_ARRAY_ITEM_INTERPOLATION_END() { return getToken(DeprecatedRubyParser.DELIMITED_ARRAY_ITEM_INTERPOLATION_END, 0); }
public DelimitedArrayItemInterpolationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_delimitedArrayItemInterpolation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterDelimitedArrayItemInterpolation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitDelimitedArrayItemInterpolation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitDelimitedArrayItemInterpolation(this);
else return visitor.visitChildren(this);
}
}
public final DelimitedArrayItemInterpolationContext delimitedArrayItemInterpolation() throws RecognitionException {
DelimitedArrayItemInterpolationContext _localctx = new DelimitedArrayItemInterpolationContext(_ctx, getState());
enterRule(_localctx, 68, RULE_delimitedArrayItemInterpolation);
try {
enterOuterAlt(_localctx, 1);
{
setState(857);
match(DELIMITED_ARRAY_ITEM_INTERPOLATION_BEGIN);
setState(858);
compoundStatement();
setState(859);
match(DELIMITED_ARRAY_ITEM_INTERPOLATION_END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class NonExpandedArrayElementsContext extends ParserRuleContext {
public List nonExpandedArrayElement() {
return getRuleContexts(NonExpandedArrayElementContext.class);
}
public NonExpandedArrayElementContext nonExpandedArrayElement(int i) {
return getRuleContext(NonExpandedArrayElementContext.class,i);
}
public List NON_EXPANDED_ARRAY_ITEM_SEPARATOR() { return getTokens(DeprecatedRubyParser.NON_EXPANDED_ARRAY_ITEM_SEPARATOR); }
public TerminalNode NON_EXPANDED_ARRAY_ITEM_SEPARATOR(int i) {
return getToken(DeprecatedRubyParser.NON_EXPANDED_ARRAY_ITEM_SEPARATOR, i);
}
public NonExpandedArrayElementsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_nonExpandedArrayElements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNonExpandedArrayElements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNonExpandedArrayElements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNonExpandedArrayElements(this);
else return visitor.visitChildren(this);
}
}
public final NonExpandedArrayElementsContext nonExpandedArrayElements() throws RecognitionException {
NonExpandedArrayElementsContext _localctx = new NonExpandedArrayElementsContext(_ctx, getState());
enterRule(_localctx, 70, RULE_nonExpandedArrayElements);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(864);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR) {
{
{
setState(861);
match(NON_EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(866);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(867);
nonExpandedArrayElement();
setState(876);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,119,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(869);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(868);
match(NON_EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(871);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR );
setState(873);
nonExpandedArrayElement();
}
}
}
setState(878);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,119,_ctx);
}
setState(882);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR) {
{
{
setState(879);
match(NON_EXPANDED_ARRAY_ITEM_SEPARATOR);
}
}
setState(884);
_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 NonExpandedArrayElementContext extends ParserRuleContext {
public List NON_EXPANDED_ARRAY_ITEM_CHARACTER() { return getTokens(DeprecatedRubyParser.NON_EXPANDED_ARRAY_ITEM_CHARACTER); }
public TerminalNode NON_EXPANDED_ARRAY_ITEM_CHARACTER(int i) {
return getToken(DeprecatedRubyParser.NON_EXPANDED_ARRAY_ITEM_CHARACTER, i);
}
public NonExpandedArrayElementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_nonExpandedArrayElement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterNonExpandedArrayElement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitNonExpandedArrayElement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitNonExpandedArrayElement(this);
else return visitor.visitChildren(this);
}
}
public final NonExpandedArrayElementContext nonExpandedArrayElement() throws RecognitionException {
NonExpandedArrayElementContext _localctx = new NonExpandedArrayElementContext(_ctx, getState());
enterRule(_localctx, 72, RULE_nonExpandedArrayElement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(886);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(885);
match(NON_EXPANDED_ARRAY_ITEM_CHARACTER);
}
}
setState(888);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==NON_EXPANDED_ARRAY_ITEM_CHARACTER );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class HashConstructorContext extends ParserRuleContext {
public TerminalNode LCURLY() { return getToken(DeprecatedRubyParser.LCURLY, 0); }
public TerminalNode RCURLY() { return getToken(DeprecatedRubyParser.RCURLY, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public HashConstructorElementsContext hashConstructorElements() {
return getRuleContext(HashConstructorElementsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public HashConstructorContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_hashConstructor; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHashConstructor(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHashConstructor(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHashConstructor(this);
else return visitor.visitChildren(this);
}
}
public final HashConstructorContext hashConstructor() throws RecognitionException {
HashConstructorContext _localctx = new HashConstructorContext(_ctx, getState());
enterRule(_localctx, 74, RULE_hashConstructor);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(890);
match(LCURLY);
setState(892);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) {
case 1:
{
setState(891);
match(NL);
}
break;
}
setState(898);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LINE__ - 3)) | (1L << (ENCODING__ - 3)) | (1L << (FILE__ - 3)) | (1L << (BEGIN_ - 3)) | (1L << (END_ - 3)) | (1L << (ALIAS - 3)) | (1L << (AND - 3)) | (1L << (BEGIN - 3)) | (1L << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (DO - 3)) | (1L << (ELSE - 3)) | (1L << (ELSIF - 3)) | (1L << (END - 3)) | (1L << (ENSURE - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (IN - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (NOT - 3)) | (1L << (OR - 3)) | (1L << (REDO - 3)) | (1L << (RESCUE - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (THEN - 3)) | (1L << (TRUE - 3)) | (1L << (UNDEF - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 3)) | (1L << (WHEN - 3)) | (1L << (WHILE - 3)) | (1L << (YIELD - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)))) != 0) || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (MINUSGT - 72)) | (1L << (EMARK - 72)) | (1L << (PLUS - 72)) | (1L << (MINUS - 72)) | (1L << (STAR - 72)) | (1L << (STAR2 - 72)) | (1L << (TILDE - 72)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 72)) | (1L << (DOUBLE_QUOTED_STRING_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 72)) | (1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 72)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 72)) | (1L << (HERE_DOC - 72)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 72)) | (1L << (DECIMAL_INTEGER_LITERAL - 72)) | (1L << (BINARY_INTEGER_LITERAL - 72)) | (1L << (OCTAL_INTEGER_LITERAL - 72)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 72)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 72)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 72)) | (1L << (SYMBOL_LITERAL - 72)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 72)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 72)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 72)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 72)) | (1L << (CONSTANT_IDENTIFIER - 72)))) != 0)) {
{
setState(894);
hashConstructorElements();
setState(896);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(895);
match(COMMA);
}
}
}
}
setState(901);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(900);
match(NL);
}
}
setState(903);
match(RCURLY);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class HashConstructorElementsContext extends ParserRuleContext {
public List hashConstructorElement() {
return getRuleContexts(HashConstructorElementContext.class);
}
public HashConstructorElementContext hashConstructorElement(int i) {
return getRuleContext(HashConstructorElementContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public HashConstructorElementsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_hashConstructorElements; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHashConstructorElements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHashConstructorElements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHashConstructorElements(this);
else return visitor.visitChildren(this);
}
}
public final HashConstructorElementsContext hashConstructorElements() throws RecognitionException {
HashConstructorElementsContext _localctx = new HashConstructorElementsContext(_ctx, getState());
enterRule(_localctx, 76, RULE_hashConstructorElements);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(905);
hashConstructorElement();
setState(913);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,127,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(906);
match(COMMA);
setState(908);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(907);
match(NL);
}
}
setState(910);
hashConstructorElement();
}
}
}
setState(915);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,127,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class HashConstructorElementContext extends ParserRuleContext {
public AssociationContext association() {
return getRuleContext(AssociationContext.class,0);
}
public TerminalNode STAR2() { return getToken(DeprecatedRubyParser.STAR2, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public HashConstructorElementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_hashConstructorElement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHashConstructorElement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHashConstructorElement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHashConstructorElement(this);
else return visitor.visitChildren(this);
}
}
public final HashConstructorElementContext hashConstructorElement() throws RecognitionException {
HashConstructorElementContext _localctx = new HashConstructorElementContext(_ctx, getState());
enterRule(_localctx, 78, RULE_hashConstructorElement);
try {
setState(919);
_errHandler.sync(this);
switch (_input.LA(1)) {
case REGULAR_EXPRESSION_START:
case LINE__:
case ENCODING__:
case FILE__:
case BEGIN_:
case END_:
case ALIAS:
case AND:
case BEGIN:
case BREAK:
case CASE:
case CLASS:
case DEF:
case IS_DEFINED:
case DO:
case ELSE:
case ELSIF:
case END:
case ENSURE:
case FOR:
case FALSE:
case IF:
case IN:
case MODULE:
case NEXT:
case NIL:
case NOT:
case OR:
case REDO:
case RESCUE:
case RETRY:
case RETURN:
case SELF:
case SUPER:
case THEN:
case TRUE:
case UNDEF:
case UNLESS:
case UNTIL:
case WHEN:
case WHILE:
case YIELD:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case MINUSGT:
case EMARK:
case PLUS:
case MINUS:
case STAR:
case TILDE:
case SINGLE_QUOTED_STRING_LITERAL:
case DOUBLE_QUOTED_STRING_START:
case QUOTED_NON_EXPANDED_STRING_LITERAL_START:
case QUOTED_EXPANDED_STRING_LITERAL_START:
case QUOTED_EXPANDED_REGULAR_EXPRESSION_START:
case QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START:
case QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START:
case QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START:
case HERE_DOC:
case QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START:
case QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START:
case DECIMAL_INTEGER_LITERAL:
case BINARY_INTEGER_LITERAL:
case OCTAL_INTEGER_LITERAL:
case HEXADECIMAL_INTEGER_LITERAL:
case FLOAT_LITERAL_WITHOUT_EXPONENT:
case FLOAT_LITERAL_WITH_EXPONENT:
case SYMBOL_LITERAL:
case LOCAL_VARIABLE_IDENTIFIER:
case GLOBAL_VARIABLE_IDENTIFIER:
case INSTANCE_VARIABLE_IDENTIFIER:
case CLASS_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
setState(916);
association();
}
break;
case STAR2:
enterOuterAlt(_localctx, 2);
{
setState(917);
match(STAR2);
setState(918);
expression(0);
}
break;
default:
throw new NoViableAltException(this);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AssociationsContext extends ParserRuleContext {
public List association() {
return getRuleContexts(AssociationContext.class);
}
public AssociationContext association(int i) {
return getRuleContext(AssociationContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public AssociationsContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_associations; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAssociations(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAssociations(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAssociations(this);
else return visitor.visitChildren(this);
}
}
public final AssociationsContext associations() throws RecognitionException {
AssociationsContext _localctx = new AssociationsContext(_ctx, getState());
enterRule(_localctx, 80, RULE_associations);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(921);
association();
setState(929);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,130,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(922);
match(COMMA);
setState(924);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(923);
match(NL);
}
}
setState(926);
association();
}
}
}
setState(931);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,130,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class AssociationContext extends ParserRuleContext {
public TerminalNode EQGT() { return getToken(DeprecatedRubyParser.EQGT, 0); }
public TerminalNode COLON() { return getToken(DeprecatedRubyParser.COLON, 0); }
public List expression() {
return getRuleContexts(ExpressionContext.class);
}
public ExpressionContext expression(int i) {
return getRuleContext(ExpressionContext.class,i);
}
public KeywordContext keyword() {
return getRuleContext(KeywordContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public AssociationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_association; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAssociation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAssociation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAssociation(this);
else return visitor.visitChildren(this);
}
}
public final AssociationContext association() throws RecognitionException {
AssociationContext _localctx = new AssociationContext(_ctx, getState());
enterRule(_localctx, 82, RULE_association);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(934);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,131,_ctx) ) {
case 1:
{
setState(932);
expression(0);
}
break;
case 2:
{
setState(933);
keyword();
}
break;
}
setState(936);
_la = _input.LA(1);
if ( !(_la==COLON || _la==EQGT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(941);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,133,_ctx) ) {
case 1:
{
setState(938);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(937);
match(NL);
}
}
setState(940);
expression(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodDefinitionContext extends ParserRuleContext {
public TerminalNode DEF() { return getToken(DeprecatedRubyParser.DEF, 0); }
public MethodNamePartContext methodNamePart() {
return getRuleContext(MethodNamePartContext.class,0);
}
public MethodParameterPartContext methodParameterPart() {
return getRuleContext(MethodParameterPartContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public TerminalNode EQ() { return getToken(DeprecatedRubyParser.EQ, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public MethodDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodDefinition(this);
else return visitor.visitChildren(this);
}
}
public final MethodDefinitionContext methodDefinition() throws RecognitionException {
MethodDefinitionContext _localctx = new MethodDefinitionContext(_ctx, getState());
enterRule(_localctx, 84, RULE_methodDefinition);
int _la;
try {
setState(964);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,137,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(943);
match(DEF);
setState(945);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(944);
match(NL);
}
}
setState(947);
methodNamePart();
setState(948);
methodParameterPart();
setState(949);
bodyStatement();
setState(950);
match(END);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(952);
match(DEF);
setState(954);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(953);
match(NL);
}
}
setState(956);
methodIdentifier();
setState(957);
methodParameterPart();
setState(958);
match(EQ);
setState(960);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(959);
match(NL);
}
}
setState(962);
expression(0);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ProcDefinitionContext extends ParserRuleContext {
public TerminalNode MINUSGT() { return getToken(DeprecatedRubyParser.MINUSGT, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public ParametersContext parameters() {
return getRuleContext(ParametersContext.class,0);
}
public ProcDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_procDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterProcDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitProcDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitProcDefinition(this);
else return visitor.visitChildren(this);
}
}
public final ProcDefinitionContext procDefinition() throws RecognitionException {
ProcDefinitionContext _localctx = new ProcDefinitionContext(_ctx, getState());
enterRule(_localctx, 86, RULE_procDefinition);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(966);
match(MINUSGT);
setState(972);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(967);
match(LPAREN);
setState(969);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 76)) & ~0x3f) == 0 && ((1L << (_la - 76)) & ((1L << (AMP - 76)) | (1L << (STAR - 76)) | (1L << (STAR2 - 76)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 76)))) != 0)) {
{
setState(968);
parameters();
}
}
setState(971);
match(RPAREN);
}
}
setState(974);
block();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodNamePartContext extends ParserRuleContext {
public MethodNamePartContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodNamePart; }
public MethodNamePartContext() { }
public void copyFrom(MethodNamePartContext ctx) {
super.copyFrom(ctx);
}
}
public static class SimpleMethodNamePartContext extends MethodNamePartContext {
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public SimpleMethodNamePartContext(MethodNamePartContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSimpleMethodNamePart(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSimpleMethodNamePart(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSimpleMethodNamePart(this);
else return visitor.visitChildren(this);
}
}
public static class SingletonMethodNamePartContext extends MethodNamePartContext {
public SingletonObjectContext singletonObject() {
return getRuleContext(SingletonObjectContext.class,0);
}
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public TerminalNode DOT() { return getToken(DeprecatedRubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(DeprecatedRubyParser.COLON2, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public SingletonMethodNamePartContext(MethodNamePartContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSingletonMethodNamePart(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSingletonMethodNamePart(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSingletonMethodNamePart(this);
else return visitor.visitChildren(this);
}
}
public final MethodNamePartContext methodNamePart() throws RecognitionException {
MethodNamePartContext _localctx = new MethodNamePartContext(_ctx, getState());
enterRule(_localctx, 88, RULE_methodNamePart);
int _la;
try {
setState(987);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) {
case 1:
_localctx = new SimpleMethodNamePartContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(976);
definedMethodName();
}
break;
case 2:
_localctx = new SingletonMethodNamePartContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(977);
singletonObject();
setState(979);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(978);
match(NL);
}
}
setState(981);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(983);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(982);
match(NL);
}
}
setState(985);
definedMethodName();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class SingletonObjectContext extends ParserRuleContext {
public VariableIdentifierContext variableIdentifier() {
return getRuleContext(VariableIdentifierContext.class,0);
}
public PseudoVariableIdentifierContext pseudoVariableIdentifier() {
return getRuleContext(PseudoVariableIdentifierContext.class,0);
}
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public SingletonObjectContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singletonObject; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterSingletonObject(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitSingletonObject(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitSingletonObject(this);
else return visitor.visitChildren(this);
}
}
public final SingletonObjectContext singletonObject() throws RecognitionException {
SingletonObjectContext _localctx = new SingletonObjectContext(_ctx, getState());
enterRule(_localctx, 90, RULE_singletonObject);
try {
setState(995);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LOCAL_VARIABLE_IDENTIFIER:
case GLOBAL_VARIABLE_IDENTIFIER:
case INSTANCE_VARIABLE_IDENTIFIER:
case CLASS_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
setState(989);
variableIdentifier();
}
break;
case LINE__:
case ENCODING__:
case FILE__:
case FALSE:
case NIL:
case SELF:
case TRUE:
enterOuterAlt(_localctx, 2);
{
setState(990);
pseudoVariableIdentifier();
}
break;
case LPAREN:
enterOuterAlt(_localctx, 3);
{
setState(991);
match(LPAREN);
setState(992);
expressionOrCommand(0);
setState(993);
match(RPAREN);
}
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 DefinedMethodNameContext extends ParserRuleContext {
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public AssignmentLikeMethodIdentifierContext assignmentLikeMethodIdentifier() {
return getRuleContext(AssignmentLikeMethodIdentifierContext.class,0);
}
public DefinedMethodNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_definedMethodName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterDefinedMethodName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitDefinedMethodName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitDefinedMethodName(this);
else return visitor.visitChildren(this);
}
}
public final DefinedMethodNameContext definedMethodName() throws RecognitionException {
DefinedMethodNameContext _localctx = new DefinedMethodNameContext(_ctx, getState());
enterRule(_localctx, 92, RULE_definedMethodName);
try {
setState(999);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LINE__:
case ENCODING__:
case FILE__:
case BEGIN_:
case END_:
case ALIAS:
case AND:
case BEGIN:
case BREAK:
case CASE:
case CLASS:
case DEF:
case IS_DEFINED:
case DO:
case ELSE:
case ELSIF:
case END:
case ENSURE:
case FOR:
case FALSE:
case IF:
case IN:
case MODULE:
case NEXT:
case NIL:
case NOT:
case OR:
case REDO:
case RESCUE:
case RETRY:
case RETURN:
case SELF:
case SUPER:
case THEN:
case TRUE:
case UNDEF:
case UNLESS:
case UNTIL:
case WHEN:
case WHILE:
case YIELD:
case LBRACK:
case AMP:
case BAR:
case EQ2:
case EQ3:
case CARET:
case LTEQGT:
case EQTILDE:
case GT:
case GTEQ:
case LT:
case LTEQ:
case LT2:
case GT2:
case PLUS:
case MINUS:
case STAR:
case STAR2:
case SLASH:
case PERCENT:
case TILDE:
case PLUSAT:
case MINUSAT:
case LOCAL_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
setState(997);
methodName();
}
break;
case ASSIGNMENT_LIKE_METHOD_IDENTIFIER:
enterOuterAlt(_localctx, 2);
{
setState(998);
assignmentLikeMethodIdentifier();
}
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 AssignmentLikeMethodIdentifierContext extends ParserRuleContext {
public TerminalNode ASSIGNMENT_LIKE_METHOD_IDENTIFIER() { return getToken(DeprecatedRubyParser.ASSIGNMENT_LIKE_METHOD_IDENTIFIER, 0); }
public AssignmentLikeMethodIdentifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_assignmentLikeMethodIdentifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterAssignmentLikeMethodIdentifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitAssignmentLikeMethodIdentifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitAssignmentLikeMethodIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final AssignmentLikeMethodIdentifierContext assignmentLikeMethodIdentifier() throws RecognitionException {
AssignmentLikeMethodIdentifierContext _localctx = new AssignmentLikeMethodIdentifierContext(_ctx, getState());
enterRule(_localctx, 94, RULE_assignmentLikeMethodIdentifier);
try {
enterOuterAlt(_localctx, 1);
{
setState(1001);
match(ASSIGNMENT_LIKE_METHOD_IDENTIFIER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodNameContext extends ParserRuleContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public OperatorMethodNameContext operatorMethodName() {
return getRuleContext(OperatorMethodNameContext.class,0);
}
public KeywordContext keyword() {
return getRuleContext(KeywordContext.class,0);
}
public MethodNameContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodName; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodName(this);
else return visitor.visitChildren(this);
}
}
public final MethodNameContext methodName() throws RecognitionException {
MethodNameContext _localctx = new MethodNameContext(_ctx, getState());
enterRule(_localctx, 96, RULE_methodName);
try {
setState(1006);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1003);
methodIdentifier();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1004);
operatorMethodName();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1005);
keyword();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodIdentifierContext extends ParserRuleContext {
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public MethodOnlyIdentifierContext methodOnlyIdentifier() {
return getRuleContext(MethodOnlyIdentifierContext.class,0);
}
public MethodIdentifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodIdentifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodIdentifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodIdentifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final MethodIdentifierContext methodIdentifier() throws RecognitionException {
MethodIdentifierContext _localctx = new MethodIdentifierContext(_ctx, getState());
enterRule(_localctx, 98, RULE_methodIdentifier);
try {
setState(1011);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,146,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1008);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1009);
match(CONSTANT_IDENTIFIER);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1010);
methodOnlyIdentifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodOnlyIdentifierContext extends ParserRuleContext {
public TerminalNode EMARK() { return getToken(DeprecatedRubyParser.EMARK, 0); }
public TerminalNode QMARK() { return getToken(DeprecatedRubyParser.QMARK, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public KeywordContext keyword() {
return getRuleContext(KeywordContext.class,0);
}
public MethodOnlyIdentifierContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodOnlyIdentifier; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodOnlyIdentifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodOnlyIdentifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodOnlyIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final MethodOnlyIdentifierContext methodOnlyIdentifier() throws RecognitionException {
MethodOnlyIdentifierContext _localctx = new MethodOnlyIdentifierContext(_ctx, getState());
enterRule(_localctx, 100, RULE_methodOnlyIdentifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1016);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LOCAL_VARIABLE_IDENTIFIER:
{
setState(1013);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case CONSTANT_IDENTIFIER:
{
setState(1014);
match(CONSTANT_IDENTIFIER);
}
break;
case LINE__:
case ENCODING__:
case FILE__:
case BEGIN_:
case END_:
case ALIAS:
case AND:
case BEGIN:
case BREAK:
case CASE:
case CLASS:
case DEF:
case IS_DEFINED:
case DO:
case ELSE:
case ELSIF:
case END:
case ENSURE:
case FOR:
case FALSE:
case IF:
case IN:
case MODULE:
case NEXT:
case NIL:
case NOT:
case OR:
case REDO:
case RESCUE:
case RETRY:
case RETURN:
case SELF:
case SUPER:
case THEN:
case TRUE:
case UNDEF:
case UNLESS:
case UNTIL:
case WHEN:
case WHILE:
case YIELD:
{
setState(1015);
keyword();
}
break;
default:
throw new NoViableAltException(this);
}
setState(1018);
_la = _input.LA(1);
if ( !(_la==QMARK || _la==EMARK) ) {
_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 MethodParameterPartContext extends ParserRuleContext {
public TerminalNode LPAREN() { return getToken(DeprecatedRubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(DeprecatedRubyParser.RPAREN, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ParametersContext parameters() {
return getRuleContext(ParametersContext.class,0);
}
public MethodParameterPartContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodParameterPart; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMethodParameterPart(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMethodParameterPart(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMethodParameterPart(this);
else return visitor.visitChildren(this);
}
}
public final MethodParameterPartContext methodParameterPart() throws RecognitionException {
MethodParameterPartContext _localctx = new MethodParameterPartContext(_ctx, getState());
enterRule(_localctx, 102, RULE_methodParameterPart);
int _la;
try {
setState(1034);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,152,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1020);
match(LPAREN);
setState(1022);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,148,_ctx) ) {
case 1:
{
setState(1021);
match(NL);
}
break;
}
setState(1025);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 76)) & ~0x3f) == 0 && ((1L << (_la - 76)) & ((1L << (AMP - 76)) | (1L << (STAR - 76)) | (1L << (STAR2 - 76)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 76)))) != 0)) {
{
setState(1024);
parameters();
}
}
setState(1028);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1027);
match(NL);
}
}
setState(1030);
match(RPAREN);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1032);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,151,_ctx) ) {
case 1:
{
setState(1031);
parameters();
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ParametersContext extends ParserRuleContext {
public List parameter() {
return getRuleContexts(ParameterContext.class);
}
public ParameterContext parameter(int i) {
return getRuleContext(ParameterContext.class,i);
}
public List COMMA() { return getTokens(DeprecatedRubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(DeprecatedRubyParser.COMMA, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ParametersContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameters; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterParameters(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitParameters(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitParameters(this);
else return visitor.visitChildren(this);
}
}
public final ParametersContext parameters() throws RecognitionException {
ParametersContext _localctx = new ParametersContext(_ctx, getState());
enterRule(_localctx, 104, RULE_parameters);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1036);
parameter();
setState(1044);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
setState(1037);
match(COMMA);
setState(1039);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1038);
match(NL);
}
}
setState(1041);
parameter();
}
}
setState(1046);
_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 ParameterContext extends ParserRuleContext {
public OptionalParameterContext optionalParameter() {
return getRuleContext(OptionalParameterContext.class,0);
}
public MandatoryParameterContext mandatoryParameter() {
return getRuleContext(MandatoryParameterContext.class,0);
}
public ArrayParameterContext arrayParameter() {
return getRuleContext(ArrayParameterContext.class,0);
}
public HashParameterContext hashParameter() {
return getRuleContext(HashParameterContext.class,0);
}
public KeywordParameterContext keywordParameter() {
return getRuleContext(KeywordParameterContext.class,0);
}
public ProcParameterContext procParameter() {
return getRuleContext(ProcParameterContext.class,0);
}
public ParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_parameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitParameter(this);
else return visitor.visitChildren(this);
}
}
public final ParameterContext parameter() throws RecognitionException {
ParameterContext _localctx = new ParameterContext(_ctx, getState());
enterRule(_localctx, 106, RULE_parameter);
try {
setState(1053);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,155,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1047);
optionalParameter();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1048);
mandatoryParameter();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(1049);
arrayParameter();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(1050);
hashParameter();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(1051);
keywordParameter();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
setState(1052);
procParameter();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MandatoryParameterContext extends ParserRuleContext {
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public MandatoryParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_mandatoryParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterMandatoryParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitMandatoryParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitMandatoryParameter(this);
else return visitor.visitChildren(this);
}
}
public final MandatoryParameterContext mandatoryParameter() throws RecognitionException {
MandatoryParameterContext _localctx = new MandatoryParameterContext(_ctx, getState());
enterRule(_localctx, 108, RULE_mandatoryParameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(1055);
match(LOCAL_VARIABLE_IDENTIFIER);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class OptionalParameterContext extends ParserRuleContext {
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode EQ() { return getToken(DeprecatedRubyParser.EQ, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public OptionalParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_optionalParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterOptionalParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitOptionalParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitOptionalParameter(this);
else return visitor.visitChildren(this);
}
}
public final OptionalParameterContext optionalParameter() throws RecognitionException {
OptionalParameterContext _localctx = new OptionalParameterContext(_ctx, getState());
enterRule(_localctx, 110, RULE_optionalParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1057);
match(LOCAL_VARIABLE_IDENTIFIER);
setState(1058);
match(EQ);
setState(1060);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1059);
match(NL);
}
}
setState(1062);
expression(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArrayParameterContext extends ParserRuleContext {
public TerminalNode STAR() { return getToken(DeprecatedRubyParser.STAR, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public ArrayParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_arrayParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterArrayParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitArrayParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitArrayParameter(this);
else return visitor.visitChildren(this);
}
}
public final ArrayParameterContext arrayParameter() throws RecognitionException {
ArrayParameterContext _localctx = new ArrayParameterContext(_ctx, getState());
enterRule(_localctx, 112, RULE_arrayParameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(1064);
match(STAR);
setState(1066);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,157,_ctx) ) {
case 1:
{
setState(1065);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class HashParameterContext extends ParserRuleContext {
public TerminalNode STAR2() { return getToken(DeprecatedRubyParser.STAR2, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public HashParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_hashParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterHashParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitHashParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitHashParameter(this);
else return visitor.visitChildren(this);
}
}
public final HashParameterContext hashParameter() throws RecognitionException {
HashParameterContext _localctx = new HashParameterContext(_ctx, getState());
enterRule(_localctx, 114, RULE_hashParameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(1068);
match(STAR2);
setState(1070);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,158,_ctx) ) {
case 1:
{
setState(1069);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class KeywordParameterContext extends ParserRuleContext {
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode COLON() { return getToken(DeprecatedRubyParser.COLON, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public KeywordParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_keywordParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterKeywordParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitKeywordParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitKeywordParameter(this);
else return visitor.visitChildren(this);
}
}
public final KeywordParameterContext keywordParameter() throws RecognitionException {
KeywordParameterContext _localctx = new KeywordParameterContext(_ctx, getState());
enterRule(_localctx, 116, RULE_keywordParameter);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1072);
match(LOCAL_VARIABLE_IDENTIFIER);
setState(1073);
match(COLON);
setState(1078);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,160,_ctx) ) {
case 1:
{
setState(1075);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1074);
match(NL);
}
}
setState(1077);
expression(0);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ProcParameterContext extends ParserRuleContext {
public TerminalNode AMP() { return getToken(DeprecatedRubyParser.AMP, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(DeprecatedRubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public ProcParameterContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_procParameter; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterProcParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitProcParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitProcParameter(this);
else return visitor.visitChildren(this);
}
}
public final ProcParameterContext procParameter() throws RecognitionException {
ProcParameterContext _localctx = new ProcParameterContext(_ctx, getState());
enterRule(_localctx, 118, RULE_procParameter);
try {
enterOuterAlt(_localctx, 1);
{
setState(1080);
match(AMP);
setState(1082);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,161,_ctx) ) {
case 1:
{
setState(1081);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IfExpressionContext extends ParserRuleContext {
public TerminalNode IF() { return getToken(DeprecatedRubyParser.IF, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public List elsifClause() {
return getRuleContexts(ElsifClauseContext.class);
}
public ElsifClauseContext elsifClause(int i) {
return getRuleContext(ElsifClauseContext.class,i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public IfExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ifExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterIfExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitIfExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitIfExpression(this);
else return visitor.visitChildren(this);
}
}
public final IfExpressionContext ifExpression() throws RecognitionException {
IfExpressionContext _localctx = new IfExpressionContext(_ctx, getState());
enterRule(_localctx, 120, RULE_ifExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1084);
match(IF);
setState(1086);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1085);
match(NL);
}
}
setState(1088);
expressionOrCommand(0);
setState(1089);
thenClause();
setState(1093);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==ELSIF) {
{
{
setState(1090);
elsifClause();
}
}
setState(1095);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1097);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1096);
elseClause();
}
}
setState(1099);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ThenClauseContext extends ParserRuleContext {
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public TerminalNode THEN() { return getToken(DeprecatedRubyParser.THEN, 0); }
public ThenClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_thenClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterThenClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitThenClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitThenClause(this);
else return visitor.visitChildren(this);
}
}
public final ThenClauseContext thenClause() throws RecognitionException {
ThenClauseContext _localctx = new ThenClauseContext(_ctx, getState());
enterRule(_localctx, 122, RULE_thenClause);
int _la;
try {
int _alt;
setState(1112);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,167,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1102);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1101);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1104);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,165,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1106);
compoundStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1108);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SEMI || _la==NL) {
{
setState(1107);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1110);
match(THEN);
setState(1111);
compoundStatement();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElsifClauseContext extends ParserRuleContext {
public TerminalNode ELSIF() { return getToken(DeprecatedRubyParser.ELSIF, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ElsifClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elsifClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterElsifClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitElsifClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitElsifClause(this);
else return visitor.visitChildren(this);
}
}
public final ElsifClauseContext elsifClause() throws RecognitionException {
ElsifClauseContext _localctx = new ElsifClauseContext(_ctx, getState());
enterRule(_localctx, 124, RULE_elsifClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1114);
match(ELSIF);
setState(1116);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1115);
match(NL);
}
}
setState(1118);
expressionOrCommand(0);
setState(1119);
thenClause();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ElseClauseContext extends ParserRuleContext {
public TerminalNode ELSE() { return getToken(DeprecatedRubyParser.ELSE, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public ElseClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_elseClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterElseClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitElseClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitElseClause(this);
else return visitor.visitChildren(this);
}
}
public final ElseClauseContext elseClause() throws RecognitionException {
ElseClauseContext _localctx = new ElseClauseContext(_ctx, getState());
enterRule(_localctx, 126, RULE_elseClause);
try {
enterOuterAlt(_localctx, 1);
{
setState(1121);
match(ELSE);
setState(1122);
compoundStatement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class UnlessExpressionContext extends ParserRuleContext {
public TerminalNode UNLESS() { return getToken(DeprecatedRubyParser.UNLESS, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public UnlessExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_unlessExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUnlessExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUnlessExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUnlessExpression(this);
else return visitor.visitChildren(this);
}
}
public final UnlessExpressionContext unlessExpression() throws RecognitionException {
UnlessExpressionContext _localctx = new UnlessExpressionContext(_ctx, getState());
enterRule(_localctx, 128, RULE_unlessExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1124);
match(UNLESS);
setState(1126);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1125);
match(NL);
}
}
setState(1128);
expressionOrCommand(0);
setState(1129);
thenClause();
setState(1131);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1130);
elseClause();
}
}
setState(1133);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CaseExpressionContext extends ParserRuleContext {
public TerminalNode CASE() { return getToken(DeprecatedRubyParser.CASE, 0); }
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public List whenClause() {
return getRuleContexts(WhenClauseContext.class);
}
public WhenClauseContext whenClause(int i) {
return getRuleContext(WhenClauseContext.class,i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public CaseExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_caseExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterCaseExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitCaseExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitCaseExpression(this);
else return visitor.visitChildren(this);
}
}
public final CaseExpressionContext caseExpression() throws RecognitionException {
CaseExpressionContext _localctx = new CaseExpressionContext(_ctx, getState());
enterRule(_localctx, 130, RULE_caseExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1135);
match(CASE);
setState(1137);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,171,_ctx) ) {
case 1:
{
setState(1136);
match(NL);
}
break;
}
setState(1140);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,172,_ctx) ) {
case 1:
{
setState(1139);
expressionOrCommand(0);
}
break;
}
setState(1145);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(1142);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1147);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1149);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1148);
whenClause();
}
}
setState(1151);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==WHEN );
setState(1154);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1153);
elseClause();
}
}
setState(1156);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WhenClauseContext extends ParserRuleContext {
public TerminalNode WHEN() { return getToken(DeprecatedRubyParser.WHEN, 0); }
public WhenArgumentContext whenArgument() {
return getRuleContext(WhenArgumentContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public WhenClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whenClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterWhenClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitWhenClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitWhenClause(this);
else return visitor.visitChildren(this);
}
}
public final WhenClauseContext whenClause() throws RecognitionException {
WhenClauseContext _localctx = new WhenClauseContext(_ctx, getState());
enterRule(_localctx, 132, RULE_whenClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1158);
match(WHEN);
setState(1160);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1159);
match(NL);
}
}
setState(1162);
whenArgument();
setState(1163);
thenClause();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WhenArgumentContext extends ParserRuleContext {
public ExpressionsContext expressions() {
return getRuleContext(ExpressionsContext.class,0);
}
public TerminalNode COMMA() { return getToken(DeprecatedRubyParser.COMMA, 0); }
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public WhenArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whenArgument; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterWhenArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitWhenArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitWhenArgument(this);
else return visitor.visitChildren(this);
}
}
public final WhenArgumentContext whenArgument() throws RecognitionException {
WhenArgumentContext _localctx = new WhenArgumentContext(_ctx, getState());
enterRule(_localctx, 134, RULE_whenArgument);
int _la;
try {
setState(1171);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,178,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1165);
expressions();
setState(1168);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1166);
match(COMMA);
setState(1167);
splattingArgument();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1170);
splattingArgument();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class WhileExpressionContext extends ParserRuleContext {
public TerminalNode WHILE() { return getToken(DeprecatedRubyParser.WHILE, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public WhileExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_whileExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterWhileExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitWhileExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitWhileExpression(this);
else return visitor.visitChildren(this);
}
}
public final WhileExpressionContext whileExpression() throws RecognitionException {
WhileExpressionContext _localctx = new WhileExpressionContext(_ctx, getState());
enterRule(_localctx, 136, RULE_whileExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1173);
match(WHILE);
setState(1175);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1174);
match(NL);
}
}
setState(1177);
expressionOrCommand(0);
setState(1178);
doClause();
setState(1179);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class DoClauseContext extends ParserRuleContext {
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public TerminalNode DO() { return getToken(DeprecatedRubyParser.DO, 0); }
public DoClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_doClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterDoClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitDoClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitDoClause(this);
else return visitor.visitChildren(this);
}
}
public final DoClauseContext doClause() throws RecognitionException {
DoClauseContext _localctx = new DoClauseContext(_ctx, getState());
enterRule(_localctx, 138, RULE_doClause);
int _la;
try {
int _alt;
setState(1189);
_errHandler.sync(this);
switch (_input.LA(1)) {
case SEMI:
case NL:
enterOuterAlt(_localctx, 1);
{
setState(1182);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1181);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1184);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,180,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1186);
compoundStatement();
}
break;
case DO:
enterOuterAlt(_localctx, 2);
{
setState(1187);
match(DO);
setState(1188);
compoundStatement();
}
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 UntilExpressionContext extends ParserRuleContext {
public TerminalNode UNTIL() { return getToken(DeprecatedRubyParser.UNTIL, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public UntilExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_untilExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterUntilExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitUntilExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitUntilExpression(this);
else return visitor.visitChildren(this);
}
}
public final UntilExpressionContext untilExpression() throws RecognitionException {
UntilExpressionContext _localctx = new UntilExpressionContext(_ctx, getState());
enterRule(_localctx, 140, RULE_untilExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1191);
match(UNTIL);
setState(1193);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1192);
match(NL);
}
}
setState(1195);
expressionOrCommand(0);
setState(1196);
doClause();
setState(1197);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForExpressionContext extends ParserRuleContext {
public TerminalNode FOR() { return getToken(DeprecatedRubyParser.FOR, 0); }
public ForVariableContext forVariable() {
return getRuleContext(ForVariableContext.class,0);
}
public TerminalNode IN() { return getToken(DeprecatedRubyParser.IN, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public ForExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterForExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitForExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitForExpression(this);
else return visitor.visitChildren(this);
}
}
public final ForExpressionContext forExpression() throws RecognitionException {
ForExpressionContext _localctx = new ForExpressionContext(_ctx, getState());
enterRule(_localctx, 142, RULE_forExpression);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1199);
match(FOR);
setState(1201);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1200);
match(NL);
}
}
setState(1203);
forVariable();
setState(1204);
match(IN);
setState(1206);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1205);
match(NL);
}
}
setState(1208);
expressionOrCommand(0);
setState(1209);
doClause();
setState(1210);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ForVariableContext extends ParserRuleContext {
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public ForVariableContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_forVariable; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterForVariable(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitForVariable(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitForVariable(this);
else return visitor.visitChildren(this);
}
}
public final ForVariableContext forVariable() throws RecognitionException {
ForVariableContext _localctx = new ForVariableContext(_ctx, getState());
enterRule(_localctx, 144, RULE_forVariable);
try {
setState(1214);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1212);
singleLeftHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1213);
multipleLeftHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BeginExpressionContext extends ParserRuleContext {
public TerminalNode BEGIN() { return getToken(DeprecatedRubyParser.BEGIN, 0); }
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public BeginExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_beginExpression; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBeginExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBeginExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBeginExpression(this);
else return visitor.visitChildren(this);
}
}
public final BeginExpressionContext beginExpression() throws RecognitionException {
BeginExpressionContext _localctx = new BeginExpressionContext(_ctx, getState());
enterRule(_localctx, 146, RULE_beginExpression);
try {
enterOuterAlt(_localctx, 1);
{
setState(1216);
match(BEGIN);
setState(1217);
bodyStatement();
setState(1218);
match(END);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BodyStatementContext extends ParserRuleContext {
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public List rescueClause() {
return getRuleContexts(RescueClauseContext.class);
}
public RescueClauseContext rescueClause(int i) {
return getRuleContext(RescueClauseContext.class,i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public EnsureClauseContext ensureClause() {
return getRuleContext(EnsureClauseContext.class,0);
}
public BodyStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bodyStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterBodyStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitBodyStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitBodyStatement(this);
else return visitor.visitChildren(this);
}
}
public final BodyStatementContext bodyStatement() throws RecognitionException {
BodyStatementContext _localctx = new BodyStatementContext(_ctx, getState());
enterRule(_localctx, 148, RULE_bodyStatement);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1220);
compoundStatement();
setState(1224);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==RESCUE) {
{
{
setState(1221);
rescueClause();
}
}
setState(1226);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1228);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1227);
elseClause();
}
}
setState(1231);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ENSURE) {
{
setState(1230);
ensureClause();
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class RescueClauseContext extends ParserRuleContext {
public TerminalNode RESCUE() { return getToken(DeprecatedRubyParser.RESCUE, 0); }
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public ExceptionClassContext exceptionClass() {
return getRuleContext(ExceptionClassContext.class,0);
}
public TerminalNode NL() { return getToken(DeprecatedRubyParser.NL, 0); }
public ExceptionVariableAssignmentContext exceptionVariableAssignment() {
return getRuleContext(ExceptionVariableAssignmentContext.class,0);
}
public RescueClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_rescueClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterRescueClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitRescueClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitRescueClause(this);
else return visitor.visitChildren(this);
}
}
public final RescueClauseContext rescueClause() throws RecognitionException {
RescueClauseContext _localctx = new RescueClauseContext(_ctx, getState());
enterRule(_localctx, 150, RULE_rescueClause);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(1233);
match(RESCUE);
setState(1235);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,189,_ctx) ) {
case 1:
{
setState(1234);
exceptionClass();
}
break;
}
setState(1238);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,190,_ctx) ) {
case 1:
{
setState(1237);
match(NL);
}
break;
}
setState(1241);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==EQGT) {
{
setState(1240);
exceptionVariableAssignment();
}
}
setState(1243);
thenClause();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExceptionClassContext extends ParserRuleContext {
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
}
public MultipleRightHandSideContext multipleRightHandSide() {
return getRuleContext(MultipleRightHandSideContext.class,0);
}
public ExceptionClassContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exceptionClass; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExceptionClass(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExceptionClass(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExceptionClass(this);
else return visitor.visitChildren(this);
}
}
public final ExceptionClassContext exceptionClass() throws RecognitionException {
ExceptionClassContext _localctx = new ExceptionClassContext(_ctx, getState());
enterRule(_localctx, 152, RULE_exceptionClass);
try {
setState(1247);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,192,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1245);
expression(0);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1246);
multipleRightHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ExceptionVariableAssignmentContext extends ParserRuleContext {
public TerminalNode EQGT() { return getToken(DeprecatedRubyParser.EQGT, 0); }
public SingleLeftHandSideContext singleLeftHandSide() {
return getRuleContext(SingleLeftHandSideContext.class,0);
}
public ExceptionVariableAssignmentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_exceptionVariableAssignment; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterExceptionVariableAssignment(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitExceptionVariableAssignment(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitExceptionVariableAssignment(this);
else return visitor.visitChildren(this);
}
}
public final ExceptionVariableAssignmentContext exceptionVariableAssignment() throws RecognitionException {
ExceptionVariableAssignmentContext _localctx = new ExceptionVariableAssignmentContext(_ctx, getState());
enterRule(_localctx, 154, RULE_exceptionVariableAssignment);
try {
enterOuterAlt(_localctx, 1);
{
setState(1249);
match(EQGT);
setState(1250);
singleLeftHandSide();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class EnsureClauseContext extends ParserRuleContext {
public TerminalNode ENSURE() { return getToken(DeprecatedRubyParser.ENSURE, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public EnsureClauseContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_ensureClause; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterEnsureClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitEnsureClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitEnsureClause(this);
else return visitor.visitChildren(this);
}
}
public final EnsureClauseContext ensureClause() throws RecognitionException {
EnsureClauseContext _localctx = new EnsureClauseContext(_ctx, getState());
enterRule(_localctx, 156, RULE_ensureClause);
try {
enterOuterAlt(_localctx, 1);
{
setState(1252);
match(ENSURE);
setState(1253);
compoundStatement();
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassDefinitionContext extends ParserRuleContext {
public TerminalNode CLASS() { return getToken(DeprecatedRubyParser.CLASS, 0); }
public ClassOrModuleReferenceContext classOrModuleReference() {
return getRuleContext(ClassOrModuleReferenceContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(DeprecatedRubyParser.END, 0); }
public List NL() { return getTokens(DeprecatedRubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(DeprecatedRubyParser.NL, i);
}
public TerminalNode LT() { return getToken(DeprecatedRubyParser.LT, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode LT2() { return getToken(DeprecatedRubyParser.LT2, 0); }
public List SEMI() { return getTokens(DeprecatedRubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(DeprecatedRubyParser.SEMI, i);
}
public ClassDefinitionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classDefinition; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterClassDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitClassDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof DeprecatedRubyParserVisitor ) return ((DeprecatedRubyParserVisitor extends T>)visitor).visitClassDefinition(this);
else return visitor.visitChildren(this);
}
}
public final ClassDefinitionContext classDefinition() throws RecognitionException {
ClassDefinitionContext _localctx = new ClassDefinitionContext(_ctx, getState());
enterRule(_localctx, 158, RULE_classDefinition);
int _la;
try {
int _alt;
setState(1287);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,199,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1255);
match(CLASS);
setState(1257);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1256);
match(NL);
}
}
setState(1259);
classOrModuleReference();
setState(1265);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(1260);
match(LT);
setState(1262);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1261);
match(NL);
}
}
setState(1264);
expressionOrCommand(0);
}
}
setState(1267);
bodyStatement();
setState(1268);
match(END);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1270);
match(CLASS);
setState(1272);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1271);
match(NL);
}
}
setState(1274);
match(LT2);
setState(1276);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(1275);
match(NL);
}
}
setState(1278);
expressionOrCommand(0);
setState(1280);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1279);
_la = _input.LA(1);
if ( !(_la==SEMI || _la==NL) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(1282);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,198,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1284);
bodyStatement();
setState(1285);
match(END);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ClassOrModuleReferenceContext extends ParserRuleContext {
public ScopedConstantReferenceContext scopedConstantReference() {
return getRuleContext(ScopedConstantReferenceContext.class,0);
}
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(DeprecatedRubyParser.CONSTANT_IDENTIFIER, 0); }
public ClassOrModuleReferenceContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_classOrModuleReference; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).enterClassOrModuleReference(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof DeprecatedRubyParserListener ) ((DeprecatedRubyParserListener)listener).exitClassOrModuleReference(this);
}
@Override
public