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.RubyParser Maven / Gradle / Ivy
// Generated from /home/mp/Projects/shiftleft/joern/joern-cli/frontends/rubysrc2cpg/src/main/antlr4/io/joern/rubysrc2cpg/parser/RubyParser.g4 by ANTLR 4.7.2
package io.joern.rubysrc2cpg.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 RubyParser 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_definedMethodNameOrSymbol = 4, RULE_singleAssignmentStatement = 5,
RULE_multipleAssignmentStatement = 6, RULE_leftHandSide = 7, RULE_multipleLeftHandSide = 8,
RULE_multipleLeftHandSideExceptPacking = 9, RULE_packingLeftHandSide = 10,
RULE_groupedLeftHandSide = 11, RULE_multipleLeftHandSideItem = 12, RULE_multipleRightHandSide = 13,
RULE_splattingRightHandSide = 14, RULE_methodIdentifier = 15, RULE_methodName = 16,
RULE_methodOnlyIdentifier = 17, RULE_methodInvocationWithoutParentheses = 18,
RULE_command = 19, RULE_commandArgument = 20, RULE_chainedCommandWithDoBlock = 21,
RULE_chainedMethodInvocation = 22, RULE_commandWithDoBlock = 23, RULE_indexingArgumentList = 24,
RULE_splattingArgument = 25, RULE_operatorExpressionList = 26, RULE_operatorExpressionList2 = 27,
RULE_argumentWithParentheses = 28, RULE_argumentList = 29, RULE_commandArgumentList = 30,
RULE_primaryValueList = 31, RULE_blockArgument = 32, RULE_expressionOrCommand = 33,
RULE_operatorExpression = 34, RULE_primary = 35, RULE_primaryValue = 36,
RULE_methodCallsWithParentheses = 37, RULE_commandOrPrimaryValueClass = 38,
RULE_commandOrPrimaryValue = 39, RULE_block = 40, RULE_doBlock = 41, RULE_blockParameter = 42,
RULE_thenClause = 43, RULE_elseClause = 44, RULE_elsifClause = 45, RULE_whenClause = 46,
RULE_whenArgument = 47, RULE_doClause = 48, RULE_forVariable = 49, RULE_bodyStatement = 50,
RULE_rescueClause = 51, RULE_exceptionClassList = 52, RULE_exceptionVariableAssignment = 53,
RULE_ensureClause = 54, RULE_definedMethodName = 55, RULE_methodParameterPart = 56,
RULE_parameterList = 57, RULE_mandatoryOrOptionalParameterList = 58, RULE_mandatoryOrOptionalParameter = 59,
RULE_mandatoryParameter = 60, RULE_optionalParameter = 61, RULE_optionalParameterName = 62,
RULE_arrayParameter = 63, RULE_hashParameter = 64, RULE_procParameter = 65,
RULE_procParameterName = 66, RULE_classPath = 67, RULE_singletonObject = 68,
RULE_variableReference = 69, RULE_associationList = 70, RULE_association = 71,
RULE_associationKey = 72, RULE_associationHashArgument = 73, RULE_regexpLiteralContent = 74,
RULE_singleQuotedString = 75, RULE_singleOrDoubleQuotedString = 76, RULE_doubleQuotedString = 77,
RULE_quotedExpandedExternalCommandString = 78, RULE_doubleQuotedStringContent = 79,
RULE_quotedNonExpandedLiteralString = 80, RULE_quotedExpandedLiteralString = 81,
RULE_quotedExpandedLiteralStringContent = 82, RULE_quotedNonExpandedArrayElementContent = 83,
RULE_quotedExpandedArrayElementContent = 84, RULE_quotedExpandedArrayElement = 85,
RULE_quotedNonExpandedArrayElementList = 86, RULE_quotedExpandedArrayElementList = 87,
RULE_symbol = 88, RULE_hereDoc = 89, RULE_isDefinedKeyword = 90, RULE_assignmentOperator = 91,
RULE_statementModifier = 92, RULE_variable = 93, RULE_pseudoVariable = 94,
RULE_unsignedNumericLiteral = 95, RULE_unaryOperator = 96, RULE_multiplicativeOperator = 97,
RULE_additiveOperator = 98, RULE_bitwiseShiftOperator = 99, RULE_bitwiseOrOperator = 100,
RULE_relationalOperator = 101, RULE_equalityOperator = 102, RULE_rangeOperator = 103,
RULE_keyword = 104;
private static String[] makeRuleNames() {
return new String[] {
"program", "compoundStatement", "statements", "statement", "definedMethodNameOrSymbol",
"singleAssignmentStatement", "multipleAssignmentStatement", "leftHandSide",
"multipleLeftHandSide", "multipleLeftHandSideExceptPacking", "packingLeftHandSide",
"groupedLeftHandSide", "multipleLeftHandSideItem", "multipleRightHandSide",
"splattingRightHandSide", "methodIdentifier", "methodName", "methodOnlyIdentifier",
"methodInvocationWithoutParentheses", "command", "commandArgument", "chainedCommandWithDoBlock",
"chainedMethodInvocation", "commandWithDoBlock", "indexingArgumentList",
"splattingArgument", "operatorExpressionList", "operatorExpressionList2",
"argumentWithParentheses", "argumentList", "commandArgumentList", "primaryValueList",
"blockArgument", "expressionOrCommand", "operatorExpression", "primary",
"primaryValue", "methodCallsWithParentheses", "commandOrPrimaryValueClass",
"commandOrPrimaryValue", "block", "doBlock", "blockParameter", "thenClause",
"elseClause", "elsifClause", "whenClause", "whenArgument", "doClause",
"forVariable", "bodyStatement", "rescueClause", "exceptionClassList",
"exceptionVariableAssignment", "ensureClause", "definedMethodName", "methodParameterPart",
"parameterList", "mandatoryOrOptionalParameterList", "mandatoryOrOptionalParameter",
"mandatoryParameter", "optionalParameter", "optionalParameterName", "arrayParameter",
"hashParameter", "procParameter", "procParameterName", "classPath", "singletonObject",
"variableReference", "associationList", "association", "associationKey",
"associationHashArgument", "regexpLiteralContent", "singleQuotedString",
"singleOrDoubleQuotedString", "doubleQuotedString", "quotedExpandedExternalCommandString",
"doubleQuotedStringContent", "quotedNonExpandedLiteralString", "quotedExpandedLiteralString",
"quotedExpandedLiteralStringContent", "quotedNonExpandedArrayElementContent",
"quotedExpandedArrayElementContent", "quotedExpandedArrayElement", "quotedNonExpandedArrayElementList",
"quotedExpandedArrayElementList", "symbol", "hereDoc", "isDefinedKeyword",
"assignmentOperator", "statementModifier", "variable", "pseudoVariable",
"unsignedNumericLiteral", "unaryOperator", "multiplicativeOperator",
"additiveOperator", "bitwiseShiftOperator", "bitwiseOrOperator", "relationalOperator",
"equalityOperator", "rangeOperator", "keyword"
};
}
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 "RubyParser.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public ATN getATN() { return _ATN; }
public RubyParser(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(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterProgram(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitProgram(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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(210);
compoundStatement();
setState(211);
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(RubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(RubyParser.SEMI, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterCompoundStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCompoundStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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 {
enterOuterAlt(_localctx, 1);
{
setState(214);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
setState(213);
statements();
}
break;
}
setState(219);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(216);
_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(221);
_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(RubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(RubyParser.SEMI, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterStatements(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitStatements(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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(225);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(222);
_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(227);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(228);
statement(0);
setState(237);
_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(230);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(229);
_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(232);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==SEMI || _la==NL );
setState(234);
statement(0);
}
}
}
setState(239);
_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 SingleAssignmentStatementStatementContext extends StatementContext {
public SingleAssignmentStatementContext singleAssignmentStatement() {
return getRuleContext(SingleAssignmentStatementContext.class,0);
}
public SingleAssignmentStatementStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingleAssignmentStatementStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingleAssignmentStatementStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingleAssignmentStatementStatement(this);
else return visitor.visitChildren(this);
}
}
public static class ModifierStatementContext extends StatementContext {
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public StatementModifierContext statementModifier() {
return getRuleContext(StatementModifierContext.class,0);
}
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ModifierStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterModifierStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitModifierStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitModifierStatement(this);
else return visitor.visitChildren(this);
}
}
public static class AliasStatementContext extends StatementContext {
public DefinedMethodNameOrSymbolContext oldName;
public DefinedMethodNameOrSymbolContext newName;
public TerminalNode ALIAS() { return getToken(RubyParser.ALIAS, 0); }
public List definedMethodNameOrSymbol() {
return getRuleContexts(DefinedMethodNameOrSymbolContext.class);
}
public DefinedMethodNameOrSymbolContext definedMethodNameOrSymbol(int i) {
return getRuleContext(DefinedMethodNameOrSymbolContext.class,i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AliasStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAliasStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAliasStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAliasStatement(this);
else return visitor.visitChildren(this);
}
}
public static class UndefStatementContext extends StatementContext {
public TerminalNode UNDEF() { return getToken(RubyParser.UNDEF, 0); }
public List definedMethodNameOrSymbol() {
return getRuleContexts(DefinedMethodNameOrSymbolContext.class);
}
public DefinedMethodNameOrSymbolContext definedMethodNameOrSymbol(int i) {
return getRuleContext(DefinedMethodNameOrSymbolContext.class,i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public UndefStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterUndefStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitUndefStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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 RubyParserListener ) ((RubyParserListener)listener).enterExpressionOrCommandStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitExpressionOrCommandStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitExpressionOrCommandStatement(this);
else return visitor.visitChildren(this);
}
}
public static class MultipleAssignmentStatementStatementContext extends StatementContext {
public MultipleAssignmentStatementContext multipleAssignmentStatement() {
return getRuleContext(MultipleAssignmentStatementContext.class,0);
}
public MultipleAssignmentStatementStatementContext(StatementContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMultipleAssignmentStatementStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleAssignmentStatementStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleAssignmentStatementStatement(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,9,_ctx) ) {
case 1:
{
_localctx = new ExpressionOrCommandStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(241);
expressionOrCommand(0);
}
break;
case 2:
{
_localctx = new AliasStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(242);
match(ALIAS);
setState(246);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(243);
match(NL);
}
}
setState(248);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(249);
((AliasStatementContext)_localctx).oldName = definedMethodNameOrSymbol();
setState(250);
((AliasStatementContext)_localctx).newName = definedMethodNameOrSymbol();
}
break;
case 3:
{
_localctx = new UndefStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(252);
match(UNDEF);
setState(256);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(253);
match(NL);
}
}
setState(258);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(259);
definedMethodNameOrSymbol();
setState(270);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(260);
match(COMMA);
setState(264);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(261);
match(NL);
}
}
setState(266);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(267);
definedMethodNameOrSymbol();
}
}
}
setState(272);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
}
}
break;
case 4:
{
_localctx = new SingleAssignmentStatementStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(273);
singleAssignmentStatement();
}
break;
case 5:
{
_localctx = new MultipleAssignmentStatementStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(274);
multipleAssignmentStatement();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(289);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_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, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(278);
statementModifier();
setState(282);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(279);
match(NL);
}
}
setState(284);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(285);
expressionOrCommand(0);
}
}
}
setState(291);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,11,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class DefinedMethodNameOrSymbolContext extends ParserRuleContext {
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public DefinedMethodNameOrSymbolContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_definedMethodNameOrSymbol; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterDefinedMethodNameOrSymbol(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitDefinedMethodNameOrSymbol(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitDefinedMethodNameOrSymbol(this);
else return visitor.visitChildren(this);
}
}
public final DefinedMethodNameOrSymbolContext definedMethodNameOrSymbol() throws RecognitionException {
DefinedMethodNameOrSymbolContext _localctx = new DefinedMethodNameOrSymbolContext(_ctx, getState());
enterRule(_localctx, 8, RULE_definedMethodNameOrSymbol);
try {
setState(294);
_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 EQ2:
case EQ3:
case LTEQGT:
case LT2:
case LOCAL_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
case ASSIGNMENT_LIKE_METHOD_IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
setState(292);
definedMethodName();
}
break;
case COLON:
case SYMBOL_LITERAL:
enterOuterAlt(_localctx, 2);
{
setState(293);
symbol();
}
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 SingleAssignmentStatementContext extends ParserRuleContext {
public VariableContext variable() {
return getRuleContext(VariableContext.class,0);
}
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public MethodInvocationWithoutParenthesesContext methodInvocationWithoutParentheses() {
return getRuleContext(MethodInvocationWithoutParenthesesContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.CONSTANT_IDENTIFIER, 0); }
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode LBRACK() { return getToken(RubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(RubyParser.RBRACK, 0); }
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public SingleAssignmentStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_singleAssignmentStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingleAssignmentStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingleAssignmentStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingleAssignmentStatement(this);
else return visitor.visitChildren(this);
}
}
public final SingleAssignmentStatementContext singleAssignmentStatement() throws RecognitionException {
SingleAssignmentStatementContext _localctx = new SingleAssignmentStatementContext(_ctx, getState());
enterRule(_localctx, 10, RULE_singleAssignmentStatement);
int _la;
try {
setState(344);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(296);
variable();
setState(297);
assignmentOperator();
setState(301);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(298);
match(NL);
}
}
setState(303);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(304);
methodInvocationWithoutParentheses();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(306);
match(COLON2);
setState(307);
match(CONSTANT_IDENTIFIER);
setState(308);
assignmentOperator();
setState(312);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(309);
match(NL);
}
}
setState(314);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(315);
methodInvocationWithoutParentheses();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(317);
primary();
setState(318);
match(LBRACK);
setState(320);
_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(319);
indexingArgumentList();
}
}
setState(322);
match(RBRACK);
setState(323);
assignmentOperator();
setState(327);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(324);
match(NL);
}
}
setState(329);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(330);
methodInvocationWithoutParentheses();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(332);
primary();
setState(333);
_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(334);
methodName();
setState(335);
assignmentOperator();
setState(339);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(336);
match(NL);
}
}
setState(341);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(342);
methodInvocationWithoutParentheses();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultipleAssignmentStatementContext extends ParserRuleContext {
public LeftHandSideContext leftHandSide() {
return getRuleContext(LeftHandSideContext.class,0);
}
public TerminalNode EQ() { return getToken(RubyParser.EQ, 0); }
public MultipleRightHandSideContext multipleRightHandSide() {
return getRuleContext(MultipleRightHandSideContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public PackingLeftHandSideContext packingLeftHandSide() {
return getRuleContext(PackingLeftHandSideContext.class,0);
}
public MethodInvocationWithoutParenthesesContext methodInvocationWithoutParentheses() {
return getRuleContext(MethodInvocationWithoutParenthesesContext.class,0);
}
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public MultipleLeftHandSideExceptPackingContext multipleLeftHandSideExceptPacking() {
return getRuleContext(MultipleLeftHandSideExceptPackingContext.class,0);
}
public MultipleAssignmentStatementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleAssignmentStatement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMultipleAssignmentStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleAssignmentStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleAssignmentStatement(this);
else return visitor.visitChildren(this);
}
}
public final MultipleAssignmentStatementContext multipleAssignmentStatement() throws RecognitionException {
MultipleAssignmentStatementContext _localctx = new MultipleAssignmentStatementContext(_ctx, getState());
enterRule(_localctx, 12, RULE_multipleAssignmentStatement);
int _la;
try {
setState(390);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(346);
leftHandSide();
setState(347);
match(EQ);
setState(351);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(348);
match(NL);
}
}
setState(353);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(354);
multipleRightHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(356);
packingLeftHandSide();
setState(357);
match(EQ);
setState(361);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(358);
match(NL);
}
}
setState(363);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(366);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) {
case 1:
{
setState(364);
methodInvocationWithoutParentheses();
}
break;
case 2:
{
setState(365);
operatorExpression(0);
}
break;
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(368);
multipleLeftHandSide();
setState(369);
match(EQ);
setState(373);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(370);
match(NL);
}
}
setState(375);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(376);
multipleRightHandSide();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(378);
multipleLeftHandSideExceptPacking();
setState(379);
match(EQ);
setState(383);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(380);
match(NL);
}
}
setState(385);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(388);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
{
setState(386);
methodInvocationWithoutParentheses();
}
break;
case 2:
{
setState(387);
operatorExpression(0);
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class LeftHandSideContext extends ParserRuleContext {
public LeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_leftHandSide; }
public LeftHandSideContext() { }
public void copyFrom(LeftHandSideContext ctx) {
super.copyFrom(ctx);
}
}
public static class QualifiedLeftHandSideContext extends LeftHandSideContext {
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.CONSTANT_IDENTIFIER, 0); }
public QualifiedLeftHandSideContext(LeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQualifiedLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQualifiedLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQualifiedLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class VariableLeftHandSideContext extends LeftHandSideContext {
public VariableContext variable() {
return getRuleContext(VariableContext.class,0);
}
public TerminalNode EQ() { return getToken(RubyParser.EQ, 0); }
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public VariableLeftHandSideContext(LeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterVariableLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitVariableLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitVariableLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class IndexingLeftHandSideContext extends LeftHandSideContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode LBRACK() { return getToken(RubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(RubyParser.RBRACK, 0); }
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public IndexingLeftHandSideContext(LeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIndexingLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIndexingLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIndexingLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public static class MemberAccessLeftHandSideContext extends LeftHandSideContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(RubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.CONSTANT_IDENTIFIER, 0); }
public MemberAccessLeftHandSideContext(LeftHandSideContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMemberAccessLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMemberAccessLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMemberAccessLeftHandSide(this);
else return visitor.visitChildren(this);
}
}
public final LeftHandSideContext leftHandSide() throws RecognitionException {
LeftHandSideContext _localctx = new LeftHandSideContext(_ctx, getState());
enterRule(_localctx, 14, RULE_leftHandSide);
int _la;
try {
setState(410);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
case 1:
_localctx = new VariableLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(392);
variable();
setState(395);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
{
setState(393);
match(EQ);
setState(394);
primary();
}
break;
}
}
break;
case 2:
_localctx = new IndexingLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(397);
primary();
setState(398);
match(LBRACK);
setState(400);
_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(399);
indexingArgumentList();
}
}
setState(402);
match(RBRACK);
}
break;
case 3:
_localctx = new MemberAccessLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(404);
primary();
setState(405);
_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(406);
_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 QualifiedLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(408);
match(COLON2);
setState(409);
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 List multipleLeftHandSideItem() {
return getRuleContexts(MultipleLeftHandSideItemContext.class);
}
public MultipleLeftHandSideItemContext multipleLeftHandSideItem(int i) {
return getRuleContext(MultipleLeftHandSideItemContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public PackingLeftHandSideContext packingLeftHandSide() {
return getRuleContext(PackingLeftHandSideContext.class,0);
}
public ProcParameterContext procParameter() {
return getRuleContext(ProcParameterContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public GroupedLeftHandSideContext groupedLeftHandSide() {
return getRuleContext(GroupedLeftHandSideContext.class,0);
}
public MultipleLeftHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleLeftHandSide; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMultipleLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleLeftHandSide(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(449);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(415);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(412);
multipleLeftHandSideItem();
setState(413);
match(COMMA);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(417);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(420);
_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 << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (REDO - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (TRUE - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 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 << (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(419);
multipleLeftHandSideItem();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(425);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(422);
multipleLeftHandSideItem();
setState(423);
match(COMMA);
}
}
setState(427);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_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 << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (REDO - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (TRUE - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 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 << (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(430);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==STAR) {
{
setState(429);
packingLeftHandSide();
}
}
setState(442);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
setState(433);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(432);
match(COMMA);
}
}
setState(438);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(435);
match(NL);
}
}
setState(440);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(441);
procParameter();
}
break;
}
setState(445);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(444);
match(COMMA);
}
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(447);
packingLeftHandSide();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(448);
groupedLeftHandSide();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MultipleLeftHandSideExceptPackingContext extends ParserRuleContext {
public List multipleLeftHandSideItem() {
return getRuleContexts(MultipleLeftHandSideItemContext.class);
}
public MultipleLeftHandSideItemContext multipleLeftHandSideItem(int i) {
return getRuleContext(MultipleLeftHandSideItemContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public PackingLeftHandSideContext packingLeftHandSide() {
return getRuleContext(PackingLeftHandSideContext.class,0);
}
public GroupedLeftHandSideContext groupedLeftHandSide() {
return getRuleContext(GroupedLeftHandSideContext.class,0);
}
public MultipleLeftHandSideExceptPackingContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_multipleLeftHandSideExceptPacking; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMultipleLeftHandSideExceptPacking(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleLeftHandSideExceptPacking(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleLeftHandSideExceptPacking(this);
else return visitor.visitChildren(this);
}
}
public final MultipleLeftHandSideExceptPackingContext multipleLeftHandSideExceptPacking() throws RecognitionException {
MultipleLeftHandSideExceptPackingContext _localctx = new MultipleLeftHandSideExceptPackingContext(_ctx, getState());
enterRule(_localctx, 18, RULE_multipleLeftHandSideExceptPacking);
int _la;
try {
int _alt;
setState(472);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(454);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(451);
multipleLeftHandSideItem();
setState(452);
match(COMMA);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(456);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,38,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(459);
_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 << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (REDO - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (TRUE - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 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 << (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(458);
multipleLeftHandSideItem();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(464);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(461);
multipleLeftHandSideItem();
setState(462);
match(COMMA);
}
}
setState(466);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_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 << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (REDO - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (TRUE - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 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 << (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(469);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==STAR) {
{
setState(468);
packingLeftHandSide();
}
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(471);
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(RubyParser.STAR, 0); }
public LeftHandSideContext leftHandSide() {
return getRuleContext(LeftHandSideContext.class,0);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public List multipleLeftHandSideItem() {
return getRuleContexts(MultipleLeftHandSideItemContext.class);
}
public MultipleLeftHandSideItemContext multipleLeftHandSideItem(int i) {
return getRuleContext(MultipleLeftHandSideItemContext.class,i);
}
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 RubyParserListener ) ((RubyParserListener)listener).enterPackingLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPackingLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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);
int _la;
try {
int _alt;
setState(487);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(474);
match(STAR);
setState(476);
_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 << (BREAK - 3)) | (1L << (CASE - 3)) | (1L << (CLASS - 3)) | (1L << (DEF - 3)) | (1L << (IS_DEFINED - 3)) | (1L << (FOR - 3)) | (1L << (FALSE - 3)) | (1L << (IF - 3)) | (1L << (MODULE - 3)) | (1L << (NEXT - 3)) | (1L << (NIL - 3)) | (1L << (REDO - 3)) | (1L << (RETRY - 3)) | (1L << (RETURN - 3)) | (1L << (SELF - 3)) | (1L << (SUPER - 3)) | (1L << (TRUE - 3)) | (1L << (UNLESS - 3)) | (1L << (UNTIL - 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 << (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(475);
leftHandSide();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(478);
match(STAR);
setState(479);
leftHandSide();
setState(484);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,44,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(480);
match(COMMA);
setState(481);
multipleLeftHandSideItem();
}
}
}
setState(486);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,44,_ctx);
}
}
break;
}
}
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(RubyParser.LPAREN, 0); }
public MultipleLeftHandSideContext multipleLeftHandSide() {
return getRuleContext(MultipleLeftHandSideContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterGroupedLeftHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitGroupedLeftHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor 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(489);
match(LPAREN);
setState(490);
multipleLeftHandSide();
setState(491);
match(RPAREN);
}
}
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 LeftHandSideContext leftHandSide() {
return getRuleContext(LeftHandSideContext.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 RubyParserListener ) ((RubyParserListener)listener).enterMultipleLeftHandSideItem(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleLeftHandSideItem(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleLeftHandSideItem(this);
else return visitor.visitChildren(this);
}
}
public final MultipleLeftHandSideItemContext multipleLeftHandSideItem() throws RecognitionException {
MultipleLeftHandSideItemContext _localctx = new MultipleLeftHandSideItemContext(_ctx, getState());
enterRule(_localctx, 24, RULE_multipleLeftHandSideItem);
try {
setState(495);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,46,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(493);
leftHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(494);
groupedLeftHandSide();
}
break;
}
}
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 OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public SplattingRightHandSideContext splattingRightHandSide() {
return getRuleContext(SplattingRightHandSideContext.class,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 RubyParserListener ) ((RubyParserListener)listener).enterMultipleRightHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultipleRightHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultipleRightHandSide(this);
else return visitor.visitChildren(this);
}
}
public final MultipleRightHandSideContext multipleRightHandSide() throws RecognitionException {
MultipleRightHandSideContext _localctx = new MultipleRightHandSideContext(_ctx, getState());
enterRule(_localctx, 26, RULE_multipleRightHandSide);
try {
setState(503);
_errHandler.sync(this);
switch (_input.LA(1)) {
case REGULAR_EXPRESSION_START:
case LINE__:
case ENCODING__:
case FILE__:
case BEGIN:
case BREAK:
case CASE:
case CLASS:
case DEF:
case IS_DEFINED:
case FOR:
case FALSE:
case IF:
case MODULE:
case NEXT:
case NIL:
case REDO:
case RETRY:
case RETURN:
case SELF:
case SUPER:
case TRUE:
case UNLESS:
case UNTIL:
case WHILE:
case YIELD:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case MINUSGT:
case EMARK:
case PLUS:
case MINUS:
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(497);
operatorExpressionList();
setState(500);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) {
case 1:
{
setState(498);
match(COMMA);
setState(499);
splattingRightHandSide();
}
break;
}
}
break;
case STAR:
case STAR2:
enterOuterAlt(_localctx, 2);
{
setState(502);
splattingRightHandSide();
}
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 SplattingRightHandSideContext extends ParserRuleContext {
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public SplattingRightHandSideContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_splattingRightHandSide; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSplattingRightHandSide(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSplattingRightHandSide(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSplattingRightHandSide(this);
else return visitor.visitChildren(this);
}
}
public final SplattingRightHandSideContext splattingRightHandSide() throws RecognitionException {
SplattingRightHandSideContext _localctx = new SplattingRightHandSideContext(_ctx, getState());
enterRule(_localctx, 28, RULE_splattingRightHandSide);
try {
enterOuterAlt(_localctx, 1);
{
setState(505);
splattingArgument();
}
}
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(RubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterMethodIdentifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodIdentifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final MethodIdentifierContext methodIdentifier() throws RecognitionException {
MethodIdentifierContext _localctx = new MethodIdentifierContext(_ctx, getState());
enterRule(_localctx, 30, RULE_methodIdentifier);
try {
setState(510);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(507);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(508);
match(CONSTANT_IDENTIFIER);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(509);
methodOnlyIdentifier();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodNameContext extends ParserRuleContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public KeywordContext keyword() {
return getRuleContext(KeywordContext.class,0);
}
public PseudoVariableContext pseudoVariable() {
return getRuleContext(PseudoVariableContext.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 RubyParserListener ) ((RubyParserListener)listener).enterMethodName(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodName(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodName(this);
else return visitor.visitChildren(this);
}
}
public final MethodNameContext methodName() throws RecognitionException {
MethodNameContext _localctx = new MethodNameContext(_ctx, getState());
enterRule(_localctx, 32, RULE_methodName);
try {
setState(515);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(512);
methodIdentifier();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(513);
keyword();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(514);
pseudoVariable();
}
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(RubyParser.EMARK, 0); }
public TerminalNode QMARK() { return getToken(RubyParser.QMARK, 0); }
public TerminalNode EQ() { return getToken(RubyParser.EQ, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.CONSTANT_IDENTIFIER, 0); }
public TerminalNode LOCAL_VARIABLE_IDENTIFIER() { return getToken(RubyParser.LOCAL_VARIABLE_IDENTIFIER, 0); }
public PseudoVariableContext pseudoVariable() {
return getRuleContext(PseudoVariableContext.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 RubyParserListener ) ((RubyParserListener)listener).enterMethodOnlyIdentifier(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodOnlyIdentifier(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodOnlyIdentifier(this);
else return visitor.visitChildren(this);
}
}
public final MethodOnlyIdentifierContext methodOnlyIdentifier() throws RecognitionException {
MethodOnlyIdentifierContext _localctx = new MethodOnlyIdentifierContext(_ctx, getState());
enterRule(_localctx, 34, RULE_methodOnlyIdentifier);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(520);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CONSTANT_IDENTIFIER:
{
setState(517);
match(CONSTANT_IDENTIFIER);
}
break;
case LOCAL_VARIABLE_IDENTIFIER:
{
setState(518);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case LINE__:
case ENCODING__:
case FILE__:
case FALSE:
case NIL:
case SELF:
case TRUE:
{
setState(519);
pseudoVariable();
}
break;
default:
throw new NoViableAltException(this);
}
setState(522);
_la = _input.LA(1);
if ( !(((((_la - 70)) & ~0x3f) == 0 && ((1L << (_la - 70)) & ((1L << (QMARK - 70)) | (1L << (EMARK - 70)) | (1L << (EQ - 70)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class MethodInvocationWithoutParenthesesContext extends ParserRuleContext {
public MethodInvocationWithoutParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodInvocationWithoutParentheses; }
public MethodInvocationWithoutParenthesesContext() { }
public void copyFrom(MethodInvocationWithoutParenthesesContext ctx) {
super.copyFrom(ctx);
}
}
public static class NextMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public TerminalNode NEXT() { return getToken(RubyParser.NEXT, 0); }
public PrimaryValueListContext primaryValueList() {
return getRuleContext(PrimaryValueListContext.class,0);
}
public NextMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNextMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNextMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNextMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public CommandArgumentListContext commandArgumentList() {
return getRuleContext(CommandArgumentListContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public ChainedMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterChainedMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitChainedMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitChainedMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ReturnMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public TerminalNode RETURN() { return getToken(RubyParser.RETURN, 0); }
public PrimaryValueListContext primaryValueList() {
return getRuleContext(PrimaryValueListContext.class,0);
}
public ReturnMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterReturnMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitReturnMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitReturnMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class YieldMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public TerminalNode YIELD() { return getToken(RubyParser.YIELD, 0); }
public PrimaryValueListContext primaryValueList() {
return getRuleContext(PrimaryValueListContext.class,0);
}
public YieldMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterYieldMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitYieldMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitYieldMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class BreakMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public TerminalNode BREAK() { return getToken(RubyParser.BREAK, 0); }
public PrimaryValueListContext primaryValueList() {
return getRuleContext(PrimaryValueListContext.class,0);
}
public BreakMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBreakMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBreakMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBreakMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class CommandMethodInvocationWithoutParenthesesContext extends MethodInvocationWithoutParenthesesContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandMethodInvocationWithoutParenthesesContext(MethodInvocationWithoutParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandMethodInvocationWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandMethodInvocationWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandMethodInvocationWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public final MethodInvocationWithoutParenthesesContext methodInvocationWithoutParentheses() throws RecognitionException {
MethodInvocationWithoutParenthesesContext _localctx = new MethodInvocationWithoutParenthesesContext(_ctx, getState());
enterRule(_localctx, 36, RULE_methodInvocationWithoutParentheses);
int _la;
try {
setState(540);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) {
case 1:
_localctx = new CommandMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(524);
command();
}
break;
case 2:
_localctx = new ChainedMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(525);
chainedCommandWithDoBlock();
setState(530);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) {
case 1:
{
setState(526);
_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(527);
methodName();
setState(528);
commandArgumentList();
}
break;
}
}
break;
case 3:
_localctx = new ReturnMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(532);
match(RETURN);
setState(533);
primaryValueList();
}
break;
case 4:
_localctx = new BreakMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(534);
match(BREAK);
setState(535);
primaryValueList();
}
break;
case 5:
_localctx = new NextMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(536);
match(NEXT);
setState(537);
primaryValueList();
}
break;
case 6:
_localctx = new YieldMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(538);
match(YIELD);
setState(539);
primaryValueList();
}
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 MemberAccessCommandContext extends CommandContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public CommandArgumentContext commandArgument() {
return getRuleContext(CommandArgumentContext.class,0);
}
public TerminalNode AMPDOT() { return getToken(RubyParser.AMPDOT, 0); }
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public TerminalNode NL() { return getToken(RubyParser.NL, 0); }
public MemberAccessCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMemberAccessCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMemberAccessCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMemberAccessCommand(this);
else return visitor.visitChildren(this);
}
}
public static class SimpleCommandContext extends CommandContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public CommandArgumentContext commandArgument() {
return getRuleContext(CommandArgumentContext.class,0);
}
public SimpleCommandContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSimpleCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSimpleCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSimpleCommand(this);
else return visitor.visitChildren(this);
}
}
public final CommandContext command() throws RecognitionException {
CommandContext _localctx = new CommandContext(_ctx, getState());
enterRule(_localctx, 38, RULE_command);
int _la;
try {
setState(553);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) {
case 1:
_localctx = new MemberAccessCommandContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(542);
primary();
setState(544);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(543);
match(NL);
}
}
setState(546);
_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(547);
methodName();
setState(548);
commandArgument();
}
break;
case 2:
_localctx = new SimpleCommandContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(550);
methodIdentifier();
setState(551);
commandArgument();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandArgumentContext extends ParserRuleContext {
public CommandArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandArgument; }
public CommandArgumentContext() { }
public void copyFrom(CommandArgumentContext ctx) {
super.copyFrom(ctx);
}
}
public static class CommandCommandArgumentListContext extends CommandArgumentContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandCommandArgumentListContext(CommandArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandCommandArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandCommandArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandCommandArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class CommandArgumentCommandArgumentListContext extends CommandArgumentContext {
public CommandArgumentListContext commandArgumentList() {
return getRuleContext(CommandArgumentListContext.class,0);
}
public CommandArgumentCommandArgumentListContext(CommandArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandArgumentCommandArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandArgumentCommandArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandArgumentCommandArgumentList(this);
else return visitor.visitChildren(this);
}
}
public final CommandArgumentContext commandArgument() throws RecognitionException {
CommandArgumentContext _localctx = new CommandArgumentContext(_ctx, getState());
enterRule(_localctx, 40, RULE_commandArgument);
try {
setState(557);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) {
case 1:
_localctx = new CommandArgumentCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(555);
commandArgumentList();
}
break;
case 2:
_localctx = new CommandCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(556);
command();
}
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 chainedMethodInvocation() {
return getRuleContexts(ChainedMethodInvocationContext.class);
}
public ChainedMethodInvocationContext chainedMethodInvocation(int i) {
return getRuleContext(ChainedMethodInvocationContext.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 RubyParserListener ) ((RubyParserListener)listener).enterChainedCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitChainedCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitChainedCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() throws RecognitionException {
ChainedCommandWithDoBlockContext _localctx = new ChainedCommandWithDoBlockContext(_ctx, getState());
enterRule(_localctx, 42, RULE_chainedCommandWithDoBlock);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(559);
commandWithDoBlock();
setState(563);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,57,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(560);
chainedMethodInvocation();
}
}
}
setState(565);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,57,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ChainedMethodInvocationContext extends ParserRuleContext {
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public ArgumentWithParenthesesContext argumentWithParentheses() {
return getRuleContext(ArgumentWithParenthesesContext.class,0);
}
public ChainedMethodInvocationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_chainedMethodInvocation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterChainedMethodInvocation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitChainedMethodInvocation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitChainedMethodInvocation(this);
else return visitor.visitChildren(this);
}
}
public final ChainedMethodInvocationContext chainedMethodInvocation() throws RecognitionException {
ChainedMethodInvocationContext _localctx = new ChainedMethodInvocationContext(_ctx, getState());
enterRule(_localctx, 44, RULE_chainedMethodInvocation);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(566);
_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(567);
methodName();
setState(569);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) {
case 1:
{
setState(568);
argumentWithParentheses();
}
break;
}
}
}
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 TerminalNode SUPER() { return getToken(RubyParser.SUPER, 0); }
public ArgumentListContext argumentList() {
return getRuleContext(ArgumentListContext.class,0);
}
public DoBlockContext doBlock() {
return getRuleContext(DoBlockContext.class,0);
}
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public CommandWithDoBlockContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandWithDoBlock; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandWithDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandWithDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandWithDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final CommandWithDoBlockContext commandWithDoBlock() throws RecognitionException {
CommandWithDoBlockContext _localctx = new CommandWithDoBlockContext(_ctx, getState());
enterRule(_localctx, 46, RULE_commandWithDoBlock);
int _la;
try {
setState(585);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(571);
match(SUPER);
setState(572);
argumentList();
setState(573);
doBlock();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(575);
methodIdentifier();
setState(576);
argumentList();
setState(577);
doBlock();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(579);
primary();
setState(580);
_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(581);
methodName();
setState(582);
argumentList();
setState(583);
doBlock();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IndexingArgumentListContext extends ParserRuleContext {
public IndexingArgumentListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_indexingArgumentList; }
public IndexingArgumentListContext() { }
public void copyFrom(IndexingArgumentListContext ctx) {
super.copyFrom(ctx);
}
}
public static class CommandIndexingArgumentListContext extends IndexingArgumentListContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorExpressionListWithSplattingArgumentIndexingArgumentListContext extends IndexingArgumentListContext {
public OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public OperatorExpressionListWithSplattingArgumentIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionListWithSplattingArgumentIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionListWithSplattingArgumentIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionListWithSplattingArgumentIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class SplattingArgumentIndexingArgumentListContext extends IndexingArgumentListContext {
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public SplattingArgumentIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSplattingArgumentIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSplattingArgumentIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSplattingArgumentIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorExpressionListIndexingArgumentListContext extends IndexingArgumentListContext {
public OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public OperatorExpressionListIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionListIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionListIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionListIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class AssociationListIndexingArgumentListContext extends IndexingArgumentListContext {
public AssociationListContext associationList() {
return getRuleContext(AssociationListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public AssociationListIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAssociationListIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAssociationListIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAssociationListIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public final IndexingArgumentListContext indexingArgumentList() throws RecognitionException {
IndexingArgumentListContext _localctx = new IndexingArgumentListContext(_ctx, getState());
enterRule(_localctx, 48, RULE_indexingArgumentList);
int _la;
try {
setState(601);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) {
case 1:
_localctx = new CommandIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(587);
command();
}
break;
case 2:
_localctx = new OperatorExpressionListIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(588);
operatorExpressionList();
setState(590);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(589);
match(COMMA);
}
}
}
break;
case 3:
_localctx = new OperatorExpressionListWithSplattingArgumentIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(592);
operatorExpressionList();
setState(593);
match(COMMA);
setState(594);
splattingArgument();
}
break;
case 4:
_localctx = new AssociationListIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(596);
associationList();
setState(598);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(597);
match(COMMA);
}
}
}
break;
case 5:
_localctx = new SplattingArgumentIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(600);
splattingArgument();
}
break;
}
}
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(RubyParser.STAR, 0); }
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public TerminalNode STAR2() { return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterSplattingArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSplattingArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSplattingArgument(this);
else return visitor.visitChildren(this);
}
}
public final SplattingArgumentContext splattingArgument() throws RecognitionException {
SplattingArgumentContext _localctx = new SplattingArgumentContext(_ctx, getState());
enterRule(_localctx, 50, RULE_splattingArgument);
try {
setState(607);
_errHandler.sync(this);
switch (_input.LA(1)) {
case STAR:
enterOuterAlt(_localctx, 1);
{
setState(603);
match(STAR);
setState(604);
operatorExpression(0);
}
break;
case STAR2:
enterOuterAlt(_localctx, 2);
{
setState(605);
match(STAR2);
setState(606);
operatorExpression(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 OperatorExpressionListContext extends ParserRuleContext {
public List operatorExpression() {
return getRuleContexts(OperatorExpressionContext.class);
}
public OperatorExpressionContext operatorExpression(int i) {
return getRuleContext(OperatorExpressionContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public OperatorExpressionListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_operatorExpressionList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionList(this);
else return visitor.visitChildren(this);
}
}
public final OperatorExpressionListContext operatorExpressionList() throws RecognitionException {
OperatorExpressionListContext _localctx = new OperatorExpressionListContext(_ctx, getState());
enterRule(_localctx, 52, RULE_operatorExpressionList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(609);
operatorExpression(0);
setState(620);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,65,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(610);
match(COMMA);
setState(614);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(611);
match(NL);
}
}
setState(616);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(617);
operatorExpression(0);
}
}
}
setState(622);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,65,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class OperatorExpressionList2Context extends ParserRuleContext {
public List operatorExpression() {
return getRuleContexts(OperatorExpressionContext.class);
}
public OperatorExpressionContext operatorExpression(int i) {
return getRuleContext(OperatorExpressionContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public OperatorExpressionList2Context(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_operatorExpressionList2; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionList2(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionList2(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionList2(this);
else return visitor.visitChildren(this);
}
}
public final OperatorExpressionList2Context operatorExpressionList2() throws RecognitionException {
OperatorExpressionList2Context _localctx = new OperatorExpressionList2Context(_ctx, getState());
enterRule(_localctx, 54, RULE_operatorExpressionList2);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(623);
operatorExpression(0);
setState(632);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(624);
match(COMMA);
setState(628);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(625);
match(NL);
}
}
setState(630);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(631);
operatorExpression(0);
}
}
setState(634);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==COMMA );
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentWithParenthesesContext extends ParserRuleContext {
public ArgumentWithParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_argumentWithParentheses; }
public ArgumentWithParenthesesContext() { }
public void copyFrom(ArgumentWithParenthesesContext ctx) {
super.copyFrom(ctx);
}
}
public static class EmptyArgumentWithParenthesesContext extends ArgumentWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public EmptyArgumentWithParenthesesContext(ArgumentWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterEmptyArgumentWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitEmptyArgumentWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitEmptyArgumentWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorExpressionsAndChainedCommandWithBlockArgumentWithParenthesesContext extends ArgumentWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public OperatorExpressionsAndChainedCommandWithBlockArgumentWithParenthesesContext(ArgumentWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionsAndChainedCommandWithBlockArgumentWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionsAndChainedCommandWithBlockArgumentWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionsAndChainedCommandWithBlockArgumentWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ChainedCommandWithDoBlockArgumentWithParenthesesContext extends ArgumentWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public ChainedCommandWithDoBlockContext chainedCommandWithDoBlock() {
return getRuleContext(ChainedCommandWithDoBlockContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public ChainedCommandWithDoBlockArgumentWithParenthesesContext(ArgumentWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterChainedCommandWithDoBlockArgumentWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitChainedCommandWithDoBlockArgumentWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitChainedCommandWithDoBlockArgumentWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class ArgumentListArgumentWithParenthesesContext extends ArgumentWithParenthesesContext {
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public ArgumentListContext argumentList() {
return getRuleContext(ArgumentListContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public ArgumentListArgumentWithParenthesesContext(ArgumentWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterArgumentListArgumentWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitArgumentListArgumentWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitArgumentListArgumentWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentWithParenthesesContext argumentWithParentheses() throws RecognitionException {
ArgumentWithParenthesesContext _localctx = new ArgumentWithParenthesesContext(_ctx, getState());
enterRule(_localctx, 56, RULE_argumentWithParentheses);
int _la;
try {
int _alt;
setState(718);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
_localctx = new EmptyArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(636);
match(LPAREN);
setState(640);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,68,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(637);
match(NL);
}
}
}
setState(642);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,68,_ctx);
}
setState(644);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(643);
match(COMMA);
}
}
setState(649);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(646);
match(NL);
}
}
setState(651);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(652);
match(RPAREN);
}
break;
case 2:
_localctx = new ArgumentListArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(653);
match(LPAREN);
setState(657);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(654);
match(NL);
}
}
setState(659);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(660);
argumentList();
setState(662);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(661);
match(COMMA);
}
}
setState(667);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(664);
match(NL);
}
}
setState(669);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(670);
match(RPAREN);
}
break;
case 3:
_localctx = new OperatorExpressionsAndChainedCommandWithBlockArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(672);
match(LPAREN);
setState(676);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(673);
match(NL);
}
}
setState(678);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(679);
operatorExpressionList();
setState(680);
match(COMMA);
setState(684);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(681);
match(NL);
}
}
setState(686);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(687);
chainedCommandWithDoBlock();
setState(689);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(688);
match(COMMA);
}
}
setState(694);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(691);
match(NL);
}
}
setState(696);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(697);
match(RPAREN);
}
break;
case 4:
_localctx = new ChainedCommandWithDoBlockArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(699);
match(LPAREN);
setState(703);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(700);
match(NL);
}
}
setState(705);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(706);
chainedCommandWithDoBlock();
setState(708);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(707);
match(COMMA);
}
}
setState(713);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(710);
match(NL);
}
}
setState(715);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(716);
match(RPAREN);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class ArgumentListContext extends ParserRuleContext {
public ArgumentListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_argumentList; }
public ArgumentListContext() { }
public void copyFrom(ArgumentListContext ctx) {
super.copyFrom(ctx);
}
}
public static class BlockArgumentArgumentListContext extends ArgumentListContext {
public BlockArgumentContext blockArgument() {
return getRuleContext(BlockArgumentContext.class,0);
}
public BlockArgumentArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBlockArgumentArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBlockArgumentArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBlockArgumentArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class SplattingArgumentArgumentListContext extends ArgumentListContext {
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public BlockArgumentContext blockArgument() {
return getRuleContext(BlockArgumentContext.class,0);
}
public OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public SplattingArgumentArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSplattingArgumentArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSplattingArgumentArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSplattingArgumentArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class OperatorsArgumentListContext extends ArgumentListContext {
public OperatorExpressionListContext operatorExpressionList() {
return getRuleContext(OperatorExpressionListContext.class,0);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public AssociationListContext associationList() {
return getRuleContext(AssociationListContext.class,0);
}
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public BlockArgumentContext blockArgument() {
return getRuleContext(BlockArgumentContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public OperatorsArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorsArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorsArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorsArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class SingleCommandArgumentListContext extends ArgumentListContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public SingleCommandArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingleCommandArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingleCommandArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingleCommandArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class AssociationsArgumentListContext extends ArgumentListContext {
public AssociationListContext associationList() {
return getRuleContext(AssociationListContext.class,0);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public BlockArgumentContext blockArgument() {
return getRuleContext(BlockArgumentContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AssociationsArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAssociationsArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAssociationsArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAssociationsArgumentList(this);
else return visitor.visitChildren(this);
}
}
public final ArgumentListContext argumentList() throws RecognitionException {
ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState());
enterRule(_localctx, 58, RULE_argumentList);
int _la;
try {
setState(795);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) {
case 1:
_localctx = new BlockArgumentArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(720);
blockArgument();
}
break;
case 2:
_localctx = new SplattingArgumentArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(721);
splattingArgument();
setState(730);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) {
case 1:
{
setState(722);
match(COMMA);
setState(726);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(723);
match(NL);
}
}
setState(728);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(729);
blockArgument();
}
break;
}
setState(740);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) {
case 1:
{
setState(732);
match(COMMA);
setState(736);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(733);
match(NL);
}
}
setState(738);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(739);
operatorExpressionList();
}
break;
}
}
break;
case 3:
_localctx = new OperatorsArgumentListContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(742);
operatorExpressionList();
setState(751);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) {
case 1:
{
setState(743);
match(COMMA);
setState(747);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(744);
match(NL);
}
}
setState(749);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(750);
associationList();
}
break;
}
setState(761);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,89,_ctx) ) {
case 1:
{
setState(753);
match(COMMA);
setState(757);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(754);
match(NL);
}
}
setState(759);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(760);
splattingArgument();
}
break;
}
setState(771);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,91,_ctx) ) {
case 1:
{
setState(763);
match(COMMA);
setState(767);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(764);
match(NL);
}
}
setState(769);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(770);
blockArgument();
}
break;
}
}
break;
case 4:
_localctx = new AssociationsArgumentListContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(773);
associationList();
setState(782);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
case 1:
{
setState(774);
match(COMMA);
setState(778);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(775);
match(NL);
}
}
setState(780);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(781);
splattingArgument();
}
break;
}
setState(792);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) {
case 1:
{
setState(784);
match(COMMA);
setState(788);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(785);
match(NL);
}
}
setState(790);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(791);
blockArgument();
}
break;
}
}
break;
case 5:
_localctx = new SingleCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(794);
command();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandArgumentListContext extends ParserRuleContext {
public AssociationListContext associationList() {
return getRuleContext(AssociationListContext.class,0);
}
public PrimaryValueListContext primaryValueList() {
return getRuleContext(PrimaryValueListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public CommandArgumentListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandArgumentList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandArgumentList(this);
else return visitor.visitChildren(this);
}
}
public final CommandArgumentListContext commandArgumentList() throws RecognitionException {
CommandArgumentListContext _localctx = new CommandArgumentListContext(_ctx, getState());
enterRule(_localctx, 60, RULE_commandArgumentList);
int _la;
try {
setState(809);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(797);
associationList();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(798);
primaryValueList();
setState(807);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,98,_ctx) ) {
case 1:
{
setState(799);
match(COMMA);
setState(803);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(800);
match(NL);
}
}
setState(805);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(806);
associationList();
}
break;
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimaryValueListContext extends ParserRuleContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public PrimaryValueListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryValueList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValueList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValueList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValueList(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryValueListContext primaryValueList() throws RecognitionException {
PrimaryValueListContext _localctx = new PrimaryValueListContext(_ctx, getState());
enterRule(_localctx, 62, RULE_primaryValueList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(811);
primaryValue(0);
setState(822);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,101,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(812);
match(COMMA);
setState(816);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(813);
match(NL);
}
}
setState(818);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(819);
primaryValue(0);
}
}
}
setState(824);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,101,_ctx);
}
}
}
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(RubyParser.AMP, 0); }
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.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 RubyParserListener ) ((RubyParserListener)listener).enterBlockArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBlockArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBlockArgument(this);
else return visitor.visitChildren(this);
}
}
public final BlockArgumentContext blockArgument() throws RecognitionException {
BlockArgumentContext _localctx = new BlockArgumentContext(_ctx, getState());
enterRule(_localctx, 64, RULE_blockArgument);
try {
enterOuterAlt(_localctx, 1);
{
setState(825);
match(AMP);
setState(826);
operatorExpression(0);
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
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 OperatorExpressionOrCommandContext extends ExpressionOrCommandContext {
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public OperatorExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterOperatorExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitOperatorExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitOperatorExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class NotExpressionOrCommandContext extends ExpressionOrCommandContext {
public TerminalNode NOT() { return getToken(RubyParser.NOT, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public NotExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNotExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNotExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNotExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class KeywordAndOrExpressionOrCommandContext extends ExpressionOrCommandContext {
public ExpressionOrCommandContext lhs;
public Token binOp;
public ExpressionOrCommandContext rhs;
public List expressionOrCommand() {
return getRuleContexts(ExpressionOrCommandContext.class);
}
public ExpressionOrCommandContext expressionOrCommand(int i) {
return getRuleContext(ExpressionOrCommandContext.class,i);
}
public TerminalNode AND() { return getToken(RubyParser.AND, 0); }
public TerminalNode OR() { return getToken(RubyParser.OR, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public KeywordAndOrExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterKeywordAndOrExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitKeywordAndOrExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitKeywordAndOrExpressionOrCommand(this);
else return visitor.visitChildren(this);
}
}
public static class CommandExpressionOrCommandContext extends ExpressionOrCommandContext {
public MethodInvocationWithoutParenthesesContext methodInvocationWithoutParentheses() {
return getRuleContext(MethodInvocationWithoutParenthesesContext.class,0);
}
public TerminalNode EMARK() { return getToken(RubyParser.EMARK, 0); }
public CommandExpressionOrCommandContext(ExpressionOrCommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandExpressionOrCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandExpressionOrCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandExpressionOrCommand(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 = 66;
enterRecursionRule(_localctx, 66, RULE_expressionOrCommand, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(842);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) {
case 1:
{
_localctx = new OperatorExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(829);
operatorExpression(0);
}
break;
case 2:
{
_localctx = new CommandExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(831);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) {
case 1:
{
setState(830);
match(EMARK);
}
break;
}
setState(833);
methodInvocationWithoutParentheses();
}
break;
case 3:
{
_localctx = new NotExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(834);
match(NOT);
setState(838);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(835);
match(NL);
}
}
setState(840);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(841);
expressionOrCommand(2);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(855);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,106,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
{
_localctx = new KeywordAndOrExpressionOrCommandContext(new ExpressionOrCommandContext(_parentctx, _parentState));
((KeywordAndOrExpressionOrCommandContext)_localctx).lhs = _prevctx;
pushNewRecursionContext(_localctx, _startState, RULE_expressionOrCommand);
setState(844);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(845);
((KeywordAndOrExpressionOrCommandContext)_localctx).binOp = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==AND || _la==OR) ) {
((KeywordAndOrExpressionOrCommandContext)_localctx).binOp = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(849);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(846);
match(NL);
}
}
setState(851);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(852);
((KeywordAndOrExpressionOrCommandContext)_localctx).rhs = expressionOrCommand(2);
}
}
}
setState(857);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,106,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class OperatorExpressionContext extends ParserRuleContext {
public OperatorExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_operatorExpression; }
public OperatorExpressionContext() { }
public void copyFrom(OperatorExpressionContext ctx) {
super.copyFrom(ctx);
}
}
public static class TernaryOperatorExpressionContext extends OperatorExpressionContext {
public List operatorExpression() {
return getRuleContexts(OperatorExpressionContext.class);
}
public OperatorExpressionContext operatorExpression(int i) {
return getRuleContext(OperatorExpressionContext.class,i);
}
public TerminalNode QMARK() { return getToken(RubyParser.QMARK, 0); }
public TerminalNode COLON() { return getToken(RubyParser.COLON, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TernaryOperatorExpressionContext(OperatorExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterTernaryOperatorExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitTernaryOperatorExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitTernaryOperatorExpression(this);
else return visitor.visitChildren(this);
}
}
public static class PrimaryOperatorExpressionContext extends OperatorExpressionContext {
public PrimaryContext primary() {
return getRuleContext(PrimaryContext.class,0);
}
public PrimaryOperatorExpressionContext(OperatorExpressionContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryOperatorExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryOperatorExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryOperatorExpression(this);
else return visitor.visitChildren(this);
}
}
public final OperatorExpressionContext operatorExpression() throws RecognitionException {
return operatorExpression(0);
}
private OperatorExpressionContext operatorExpression(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
OperatorExpressionContext _localctx = new OperatorExpressionContext(_ctx, _parentState);
OperatorExpressionContext _prevctx = _localctx;
int _startState = 68;
enterRecursionRule(_localctx, 68, RULE_operatorExpression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
_localctx = new PrimaryOperatorExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(859);
primary();
}
_ctx.stop = _input.LT(-1);
setState(887);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,110,_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 TernaryOperatorExpressionContext(new OperatorExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_operatorExpression);
setState(861);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(862);
match(QMARK);
setState(866);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(863);
match(NL);
}
}
setState(868);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(869);
operatorExpression(0);
setState(873);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(870);
match(NL);
}
}
setState(875);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(876);
match(COLON);
setState(880);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(877);
match(NL);
}
}
setState(882);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(883);
operatorExpression(2);
}
}
}
setState(889);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,110,_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 PrimaryValuePrimaryContext extends PrimaryContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public PrimaryValuePrimaryContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValuePrimary(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValuePrimary(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValuePrimary(this);
else return visitor.visitChildren(this);
}
}
public static class ReturnWithoutArgumentsContext extends PrimaryContext {
public TerminalNode RETURN() { return getToken(RubyParser.RETURN, 0); }
public ReturnWithoutArgumentsContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterReturnWithoutArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitReturnWithoutArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitReturnWithoutArguments(this);
else return visitor.visitChildren(this);
}
}
public static class BreakWithoutArgumentsContext extends PrimaryContext {
public TerminalNode BREAK() { return getToken(RubyParser.BREAK, 0); }
public BreakWithoutArgumentsContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBreakWithoutArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBreakWithoutArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBreakWithoutArguments(this);
else return visitor.visitChildren(this);
}
}
public static class RedoWithoutArgumentsContext extends PrimaryContext {
public TerminalNode REDO() { return getToken(RubyParser.REDO, 0); }
public RedoWithoutArgumentsContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterRedoWithoutArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitRedoWithoutArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitRedoWithoutArguments(this);
else return visitor.visitChildren(this);
}
}
public static class NextWithoutArgumentsContext extends PrimaryContext {
public TerminalNode NEXT() { return getToken(RubyParser.NEXT, 0); }
public NextWithoutArgumentsContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNextWithoutArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNextWithoutArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNextWithoutArguments(this);
else return visitor.visitChildren(this);
}
}
public static class RetryWithoutArgumentsContext extends PrimaryContext {
public TerminalNode RETRY() { return getToken(RubyParser.RETRY, 0); }
public RetryWithoutArgumentsContext(PrimaryContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterRetryWithoutArguments(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitRetryWithoutArguments(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitRetryWithoutArguments(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryContext primary() throws RecognitionException {
PrimaryContext _localctx = new PrimaryContext(_ctx, getState());
enterRule(_localctx, 70, RULE_primary);
try {
setState(896);
_errHandler.sync(this);
switch (_input.LA(1)) {
case RETURN:
_localctx = new ReturnWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(890);
match(RETURN);
}
break;
case BREAK:
_localctx = new BreakWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(891);
match(BREAK);
}
break;
case NEXT:
_localctx = new NextWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(892);
match(NEXT);
}
break;
case REDO:
_localctx = new RedoWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(893);
match(REDO);
}
break;
case RETRY:
_localctx = new RetryWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(894);
match(RETRY);
}
break;
case REGULAR_EXPRESSION_START:
case LINE__:
case ENCODING__:
case FILE__:
case BEGIN:
case CASE:
case CLASS:
case DEF:
case IS_DEFINED:
case FOR:
case FALSE:
case IF:
case MODULE:
case NIL:
case SELF:
case SUPER:
case TRUE:
case UNLESS:
case UNTIL:
case WHILE:
case YIELD:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case MINUSGT:
case EMARK:
case PLUS:
case MINUS:
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:
_localctx = new PrimaryValuePrimaryContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(895);
primaryValue(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 PrimaryValueContext extends ParserRuleContext {
public PrimaryValueContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryValue; }
public PrimaryValueContext() { }
public void copyFrom(PrimaryValueContext ctx) {
super.copyFrom(ctx);
}
}
public static class MethodDefinitionContext extends PrimaryValueContext {
public TerminalNode DEF() { return getToken(RubyParser.DEF, 0); }
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public MethodParameterPartContext methodParameterPart() {
return getRuleContext(MethodParameterPartContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public MethodDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class BeginEndExpressionContext extends PrimaryValueContext {
public TerminalNode BEGIN() { return getToken(RubyParser.BEGIN, 0); }
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public BeginEndExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBeginEndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBeginEndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBeginEndExpression(this);
else return visitor.visitChildren(this);
}
}
public static class IndexingAccessExpressionContext extends PrimaryValueContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public TerminalNode LBRACK() { return getToken(RubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(RubyParser.RBRACK, 0); }
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public IndexingAccessExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIndexingAccessExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIndexingAccessExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIndexingAccessExpression(this);
else return visitor.visitChildren(this);
}
}
public static class ConstantAssignmentExpressionContext extends PrimaryValueContext {
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public TerminalNode CONSTANT_IDENTIFIER() { return getToken(RubyParser.CONSTANT_IDENTIFIER, 0); }
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ConstantAssignmentExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterConstantAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitConstantAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitConstantAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public static class UntilExpressionContext extends PrimaryValueContext {
public TerminalNode UNTIL() { return getToken(RubyParser.UNTIL, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public UntilExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterUntilExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitUntilExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitUntilExpression(this);
else return visitor.visitChildren(this);
}
}
public static class ModuleDefinitionContext extends PrimaryValueContext {
public TerminalNode MODULE() { return getToken(RubyParser.MODULE, 0); }
public ClassPathContext classPath() {
return getRuleContext(ClassPathContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public ModuleDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterModuleDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitModuleDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitModuleDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class SingletonMethodDefinitionContext extends PrimaryValueContext {
public Token op;
public TerminalNode DEF() { return getToken(RubyParser.DEF, 0); }
public SingletonObjectContext singletonObject() {
return getRuleContext(SingletonObjectContext.class,0);
}
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public MethodParameterPartContext methodParameterPart() {
return getRuleContext(MethodParameterPartContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public SingletonMethodDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingletonMethodDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingletonMethodDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingletonMethodDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class BitwiseAndExpressionContext extends PrimaryValueContext {
public Token bitwiseAndOperator;
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public TerminalNode AMP() { return getToken(RubyParser.AMP, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public BitwiseAndExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBitwiseAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBitwiseAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBitwiseAndExpression(this);
else return visitor.visitChildren(this);
}
}
public static class LogicalAndExpressionContext extends PrimaryValueContext {
public Token andOperator;
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public TerminalNode AMP2() { return getToken(RubyParser.AMP2, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public LogicalAndExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterLogicalAndExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitLogicalAndExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitLogicalAndExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MemberAccessExpressionContext extends PrimaryValueContext {
public Token op;
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public TerminalNode AMPDOT() { return getToken(RubyParser.AMPDOT, 0); }
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ArgumentWithParenthesesContext argumentWithParentheses() {
return getRuleContext(ArgumentWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public MemberAccessExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMemberAccessExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMemberAccessExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMemberAccessExpression(this);
else return visitor.visitChildren(this);
}
}
public static class UnaryExpressionContext extends PrimaryValueContext {
public UnaryOperatorContext unaryOperator() {
return getRuleContext(UnaryOperatorContext.class,0);
}
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public UnaryExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterUnaryExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitUnaryExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitUnaryExpression(this);
else return visitor.visitChildren(this);
}
}
public static class NumericLiteralContext extends PrimaryValueContext {
public Token sign;
public UnsignedNumericLiteralContext unsignedNumericLiteral() {
return getRuleContext(UnsignedNumericLiteralContext.class,0);
}
public TerminalNode PLUS() { return getToken(RubyParser.PLUS, 0); }
public TerminalNode MINUS() { return getToken(RubyParser.MINUS, 0); }
public NumericLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNumericLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNumericLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNumericLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class ClassDefinitionContext extends PrimaryValueContext {
public TerminalNode CLASS() { return getToken(RubyParser.CLASS, 0); }
public ClassPathContext classPath() {
return getRuleContext(ClassPathContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public TerminalNode LT() { return getToken(RubyParser.LT, 0); }
public CommandOrPrimaryValueClassContext commandOrPrimaryValueClass() {
return getRuleContext(CommandOrPrimaryValueClassContext.class,0);
}
public TerminalNode SEMI() { return getToken(RubyParser.SEMI, 0); }
public TerminalNode NL() { return getToken(RubyParser.NL, 0); }
public ClassDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterClassDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitClassDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitClassDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedExpandedSymbolArrayLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START() { return getToken(RubyParser.QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END() { return getToken(RubyParser.QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END, 0); }
public QuotedExpandedArrayElementListContext quotedExpandedArrayElementList() {
return getRuleContext(QuotedExpandedArrayElementListContext.class,0);
}
public QuotedExpandedSymbolArrayLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedExpandedSymbolArrayLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedExpandedSymbolArrayLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedExpandedSymbolArrayLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class ForExpressionContext extends PrimaryValueContext {
public TerminalNode FOR() { return getToken(RubyParser.FOR, 0); }
public ForVariableContext forVariable() {
return getRuleContext(ForVariableContext.class,0);
}
public TerminalNode IN() { return getToken(RubyParser.IN, 0); }
public CommandOrPrimaryValueContext commandOrPrimaryValue() {
return getRuleContext(CommandOrPrimaryValueContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ForExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterForExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitForExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitForExpression(this);
else return visitor.visitChildren(this);
}
}
public static class BracketedArrayLiteralContext extends PrimaryValueContext {
public TerminalNode LBRACK() { return getToken(RubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(RubyParser.RBRACK, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public BracketedArrayLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBracketedArrayLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBracketedArrayLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBracketedArrayLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class LambdaExpressionContext extends PrimaryValueContext {
public TerminalNode MINUSGT() { return getToken(RubyParser.MINUSGT, 0); }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public ParameterListContext parameterList() {
return getRuleContext(ParameterListContext.class,0);
}
public LambdaExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterLambdaExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitLambdaExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitLambdaExpression(this);
else return visitor.visitChildren(this);
}
}
public static class CaseWithoutExpressionContext extends PrimaryValueContext {
public TerminalNode CASE() { return getToken(RubyParser.CASE, 0); }
public TerminalNode END() { return getToken(RubyParser.END, 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(RubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(RubyParser.SEMI, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public CaseWithoutExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCaseWithoutExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCaseWithoutExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCaseWithoutExpression(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedNonExpandedStringLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_NON_EXPANDED_STRING_LITERAL_START() { return getToken(RubyParser.QUOTED_NON_EXPANDED_STRING_LITERAL_START, 0); }
public TerminalNode QUOTED_NON_EXPANDED_STRING_LITERAL_END() { return getToken(RubyParser.QUOTED_NON_EXPANDED_STRING_LITERAL_END, 0); }
public TerminalNode NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE() { return getToken(RubyParser.NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE, 0); }
public QuotedNonExpandedStringLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedNonExpandedStringLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedNonExpandedStringLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedNonExpandedStringLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class ShiftExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public BitwiseShiftOperatorContext bitwiseShiftOperator() {
return getRuleContext(BitwiseShiftOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ShiftExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterShiftExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitShiftExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitShiftExpression(this);
else return visitor.visitChildren(this);
}
}
public static class EndlessMethodDefinitionContext extends PrimaryValueContext {
public TerminalNode DEF() { return getToken(RubyParser.DEF, 0); }
public DefinedMethodNameContext definedMethodName() {
return getRuleContext(DefinedMethodNameContext.class,0);
}
public TerminalNode EQ() { return getToken(RubyParser.EQ, 0); }
public StatementContext statement() {
return getRuleContext(StatementContext.class,0);
}
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ParameterListContext parameterList() {
return getRuleContext(ParameterListContext.class,0);
}
public EndlessMethodDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterEndlessMethodDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitEndlessMethodDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitEndlessMethodDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedExpandedExternalCommandLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START() { return getToken(RubyParser.QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_END() { return getToken(RubyParser.QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_END, 0); }
public List quotedExpandedLiteralStringContent() {
return getRuleContexts(QuotedExpandedLiteralStringContentContext.class);
}
public QuotedExpandedLiteralStringContentContext quotedExpandedLiteralStringContent(int i) {
return getRuleContext(QuotedExpandedLiteralStringContentContext.class,i);
}
public QuotedExpandedExternalCommandLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedExpandedExternalCommandLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedExpandedExternalCommandLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedExpandedExternalCommandLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class RegularExpressionLiteralContext extends PrimaryValueContext {
public TerminalNode REGULAR_EXPRESSION_START() { return getToken(RubyParser.REGULAR_EXPRESSION_START, 0); }
public TerminalNode REGULAR_EXPRESSION_END() { return getToken(RubyParser.REGULAR_EXPRESSION_END, 0); }
public List regexpLiteralContent() {
return getRuleContexts(RegexpLiteralContentContext.class);
}
public RegexpLiteralContentContext regexpLiteralContent(int i) {
return getRuleContext(RegexpLiteralContentContext.class,i);
}
public RegularExpressionLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterRegularExpressionLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitRegularExpressionLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitRegularExpressionLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class PowerExpressionContext extends PrimaryValueContext {
public Token powerOperator;
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public TerminalNode STAR2() { return getToken(RubyParser.STAR2, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public PowerExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPowerExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPowerExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPowerExpression(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedNonExpandedSymbolArrayLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START() { return getToken(RubyParser.QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END() { return getToken(RubyParser.QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END, 0); }
public QuotedNonExpandedArrayElementListContext quotedNonExpandedArrayElementList() {
return getRuleContext(QuotedNonExpandedArrayElementListContext.class,0);
}
public QuotedNonExpandedSymbolArrayLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedNonExpandedSymbolArrayLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedNonExpandedSymbolArrayLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedNonExpandedSymbolArrayLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class BitwiseOrExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public BitwiseOrOperatorContext bitwiseOrOperator() {
return getRuleContext(BitwiseOrOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public BitwiseOrExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBitwiseOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBitwiseOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBitwiseOrExpression(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedExpandedStringLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_EXPANDED_STRING_LITERAL_START() { return getToken(RubyParser.QUOTED_EXPANDED_STRING_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_STRING_LITERAL_END() { return getToken(RubyParser.QUOTED_EXPANDED_STRING_LITERAL_END, 0); }
public List quotedExpandedLiteralStringContent() {
return getRuleContexts(QuotedExpandedLiteralStringContentContext.class);
}
public QuotedExpandedLiteralStringContentContext quotedExpandedLiteralStringContent(int i) {
return getRuleContext(QuotedExpandedLiteralStringContentContext.class,i);
}
public QuotedExpandedStringLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedExpandedStringLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedExpandedStringLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedExpandedStringLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class AttributeAssignmentExpressionContext extends PrimaryValueContext {
public Token op;
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public MethodNameContext methodName() {
return getRuleContext(MethodNameContext.class,0);
}
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public TerminalNode DOT() { return getToken(RubyParser.DOT, 0); }
public TerminalNode COLON2() { return getToken(RubyParser.COLON2, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AttributeAssignmentExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAttributeAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAttributeAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAttributeAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public static class EqualityExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public EqualityOperatorContext equalityOperator() {
return getRuleContext(EqualityOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public EqualityExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterEqualityExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitEqualityExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitEqualityExpression(this);
else return visitor.visitChildren(this);
}
}
public static class BracketAssignmentExpressionContext extends PrimaryValueContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public TerminalNode LBRACK() { return getToken(RubyParser.LBRACK, 0); }
public TerminalNode RBRACK() { return getToken(RubyParser.RBRACK, 0); }
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public BracketAssignmentExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBracketAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBracketAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBracketAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public static class RangeExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public RangeOperatorContext rangeOperator() {
return getRuleContext(RangeOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public RangeExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitRangeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitRangeExpression(this);
else return visitor.visitChildren(this);
}
}
public static class AdditiveExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public AdditiveOperatorContext additiveOperator() {
return getRuleContext(AdditiveOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AdditiveExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAdditiveExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAdditiveExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAdditiveExpression(this);
else return visitor.visitChildren(this);
}
}
public static class RelationalExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public RelationalOperatorContext relationalOperator() {
return getRuleContext(RelationalOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public RelationalExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterRelationalExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitRelationalExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitRelationalExpression(this);
else return visitor.visitChildren(this);
}
}
public static class LocalVariableAssignmentExpressionContext extends PrimaryValueContext {
public VariableContext lhs;
public OperatorExpressionContext rhs;
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public VariableContext variable() {
return getRuleContext(VariableContext.class,0);
}
public OperatorExpressionContext operatorExpression() {
return getRuleContext(OperatorExpressionContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public LocalVariableAssignmentExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterLocalVariableAssignmentExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitLocalVariableAssignmentExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitLocalVariableAssignmentExpression(this);
else return visitor.visitChildren(this);
}
}
public static class HashLiteralContext extends PrimaryValueContext {
public TerminalNode LCURLY() { return getToken(RubyParser.LCURLY, 0); }
public TerminalNode RCURLY() { return getToken(RubyParser.RCURLY, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AssociationListContext associationList() {
return getRuleContext(AssociationListContext.class,0);
}
public TerminalNode COMMA() { return getToken(RubyParser.COMMA, 0); }
public HashLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterHashLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitHashLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitHashLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class HereDocsContext extends PrimaryValueContext {
public HereDocContext hereDoc() {
return getRuleContext(HereDocContext.class,0);
}
public HereDocsContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterHereDocs(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitHereDocs(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitHereDocs(this);
else return visitor.visitChildren(this);
}
}
public static class AssignmentWithRescueContext extends PrimaryValueContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public AssignmentOperatorContext assignmentOperator() {
return getRuleContext(AssignmentOperatorContext.class,0);
}
public List operatorExpression() {
return getRuleContexts(OperatorExpressionContext.class);
}
public OperatorExpressionContext operatorExpression(int i) {
return getRuleContext(OperatorExpressionContext.class,i);
}
public TerminalNode RESCUE() { return getToken(RubyParser.RESCUE, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public AssignmentWithRescueContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAssignmentWithRescue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAssignmentWithRescue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAssignmentWithRescue(this);
else return visitor.visitChildren(this);
}
}
public static class MethodCallWithParenthesesContext extends PrimaryValueContext {
public MethodCallsWithParenthesesContext methodCallsWithParentheses() {
return getRuleContext(MethodCallsWithParenthesesContext.class,0);
}
public MethodCallWithParenthesesContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodCallWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodCallWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodCallWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class GroupingStatementContext extends PrimaryValueContext {
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public GroupingStatementContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterGroupingStatement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitGroupingStatement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitGroupingStatement(this);
else return visitor.visitChildren(this);
}
}
public static class IfExpressionContext extends PrimaryValueContext {
public TerminalNode IF() { return getToken(RubyParser.IF, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
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(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIfExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIfExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIfExpression(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedNonExpandedStringArrayLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START() { return getToken(RubyParser.QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END() { return getToken(RubyParser.QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END, 0); }
public QuotedNonExpandedArrayElementListContext quotedNonExpandedArrayElementList() {
return getRuleContext(QuotedNonExpandedArrayElementListContext.class,0);
}
public QuotedNonExpandedStringArrayLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedNonExpandedStringArrayLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedNonExpandedStringArrayLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedNonExpandedStringArrayLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class UnlessExpressionContext extends PrimaryValueContext {
public TerminalNode UNLESS() { return getToken(RubyParser.UNLESS, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ElseClauseContext elseClause() {
return getRuleContext(ElseClauseContext.class,0);
}
public UnlessExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterUnlessExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitUnlessExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitUnlessExpression(this);
else return visitor.visitChildren(this);
}
}
public static class SingletonClassDefinitionContext extends PrimaryValueContext {
public TerminalNode CLASS() { return getToken(RubyParser.CLASS, 0); }
public TerminalNode LT2() { return getToken(RubyParser.LT2, 0); }
public CommandOrPrimaryValueClassContext commandOrPrimaryValueClass() {
return getRuleContext(CommandOrPrimaryValueClassContext.class,0);
}
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public TerminalNode SEMI() { return getToken(RubyParser.SEMI, 0); }
public TerminalNode NL() { return getToken(RubyParser.NL, 0); }
public SingletonClassDefinitionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingletonClassDefinition(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingletonClassDefinition(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingletonClassDefinition(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedExpandedStringArrayLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START() { return getToken(RubyParser.QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START, 0); }
public TerminalNode QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END() { return getToken(RubyParser.QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END, 0); }
public QuotedExpandedArrayElementListContext quotedExpandedArrayElementList() {
return getRuleContext(QuotedExpandedArrayElementListContext.class,0);
}
public QuotedExpandedStringArrayLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedExpandedStringArrayLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedExpandedStringArrayLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedExpandedStringArrayLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class QuotedExpandedRegularExpressionLiteralContext extends PrimaryValueContext {
public TerminalNode QUOTED_EXPANDED_REGULAR_EXPRESSION_START() { return getToken(RubyParser.QUOTED_EXPANDED_REGULAR_EXPRESSION_START, 0); }
public TerminalNode QUOTED_EXPANDED_REGULAR_EXPRESSION_END() { return getToken(RubyParser.QUOTED_EXPANDED_REGULAR_EXPRESSION_END, 0); }
public List quotedExpandedLiteralStringContent() {
return getRuleContexts(QuotedExpandedLiteralStringContentContext.class);
}
public QuotedExpandedLiteralStringContentContext quotedExpandedLiteralStringContent(int i) {
return getRuleContext(QuotedExpandedLiteralStringContentContext.class,i);
}
public QuotedExpandedRegularExpressionLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterQuotedExpandedRegularExpressionLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitQuotedExpandedRegularExpressionLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitQuotedExpandedRegularExpressionLiteral(this);
else return visitor.visitChildren(this);
}
}
public static class WhileExpressionContext extends PrimaryValueContext {
public TerminalNode WHILE() { return getToken(RubyParser.WHILE, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public DoClauseContext doClause() {
return getRuleContext(DoClauseContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public WhileExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterWhileExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitWhileExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitWhileExpression(this);
else return visitor.visitChildren(this);
}
}
public static class SingleQuotedStringExpressionContext extends PrimaryValueContext {
public SingleQuotedStringContext singleQuotedString() {
return getRuleContext(SingleQuotedStringContext.class,0);
}
public List singleOrDoubleQuotedString() {
return getRuleContexts(SingleOrDoubleQuotedStringContext.class);
}
public SingleOrDoubleQuotedStringContext singleOrDoubleQuotedString(int i) {
return getRuleContext(SingleOrDoubleQuotedStringContext.class,i);
}
public SingleQuotedStringExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSingleQuotedStringExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSingleQuotedStringExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSingleQuotedStringExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MultiplicativeExpressionContext extends PrimaryValueContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public MultiplicativeOperatorContext multiplicativeOperator() {
return getRuleContext(MultiplicativeOperatorContext.class,0);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public MultiplicativeExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMultiplicativeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMultiplicativeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMultiplicativeExpression(this);
else return visitor.visitChildren(this);
}
}
public static class LogicalOrExpressionContext extends PrimaryValueContext {
public Token orOperator;
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public TerminalNode BAR2() { return getToken(RubyParser.BAR2, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public LogicalOrExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterLogicalOrExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitLogicalOrExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitLogicalOrExpression(this);
else return visitor.visitChildren(this);
}
}
public static class UnaryMinusExpressionContext extends PrimaryValueContext {
public TerminalNode MINUS() { return getToken(RubyParser.MINUS, 0); }
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public UnaryMinusExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterUnaryMinusExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitUnaryMinusExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitUnaryMinusExpression(this);
else return visitor.visitChildren(this);
}
}
public static class SymbolExpressionContext extends PrimaryValueContext {
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public SymbolExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSymbolExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSymbolExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSymbolExpression(this);
else return visitor.visitChildren(this);
}
}
public static class DoubleQuotedStringExpressionContext extends PrimaryValueContext {
public DoubleQuotedStringContext doubleQuotedString() {
return getRuleContext(DoubleQuotedStringContext.class,0);
}
public List singleOrDoubleQuotedString() {
return getRuleContexts(SingleOrDoubleQuotedStringContext.class);
}
public SingleOrDoubleQuotedStringContext singleOrDoubleQuotedString(int i) {
return getRuleContext(SingleOrDoubleQuotedStringContext.class,i);
}
public DoubleQuotedStringExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterDoubleQuotedStringExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitDoubleQuotedStringExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitDoubleQuotedStringExpression(this);
else return visitor.visitChildren(this);
}
}
public static class YieldExpressionContext extends PrimaryValueContext {
public TerminalNode YIELD() { return getToken(RubyParser.YIELD, 0); }
public ArgumentWithParenthesesContext argumentWithParentheses() {
return getRuleContext(ArgumentWithParenthesesContext.class,0);
}
public YieldExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterYieldExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitYieldExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitYieldExpression(this);
else return visitor.visitChildren(this);
}
}
public static class CaseWithExpressionContext extends PrimaryValueContext {
public TerminalNode CASE() { return getToken(RubyParser.CASE, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
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(RubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(RubyParser.SEMI, i);
}
public CaseWithExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCaseWithExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCaseWithExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCaseWithExpression(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryValueContext primaryValue() throws RecognitionException {
return primaryValue(0);
}
private PrimaryValueContext primaryValue(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
PrimaryValueContext _localctx = new PrimaryValueContext(_ctx, _parentState);
PrimaryValueContext _prevctx = _localctx;
int _startState = 72;
enterRecursionRule(_localctx, 72, RULE_primaryValue, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1233);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,157,_ctx) ) {
case 1:
{
_localctx = new LocalVariableAssignmentExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(899);
((LocalVariableAssignmentExpressionContext)_localctx).lhs = variable();
setState(900);
assignmentOperator();
setState(904);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(901);
match(NL);
}
}
setState(906);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(907);
((LocalVariableAssignmentExpressionContext)_localctx).rhs = operatorExpression(0);
}
break;
case 2:
{
_localctx = new ConstantAssignmentExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(909);
match(COLON2);
setState(910);
match(CONSTANT_IDENTIFIER);
setState(911);
assignmentOperator();
setState(915);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(912);
match(NL);
}
}
setState(917);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(918);
operatorExpression(0);
}
break;
case 3:
{
_localctx = new ClassDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(920);
match(CLASS);
setState(921);
classPath(0);
setState(924);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LT) {
{
setState(922);
match(LT);
setState(923);
commandOrPrimaryValueClass();
}
}
setState(927);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) {
case 1:
{
setState(926);
_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;
}
setState(929);
bodyStatement();
setState(930);
match(END);
}
break;
case 4:
{
_localctx = new SingletonClassDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(932);
match(CLASS);
setState(933);
match(LT2);
setState(934);
commandOrPrimaryValueClass();
setState(935);
_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(936);
bodyStatement();
setState(937);
match(END);
}
break;
case 5:
{
_localctx = new ModuleDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(939);
match(MODULE);
setState(940);
classPath(0);
setState(941);
bodyStatement();
setState(942);
match(END);
}
break;
case 6:
{
_localctx = new MethodDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(944);
match(DEF);
setState(945);
definedMethodName();
setState(946);
methodParameterPart();
setState(947);
bodyStatement();
setState(948);
match(END);
}
break;
case 7:
{
_localctx = new SingletonMethodDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(950);
match(DEF);
setState(951);
singletonObject();
setState(952);
((SingletonMethodDefinitionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
((SingletonMethodDefinitionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(953);
definedMethodName();
setState(954);
methodParameterPart();
setState(955);
bodyStatement();
setState(956);
match(END);
}
break;
case 8:
{
_localctx = new EndlessMethodDefinitionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(958);
match(DEF);
setState(959);
definedMethodName();
setState(965);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(960);
match(LPAREN);
setState(962);
_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(961);
parameterList();
}
}
setState(964);
match(RPAREN);
}
}
setState(967);
match(EQ);
setState(971);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(968);
match(NL);
}
}
setState(973);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(974);
statement(0);
}
break;
case 9:
{
_localctx = new LambdaExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(976);
match(MINUSGT);
setState(982);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==LPAREN) {
{
setState(977);
match(LPAREN);
setState(979);
_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(978);
parameterList();
}
}
setState(981);
match(RPAREN);
}
}
setState(984);
block();
}
break;
case 10:
{
_localctx = new IfExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(985);
match(IF);
setState(989);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(986);
match(NL);
}
}
setState(991);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(992);
expressionOrCommand(0);
setState(993);
thenClause();
setState(997);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==ELSIF) {
{
{
setState(994);
elsifClause();
}
}
setState(999);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1001);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1000);
elseClause();
}
}
setState(1003);
match(END);
}
break;
case 11:
{
_localctx = new UnlessExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1005);
match(UNLESS);
setState(1009);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1006);
match(NL);
}
}
setState(1011);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1012);
expressionOrCommand(0);
setState(1013);
thenClause();
setState(1015);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1014);
elseClause();
}
}
setState(1017);
match(END);
}
break;
case 12:
{
_localctx = new UntilExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1019);
match(UNTIL);
setState(1023);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1020);
match(NL);
}
}
setState(1025);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1026);
expressionOrCommand(0);
setState(1027);
doClause();
setState(1028);
match(END);
}
break;
case 13:
{
_localctx = new YieldExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1030);
match(YIELD);
setState(1032);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) {
case 1:
{
setState(1031);
argumentWithParentheses();
}
break;
}
}
break;
case 14:
{
_localctx = new BeginEndExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1034);
match(BEGIN);
setState(1035);
bodyStatement();
setState(1036);
match(END);
}
break;
case 15:
{
_localctx = new CaseWithExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1038);
match(CASE);
setState(1042);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1039);
match(NL);
}
}
setState(1044);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1045);
expressionOrCommand(0);
setState(1049);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(1046);
_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(1051);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1053);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1052);
whenClause();
}
}
setState(1055);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==WHEN );
setState(1058);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1057);
elseClause();
}
}
setState(1060);
match(END);
}
break;
case 16:
{
_localctx = new CaseWithoutExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1062);
match(CASE);
setState(1066);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(1063);
_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(1068);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1070);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(1069);
whenClause();
}
}
setState(1072);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==WHEN );
setState(1075);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==ELSE) {
{
setState(1074);
elseClause();
}
}
setState(1077);
match(END);
}
break;
case 17:
{
_localctx = new WhileExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1079);
match(WHILE);
setState(1083);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1080);
match(NL);
}
}
setState(1085);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1086);
expressionOrCommand(0);
setState(1087);
doClause();
setState(1088);
match(END);
}
break;
case 18:
{
_localctx = new ForExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1090);
match(FOR);
setState(1094);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1091);
match(NL);
}
}
setState(1096);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1097);
forVariable();
setState(1098);
match(IN);
setState(1102);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1099);
match(NL);
}
}
setState(1104);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1105);
commandOrPrimaryValue(0);
setState(1106);
doClause();
setState(1107);
match(END);
}
break;
case 19:
{
_localctx = new MethodCallWithParenthesesContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1109);
methodCallsWithParentheses();
}
break;
case 20:
{
_localctx = new BracketedArrayLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1110);
match(LBRACK);
setState(1114);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,138,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1111);
match(NL);
}
}
}
setState(1116);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,138,_ctx);
}
setState(1118);
_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(1117);
indexingArgumentList();
}
}
setState(1123);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1120);
match(NL);
}
}
setState(1125);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1126);
match(RBRACK);
}
break;
case 21:
{
_localctx = new QuotedNonExpandedStringArrayLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1127);
match(QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START);
setState(1129);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR || _la==NON_EXPANDED_ARRAY_ITEM_CHARACTER) {
{
setState(1128);
quotedNonExpandedArrayElementList();
}
}
setState(1131);
match(QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_END);
}
break;
case 22:
{
_localctx = new QuotedNonExpandedSymbolArrayLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1132);
match(QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START);
setState(1134);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NON_EXPANDED_ARRAY_ITEM_SEPARATOR || _la==NON_EXPANDED_ARRAY_ITEM_CHARACTER) {
{
setState(1133);
quotedNonExpandedArrayElementList();
}
}
setState(1136);
match(QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_END);
}
break;
case 23:
{
_localctx = new QuotedExpandedStringArrayLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1137);
match(QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START);
setState(1139);
_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(1138);
quotedExpandedArrayElementList();
}
}
setState(1141);
match(QUOTED_EXPANDED_STRING_ARRAY_LITERAL_END);
}
break;
case 24:
{
_localctx = new QuotedExpandedSymbolArrayLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1142);
match(QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START);
setState(1144);
_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(1143);
quotedExpandedArrayElementList();
}
}
setState(1146);
match(QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_END);
}
break;
case 25:
{
_localctx = new HashLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1147);
match(LCURLY);
setState(1151);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,145,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1148);
match(NL);
}
}
}
setState(1153);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,145,_ctx);
}
setState(1158);
_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 << (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(1154);
associationList();
setState(1156);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1155);
match(COMMA);
}
}
}
}
setState(1163);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1160);
match(NL);
}
}
setState(1165);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1166);
match(RCURLY);
}
break;
case 26:
{
_localctx = new NumericLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1168);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PLUS || _la==MINUS) {
{
setState(1167);
((NumericLiteralContext)_localctx).sign = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
((NumericLiteralContext)_localctx).sign = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(1170);
unsignedNumericLiteral();
}
break;
case 27:
{
_localctx = new SingleQuotedStringExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1171);
singleQuotedString();
setState(1175);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,150,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1172);
singleOrDoubleQuotedString();
}
}
}
setState(1177);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,150,_ctx);
}
}
break;
case 28:
{
_localctx = new DoubleQuotedStringExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1178);
doubleQuotedString();
setState(1182);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,151,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1179);
singleOrDoubleQuotedString();
}
}
}
setState(1184);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,151,_ctx);
}
}
break;
case 29:
{
_localctx = new QuotedNonExpandedStringLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1185);
match(QUOTED_NON_EXPANDED_STRING_LITERAL_START);
setState(1187);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE) {
{
setState(1186);
match(NON_EXPANDED_LITERAL_CHARACTER_SEQUENCE);
}
}
setState(1189);
match(QUOTED_NON_EXPANDED_STRING_LITERAL_END);
}
break;
case 30:
{
_localctx = new QuotedExpandedStringLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1190);
match(QUOTED_EXPANDED_STRING_LITERAL_START);
setState(1194);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==EXPANDED_LITERAL_CHARACTER_SEQUENCE || _la==DELIMITED_STRING_INTERPOLATION_BEGIN) {
{
{
setState(1191);
quotedExpandedLiteralStringContent();
}
}
setState(1196);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1197);
match(QUOTED_EXPANDED_STRING_LITERAL_END);
}
break;
case 31:
{
_localctx = new QuotedExpandedExternalCommandLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1198);
match(QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START);
setState(1202);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==EXPANDED_LITERAL_CHARACTER_SEQUENCE || _la==DELIMITED_STRING_INTERPOLATION_BEGIN) {
{
{
setState(1199);
quotedExpandedLiteralStringContent();
}
}
setState(1204);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1205);
match(QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_END);
}
break;
case 32:
{
_localctx = new SymbolExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1206);
symbol();
}
break;
case 33:
{
_localctx = new RegularExpressionLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1207);
match(REGULAR_EXPRESSION_START);
setState(1211);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==REGULAR_EXPRESSION_BODY || _la==REGULAR_EXPRESSION_INTERPOLATION_BEGIN) {
{
{
setState(1208);
regexpLiteralContent();
}
}
setState(1213);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1214);
match(REGULAR_EXPRESSION_END);
}
break;
case 34:
{
_localctx = new QuotedExpandedRegularExpressionLiteralContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1215);
match(QUOTED_EXPANDED_REGULAR_EXPRESSION_START);
setState(1219);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==EXPANDED_LITERAL_CHARACTER_SEQUENCE || _la==DELIMITED_STRING_INTERPOLATION_BEGIN) {
{
{
setState(1216);
quotedExpandedLiteralStringContent();
}
}
setState(1221);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1222);
match(QUOTED_EXPANDED_REGULAR_EXPRESSION_END);
}
break;
case 35:
{
_localctx = new GroupingStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1223);
match(LPAREN);
setState(1224);
compoundStatement();
setState(1225);
match(RPAREN);
}
break;
case 36:
{
_localctx = new UnaryExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1227);
unaryOperator();
setState(1228);
primaryValue(14);
}
break;
case 37:
{
_localctx = new UnaryMinusExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1230);
match(MINUS);
setState(1231);
primaryValue(12);
}
break;
case 38:
{
_localctx = new HereDocsContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1232);
hereDoc();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(1409);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,179,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
setState(1407);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,178,_ctx) ) {
case 1:
{
_localctx = new PowerExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1235);
if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)");
setState(1236);
((PowerExpressionContext)_localctx).powerOperator = match(STAR2);
setState(1240);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1237);
match(NL);
}
}
setState(1242);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1243);
primaryValue(13);
}
break;
case 2:
{
_localctx = new MultiplicativeExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1244);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
setState(1245);
multiplicativeOperator();
setState(1249);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1246);
match(NL);
}
}
setState(1251);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1252);
primaryValue(12);
}
break;
case 3:
{
_localctx = new AdditiveExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1254);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
setState(1255);
additiveOperator();
setState(1259);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1256);
match(NL);
}
}
setState(1261);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1262);
primaryValue(11);
}
break;
case 4:
{
_localctx = new ShiftExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1264);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
setState(1265);
bitwiseShiftOperator();
setState(1269);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1266);
match(NL);
}
}
setState(1271);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1272);
primaryValue(10);
}
break;
case 5:
{
_localctx = new BitwiseAndExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1274);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
setState(1275);
((BitwiseAndExpressionContext)_localctx).bitwiseAndOperator = match(AMP);
setState(1279);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1276);
match(NL);
}
}
setState(1281);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1282);
primaryValue(9);
}
break;
case 6:
{
_localctx = new BitwiseOrExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1283);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
setState(1284);
bitwiseOrOperator();
setState(1288);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1285);
match(NL);
}
}
setState(1290);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1291);
primaryValue(8);
}
break;
case 7:
{
_localctx = new RelationalExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1293);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
setState(1294);
relationalOperator();
setState(1298);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1295);
match(NL);
}
}
setState(1300);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1301);
primaryValue(7);
}
break;
case 8:
{
_localctx = new EqualityExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1303);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
setState(1304);
equalityOperator();
setState(1308);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1305);
match(NL);
}
}
setState(1310);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1311);
primaryValue(6);
}
break;
case 9:
{
_localctx = new LogicalAndExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1313);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
setState(1314);
((LogicalAndExpressionContext)_localctx).andOperator = match(AMP2);
setState(1318);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1315);
match(NL);
}
}
setState(1320);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1321);
primaryValue(5);
}
break;
case 10:
{
_localctx = new LogicalOrExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1322);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(1323);
((LogicalOrExpressionContext)_localctx).orOperator = match(BAR2);
setState(1327);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1324);
match(NL);
}
}
setState(1329);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1330);
primaryValue(4);
}
break;
case 11:
{
_localctx = new RangeExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1331);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
setState(1332);
rangeOperator();
setState(1336);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1333);
match(NL);
}
}
setState(1338);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1339);
primaryValue(3);
}
break;
case 12:
{
_localctx = new AttributeAssignmentExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1341);
if (!(precpred(_ctx, 53))) throw new FailedPredicateException(this, "precpred(_ctx, 53)");
setState(1342);
((AttributeAssignmentExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==COLON2 || _la==DOT) ) {
((AttributeAssignmentExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1343);
methodName();
setState(1344);
assignmentOperator();
setState(1348);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1345);
match(NL);
}
}
setState(1350);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1351);
operatorExpression(0);
}
break;
case 13:
{
_localctx = new BracketAssignmentExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1353);
if (!(precpred(_ctx, 51))) throw new FailedPredicateException(this, "precpred(_ctx, 51)");
setState(1354);
match(LBRACK);
setState(1356);
_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(1355);
indexingArgumentList();
}
}
setState(1358);
match(RBRACK);
setState(1359);
assignmentOperator();
setState(1363);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1360);
match(NL);
}
}
setState(1365);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1366);
operatorExpression(0);
}
break;
case 14:
{
_localctx = new AssignmentWithRescueContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1368);
if (!(precpred(_ctx, 50))) throw new FailedPredicateException(this, "precpred(_ctx, 50)");
setState(1369);
assignmentOperator();
setState(1373);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1370);
match(NL);
}
}
setState(1375);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1376);
operatorExpression(0);
setState(1377);
match(RESCUE);
setState(1378);
operatorExpression(0);
}
break;
case 15:
{
_localctx = new IndexingAccessExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1380);
if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)");
setState(1381);
match(LBRACK);
setState(1383);
_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(1382);
indexingArgumentList();
}
}
setState(1385);
match(RBRACK);
}
break;
case 16:
{
_localctx = new MemberAccessExpressionContext(new PrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_primaryValue);
setState(1386);
if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)");
setState(1390);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1387);
match(NL);
}
}
setState(1392);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1393);
((MemberAccessExpressionContext)_localctx).op = _input.LT(1);
_la = _input.LA(1);
if ( !(((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (COLON2 - 64)) | (1L << (DOT - 64)) | (1L << (AMPDOT - 64)))) != 0)) ) {
((MemberAccessExpressionContext)_localctx).op = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1397);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1394);
match(NL);
}
}
setState(1399);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1400);
methodName();
setState(1402);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,176,_ctx) ) {
case 1:
{
setState(1401);
argumentWithParentheses();
}
break;
}
setState(1405);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,177,_ctx) ) {
case 1:
{
setState(1404);
block();
}
break;
}
}
break;
}
}
}
setState(1411);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,179,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
return _localctx;
}
public static class MethodCallsWithParenthesesContext extends ParserRuleContext {
public MethodCallsWithParenthesesContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_methodCallsWithParentheses; }
public MethodCallsWithParenthesesContext() { }
public void copyFrom(MethodCallsWithParenthesesContext ctx) {
super.copyFrom(ctx);
}
}
public static class MethodCallWithBlockExpressionContext extends MethodCallsWithParenthesesContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public MethodCallWithBlockExpressionContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodCallWithBlockExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodCallWithBlockExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodCallWithBlockExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MethodCallWithParenthesesExpressionContext extends MethodCallsWithParenthesesContext {
public MethodIdentifierContext methodIdentifier() {
return getRuleContext(MethodIdentifierContext.class,0);
}
public ArgumentWithParenthesesContext argumentWithParentheses() {
return getRuleContext(ArgumentWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public MethodCallWithParenthesesExpressionContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodCallWithParenthesesExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodCallWithParenthesesExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodCallWithParenthesesExpression(this);
else return visitor.visitChildren(this);
}
}
public static class IsDefinedExpressionContext extends MethodCallsWithParenthesesContext {
public IsDefinedKeywordContext isDefinedKeyword() {
return getRuleContext(IsDefinedKeywordContext.class,0);
}
public TerminalNode LPAREN() { return getToken(RubyParser.LPAREN, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public TerminalNode RPAREN() { return getToken(RubyParser.RPAREN, 0); }
public IsDefinedExpressionContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIsDefinedExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIsDefinedExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIsDefinedExpression(this);
else return visitor.visitChildren(this);
}
}
public static class MethodCallOrVariableReferenceContext extends MethodCallsWithParenthesesContext {
public VariableReferenceContext variableReference() {
return getRuleContext(VariableReferenceContext.class,0);
}
public MethodCallOrVariableReferenceContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodCallOrVariableReference(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodCallOrVariableReference(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodCallOrVariableReference(this);
else return visitor.visitChildren(this);
}
}
public static class MethodCallExpressionContext extends MethodCallsWithParenthesesContext {
public MethodOnlyIdentifierContext methodOnlyIdentifier() {
return getRuleContext(MethodOnlyIdentifierContext.class,0);
}
public MethodCallExpressionContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterMethodCallExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitMethodCallExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitMethodCallExpression(this);
else return visitor.visitChildren(this);
}
}
public static class SuperWithoutParenthesesContext extends MethodCallsWithParenthesesContext {
public TerminalNode SUPER() { return getToken(RubyParser.SUPER, 0); }
public ArgumentListContext argumentList() {
return getRuleContext(ArgumentListContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public SuperWithoutParenthesesContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSuperWithoutParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSuperWithoutParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSuperWithoutParentheses(this);
else return visitor.visitChildren(this);
}
}
public static class IsDefinedCommandContext extends MethodCallsWithParenthesesContext {
public IsDefinedKeywordContext isDefinedKeyword() {
return getRuleContext(IsDefinedKeywordContext.class,0);
}
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public IsDefinedCommandContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIsDefinedCommand(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIsDefinedCommand(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIsDefinedCommand(this);
else return visitor.visitChildren(this);
}
}
public static class SuperWithParenthesesContext extends MethodCallsWithParenthesesContext {
public TerminalNode SUPER() { return getToken(RubyParser.SUPER, 0); }
public ArgumentWithParenthesesContext argumentWithParentheses() {
return getRuleContext(ArgumentWithParenthesesContext.class,0);
}
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
public SuperWithParenthesesContext(MethodCallsWithParenthesesContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSuperWithParentheses(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSuperWithParentheses(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSuperWithParentheses(this);
else return visitor.visitChildren(this);
}
}
public final MethodCallsWithParenthesesContext methodCallsWithParentheses() throws RecognitionException {
MethodCallsWithParenthesesContext _localctx = new MethodCallsWithParenthesesContext(_ctx, getState());
enterRule(_localctx, 74, RULE_methodCallsWithParentheses);
try {
setState(1444);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,185,_ctx) ) {
case 1:
_localctx = new SuperWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(1412);
match(SUPER);
setState(1414);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,180,_ctx) ) {
case 1:
{
setState(1413);
argumentWithParentheses();
}
break;
}
setState(1417);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,181,_ctx) ) {
case 1:
{
setState(1416);
block();
}
break;
}
}
break;
case 2:
_localctx = new SuperWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(1419);
match(SUPER);
setState(1421);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,182,_ctx) ) {
case 1:
{
setState(1420);
argumentList();
}
break;
}
setState(1424);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,183,_ctx) ) {
case 1:
{
setState(1423);
block();
}
break;
}
}
break;
case 3:
_localctx = new IsDefinedExpressionContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(1426);
isDefinedKeyword();
setState(1427);
match(LPAREN);
setState(1428);
expressionOrCommand(0);
setState(1429);
match(RPAREN);
}
break;
case 4:
_localctx = new IsDefinedCommandContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(1431);
isDefinedKeyword();
setState(1432);
primaryValue(0);
}
break;
case 5:
_localctx = new MethodCallExpressionContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(1434);
methodOnlyIdentifier();
}
break;
case 6:
_localctx = new MethodCallWithBlockExpressionContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(1435);
methodIdentifier();
setState(1436);
block();
}
break;
case 7:
_localctx = new MethodCallWithParenthesesExpressionContext(_localctx);
enterOuterAlt(_localctx, 7);
{
setState(1438);
methodIdentifier();
setState(1439);
argumentWithParentheses();
setState(1441);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,184,_ctx) ) {
case 1:
{
setState(1440);
block();
}
break;
}
}
break;
case 8:
_localctx = new MethodCallOrVariableReferenceContext(_localctx);
enterOuterAlt(_localctx, 8);
{
setState(1443);
variableReference();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandOrPrimaryValueClassContext extends ParserRuleContext {
public CommandOrPrimaryValueClassContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandOrPrimaryValueClass; }
public CommandOrPrimaryValueClassContext() { }
public void copyFrom(CommandOrPrimaryValueClassContext ctx) {
super.copyFrom(ctx);
}
}
public static class PrimaryValueCommandOrPrimaryValueClassContext extends CommandOrPrimaryValueClassContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public PrimaryValueCommandOrPrimaryValueClassContext(CommandOrPrimaryValueClassContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValueCommandOrPrimaryValueClass(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValueCommandOrPrimaryValueClass(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValueCommandOrPrimaryValueClass(this);
else return visitor.visitChildren(this);
}
}
public static class CommandCommandOrPrimaryValueClassContext extends CommandOrPrimaryValueClassContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandCommandOrPrimaryValueClassContext(CommandOrPrimaryValueClassContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandCommandOrPrimaryValueClass(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandCommandOrPrimaryValueClass(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandCommandOrPrimaryValueClass(this);
else return visitor.visitChildren(this);
}
}
public final CommandOrPrimaryValueClassContext commandOrPrimaryValueClass() throws RecognitionException {
CommandOrPrimaryValueClassContext _localctx = new CommandOrPrimaryValueClassContext(_ctx, getState());
enterRule(_localctx, 76, RULE_commandOrPrimaryValueClass);
try {
setState(1448);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,186,_ctx) ) {
case 1:
_localctx = new CommandCommandOrPrimaryValueClassContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(1446);
command();
}
break;
case 2:
_localctx = new PrimaryValueCommandOrPrimaryValueClassContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(1447);
primaryValue(0);
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class CommandOrPrimaryValueContext extends ParserRuleContext {
public CommandOrPrimaryValueContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_commandOrPrimaryValue; }
public CommandOrPrimaryValueContext() { }
public void copyFrom(CommandOrPrimaryValueContext ctx) {
super.copyFrom(ctx);
}
}
public static class KeywordAndOrCommandOrPrimaryValueContext extends CommandOrPrimaryValueContext {
public List commandOrPrimaryValue() {
return getRuleContexts(CommandOrPrimaryValueContext.class);
}
public CommandOrPrimaryValueContext commandOrPrimaryValue(int i) {
return getRuleContext(CommandOrPrimaryValueContext.class,i);
}
public TerminalNode AND() { return getToken(RubyParser.AND, 0); }
public TerminalNode OR() { return getToken(RubyParser.OR, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public KeywordAndOrCommandOrPrimaryValueContext(CommandOrPrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterKeywordAndOrCommandOrPrimaryValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitKeywordAndOrCommandOrPrimaryValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitKeywordAndOrCommandOrPrimaryValue(this);
else return visitor.visitChildren(this);
}
}
public static class CommandCommandOrPrimaryValueContext extends CommandOrPrimaryValueContext {
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public CommandCommandOrPrimaryValueContext(CommandOrPrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandCommandOrPrimaryValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandCommandOrPrimaryValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandCommandOrPrimaryValue(this);
else return visitor.visitChildren(this);
}
}
public static class NotCommandOrPrimaryValueContext extends CommandOrPrimaryValueContext {
public TerminalNode NOT() { return getToken(RubyParser.NOT, 0); }
public CommandOrPrimaryValueContext commandOrPrimaryValue() {
return getRuleContext(CommandOrPrimaryValueContext.class,0);
}
public NotCommandOrPrimaryValueContext(CommandOrPrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNotCommandOrPrimaryValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNotCommandOrPrimaryValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNotCommandOrPrimaryValue(this);
else return visitor.visitChildren(this);
}
}
public static class PrimaryValueCommandOrPrimaryValueContext extends CommandOrPrimaryValueContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public PrimaryValueCommandOrPrimaryValueContext(CommandOrPrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValueCommandOrPrimaryValue(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValueCommandOrPrimaryValue(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValueCommandOrPrimaryValue(this);
else return visitor.visitChildren(this);
}
}
public final CommandOrPrimaryValueContext commandOrPrimaryValue() throws RecognitionException {
return commandOrPrimaryValue(0);
}
private CommandOrPrimaryValueContext commandOrPrimaryValue(int _p) throws RecognitionException {
ParserRuleContext _parentctx = _ctx;
int _parentState = getState();
CommandOrPrimaryValueContext _localctx = new CommandOrPrimaryValueContext(_ctx, _parentState);
CommandOrPrimaryValueContext _prevctx = _localctx;
int _startState = 78;
enterRecursionRule(_localctx, 78, RULE_commandOrPrimaryValue, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1455);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,187,_ctx) ) {
case 1:
{
_localctx = new PrimaryValueCommandOrPrimaryValueContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1451);
primaryValue(0);
}
break;
case 2:
{
_localctx = new CommandCommandOrPrimaryValueContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1452);
command();
}
break;
case 3:
{
_localctx = new NotCommandOrPrimaryValueContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1453);
match(NOT);
setState(1454);
commandOrPrimaryValue(2);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(1468);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,189,_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 KeywordAndOrCommandOrPrimaryValueContext(new CommandOrPrimaryValueContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_commandOrPrimaryValue);
setState(1457);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(1458);
_la = _input.LA(1);
if ( !(_la==AND || _la==OR) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(1462);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1459);
match(NL);
}
}
setState(1464);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1465);
commandOrPrimaryValue(2);
}
}
}
setState(1470);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,189,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
unrollRecursionContexts(_parentctx);
}
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 CurlyBracesBlockContext extends BlockContext {
public TerminalNode LCURLY() { return getToken(RubyParser.LCURLY, 0); }
public CompoundStatementContext compoundStatement() {
return getRuleContext(CompoundStatementContext.class,0);
}
public TerminalNode RCURLY() { return getToken(RubyParser.RCURLY, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public BlockParameterContext blockParameter() {
return getRuleContext(BlockParameterContext.class,0);
}
public CurlyBracesBlockContext(BlockContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCurlyBracesBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCurlyBracesBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCurlyBracesBlock(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 RubyParserListener ) ((RubyParserListener)listener).enterDoBlockBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitDoBlockBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitDoBlockBlock(this);
else return visitor.visitChildren(this);
}
}
public final BlockContext block() throws RecognitionException {
BlockContext _localctx = new BlockContext(_ctx, getState());
enterRule(_localctx, 80, RULE_block);
int _la;
try {
int _alt;
setState(1485);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LCURLY:
_localctx = new CurlyBracesBlockContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(1471);
match(LCURLY);
setState(1475);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,190,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1472);
match(NL);
}
}
}
setState(1477);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,190,_ctx);
}
setState(1479);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==BAR) {
{
setState(1478);
blockParameter();
}
}
setState(1481);
compoundStatement();
setState(1482);
match(RCURLY);
}
break;
case DO:
_localctx = new DoBlockBlockContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(1484);
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 DoBlockContext extends ParserRuleContext {
public TerminalNode DO() { return getToken(RubyParser.DO, 0); }
public BodyStatementContext bodyStatement() {
return getRuleContext(BodyStatementContext.class,0);
}
public TerminalNode END() { return getToken(RubyParser.END, 0); }
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
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 RubyParserListener ) ((RubyParserListener)listener).enterDoBlock(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitDoBlock(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitDoBlock(this);
else return visitor.visitChildren(this);
}
}
public final DoBlockContext doBlock() throws RecognitionException {
DoBlockContext _localctx = new DoBlockContext(_ctx, getState());
enterRule(_localctx, 82, RULE_doBlock);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1487);
match(DO);
setState(1491);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1488);
match(NL);
}
}
}
setState(1493);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,193,_ctx);
}
setState(1495);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==BAR) {
{
setState(1494);
blockParameter();
}
}
setState(1497);
bodyStatement();
setState(1498);
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(RubyParser.BAR); }
public TerminalNode BAR(int i) {
return getToken(RubyParser.BAR, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public ParameterListContext parameterList() {
return getRuleContext(ParameterListContext.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 RubyParserListener ) ((RubyParserListener)listener).enterBlockParameter(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBlockParameter(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBlockParameter(this);
else return visitor.visitChildren(this);
}
}
public final BlockParameterContext blockParameter() throws RecognitionException {
BlockParameterContext _localctx = new BlockParameterContext(_ctx, getState());
enterRule(_localctx, 84, RULE_blockParameter);
int _la;
try {
setState(1524);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,198,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1500);
match(BAR);
setState(1504);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1501);
match(NL);
}
}
setState(1506);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1507);
match(BAR);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1508);
match(BAR);
setState(1512);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1509);
match(NL);
}
}
setState(1514);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1515);
parameterList();
setState(1519);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1516);
match(NL);
}
}
setState(1521);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1522);
match(BAR);
}
break;
}
}
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(RubyParser.SEMI); }
public TerminalNode SEMI(int i) {
return getToken(RubyParser.SEMI, i);
}
public List NL() { return getTokens(RubyParser.NL); }
public TerminalNode NL(int i) {
return getToken(RubyParser.NL, i);
}
public TerminalNode THEN() { return getToken(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterThenClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitThenClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitThenClause(this);
else return visitor.visitChildren(this);
}
}
public final ThenClauseContext thenClause() throws RecognitionException {
ThenClauseContext _localctx = new ThenClauseContext(_ctx, getState());
enterRule(_localctx, 86, RULE_thenClause);
int _la;
try {
int _alt;
setState(1537);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,201,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(1527);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(1526);
_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(1529);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,199,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(1531);
compoundStatement();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(1533);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==SEMI || _la==NL) {
{
setState(1532);
_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(1535);
match(THEN);
setState(1536);
compoundStatement();
}
break;
}
}
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(RubyParser.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 RubyParserListener ) ((RubyParserListener)listener).enterElseClause(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitElseClause(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitElseClause(this);
else return visitor.visitChildren(this);
}
}
public final ElseClauseContext elseClause() throws RecognitionException {
ElseClauseContext _localctx = new ElseClauseContext(_ctx, getState());
enterRule(_localctx, 88, RULE_elseClause);
try {
enterOuterAlt(_localctx, 1);
{
setState(1539);
match(ELSE);
setState(1540);
compoundStatement();
}
}
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(RubyParser.ELSIF, 0); }
public ExpressionOrCommandContext expressionOrCommand() {
return getRuleContext(ExpressionOrCommandContext.class,0);
}
public ThenClauseContext thenClause() {
return getRuleContext(ThenClauseContext.class,0);
}
public List