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.
src2cpg_3.4.0.81.source-code.RubyParser Maven / Gradle / Ivy
// Generated from /home/runner/work/joern/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,
LBRACK=16, RBRACK=17, LPAREN=18, RPAREN=19, LCURLY=20, RCURLY=21, COLON=22,
COLON2=23, COMMA=24, SEMI=25, DOT=26, DOT2=27, DOT3=28, QMARK=29, EQGT=30,
MINUSGT=31, EMARK=32, EMARKEQ=33, EMARKTILDE=34, AMP=35, AMP2=36, AMPDOT=37,
BAR=38, BAR2=39, EQ=40, EQ2=41, EQ3=42, CARET=43, LTEQGT=44, EQTILDE=45,
GT=46, GTEQ=47, LT=48, LTEQ=49, LT2=50, GT2=51, PLUS=52, MINUS=53, STAR=54,
STAR2=55, SLASH=56, PERCENT=57, TILDE=58, PLUSAT=59, MINUSAT=60, ASSIGNMENT_OPERATOR=61,
SINGLE_QUOTED_STRING_LITERAL=62, DOUBLE_QUOTED_STRING_START=63, QUOTED_NON_EXPANDED_STRING_LITERAL_START=64,
QUOTED_EXPANDED_STRING_LITERAL_START=65, QUOTED_EXPANDED_REGULAR_EXPRESSION_START=66,
QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START=67, QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START=68,
QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START=69, HERE_DOC_IDENTIFIER=70,
HERE_DOC=71, QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START=72, QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START=73,
END_OF_PROGRAM_MARKER=74, DECIMAL_INTEGER_LITERAL=75, BINARY_INTEGER_LITERAL=76,
OCTAL_INTEGER_LITERAL=77, HEXADECIMAL_INTEGER_LITERAL=78, FLOAT_LITERAL_WITHOUT_EXPONENT=79,
FLOAT_LITERAL_WITH_EXPONENT=80, NL=81, WS=82, SYMBOL_LITERAL=83, LOCAL_VARIABLE_IDENTIFIER=84,
LINE__=85, ENCODING__=86, FILE__=87, BEGIN_=88, END_=89, ALIAS=90, AND=91,
BEGIN=92, BREAK=93, CASE=94, CLASS=95, DEF=96, IS_DEFINED=97, DO=98, ELSE=99,
ELSIF=100, END=101, ENSURE=102, FOR=103, FALSE=104, IF=105, IN=106, MODULE=107,
NEXT=108, NIL=109, NOT=110, OR=111, REDO=112, RESCUE=113, RETRY=114, RETURN=115,
SELF=116, SUPER=117, THEN=118, TRUE=119, UNDEF=120, UNLESS=121, UNTIL=122,
WHEN=123, WHILE=124, YIELD=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_bracketedArrayElementList = 24,
RULE_bracketedArrayElement = 25, RULE_indexingArgumentList = 26, RULE_indexingArgument = 27,
RULE_splattingArgument = 28, RULE_operatorExpressionList = 29, RULE_operatorExpressionList2 = 30,
RULE_argumentWithParentheses = 31, RULE_argumentList = 32, RULE_commandArgumentList = 33,
RULE_primaryValueList = 34, RULE_primaryValueListWithAssociation = 35,
RULE_blockArgument = 36, RULE_expressionOrCommand = 37, RULE_operatorExpression = 38,
RULE_primary = 39, RULE_hashLiteral = 40, RULE_primaryValue = 41, RULE_lambdaExpressionParameterList = 42,
RULE_methodCallsWithParentheses = 43, RULE_commandOrPrimaryValueClass = 44,
RULE_commandOrPrimaryValue = 45, RULE_block = 46, RULE_doBlock = 47, RULE_blockParameter = 48,
RULE_blockParameterList = 49, RULE_mandatoryOrOptionalOrGroupedParameterList = 50,
RULE_mandatoryOrOptionalOrGroupedParameter = 51, RULE_mandatoryOrGroupedParameterList = 52,
RULE_mandatoryOrGroupedParameter = 53, RULE_groupedParameterList = 54,
RULE_thenClause = 55, RULE_elseClause = 56, RULE_elsifClause = 57, RULE_whenClause = 58,
RULE_whenArgument = 59, RULE_doClause = 60, RULE_forVariable = 61, RULE_bodyStatement = 62,
RULE_rescueClause = 63, RULE_exceptionClassList = 64, RULE_exceptionVariableAssignment = 65,
RULE_ensureClause = 66, RULE_definedMethodName = 67, RULE_methodParameterPart = 68,
RULE_parameterList = 69, RULE_mandatoryOrOptionalParameterList = 70, RULE_mandatoryParameterList = 71,
RULE_mandatoryOrOptionalParameter = 72, RULE_mandatoryParameter = 73,
RULE_optionalParameter = 74, RULE_optionalParameterName = 75, RULE_arrayParameter = 76,
RULE_hashParameter = 77, RULE_procParameter = 78, RULE_procParameterName = 79,
RULE_classPath = 80, RULE_singletonObject = 81, RULE_variableReference = 82,
RULE_associationList = 83, RULE_association = 84, RULE_associationKey = 85,
RULE_associationHashArgument = 86, RULE_regexpLiteralContent = 87, RULE_singleQuotedString = 88,
RULE_singleOrDoubleQuotedString = 89, RULE_doubleQuotedString = 90, RULE_quotedExpandedExternalCommandString = 91,
RULE_doubleQuotedStringContent = 92, RULE_quotedNonExpandedLiteralString = 93,
RULE_quotedExpandedLiteralString = 94, RULE_quotedExpandedLiteralStringContent = 95,
RULE_quotedNonExpandedArrayElementContent = 96, RULE_quotedExpandedArrayElementContent = 97,
RULE_quotedExpandedArrayElement = 98, RULE_quotedNonExpandedArrayElementList = 99,
RULE_quotedExpandedArrayElementList = 100, RULE_symbol = 101, RULE_hereDoc = 102,
RULE_isDefinedKeyword = 103, RULE_assignmentOperator = 104, RULE_statementModifier = 105,
RULE_variable = 106, RULE_pseudoVariable = 107, RULE_unsignedNumericLiteral = 108,
RULE_unaryOperator = 109, RULE_multiplicativeOperator = 110, RULE_additiveOperator = 111,
RULE_bitwiseShiftOperator = 112, RULE_bitwiseOrOperator = 113, RULE_relationalOperator = 114,
RULE_equalityOperator = 115, RULE_rangeOperator = 116, RULE_keyword = 117;
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", "bracketedArrayElementList",
"bracketedArrayElement", "indexingArgumentList", "indexingArgument",
"splattingArgument", "operatorExpressionList", "operatorExpressionList2",
"argumentWithParentheses", "argumentList", "commandArgumentList", "primaryValueList",
"primaryValueListWithAssociation", "blockArgument", "expressionOrCommand",
"operatorExpression", "primary", "hashLiteral", "primaryValue", "lambdaExpressionParameterList",
"methodCallsWithParentheses", "commandOrPrimaryValueClass", "commandOrPrimaryValue",
"block", "doBlock", "blockParameter", "blockParameterList", "mandatoryOrOptionalOrGroupedParameterList",
"mandatoryOrOptionalOrGroupedParameter", "mandatoryOrGroupedParameterList",
"mandatoryOrGroupedParameter", "groupedParameterList", "thenClause",
"elseClause", "elsifClause", "whenClause", "whenArgument", "doClause",
"forVariable", "bodyStatement", "rescueClause", "exceptionClassList",
"exceptionVariableAssignment", "ensureClause", "definedMethodName", "methodParameterPart",
"parameterList", "mandatoryOrOptionalParameterList", "mandatoryParameterList",
"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, "'['", "']'", "'('", "')'", "'{'", "'}'", "':'",
"'::'", "','", "';'", "'.'", "'..'", "'...'", "'?'", "'=>'", "'->'",
"'!'", "'!='", "'!~'", "'&'", "'&&'", "'&.'", "'|'", "'||'", "'='", "'=='",
"'==='", "'^'", "'<=>'", "'=~'", "'>'", "'>='", "'<'", "'<='", "'<<'",
"'>>'", "'+'", "'-'", "'*'", "'**'", "'/'", "'%'", "'~'", "'+@'", "'-@'",
null, null, null, null, null, null, null, null, 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", "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", "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", "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(236);
compoundStatement();
setState(237);
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(240);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
setState(239);
statements();
}
break;
}
setState(245);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(242);
_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(247);
_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(251);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==SEMI || _la==NL) {
{
{
setState(248);
_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(253);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(254);
statement(0);
setState(263);
_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(256);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(255);
_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(258);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==SEMI || _la==NL );
setState(260);
statement(0);
}
}
}
setState(265);
_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(301);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
case 1:
{
_localctx = new ExpressionOrCommandStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(267);
expressionOrCommand(0);
}
break;
case 2:
{
_localctx = new AliasStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(268);
match(ALIAS);
setState(272);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(269);
match(NL);
}
}
setState(274);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(275);
((AliasStatementContext)_localctx).oldName = definedMethodNameOrSymbol();
setState(276);
((AliasStatementContext)_localctx).newName = definedMethodNameOrSymbol();
}
break;
case 3:
{
_localctx = new UndefStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(278);
match(UNDEF);
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);
definedMethodNameOrSymbol();
setState(296);
_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(286);
match(COMMA);
setState(290);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(287);
match(NL);
}
}
setState(292);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(293);
definedMethodNameOrSymbol();
}
}
}
setState(298);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,8,_ctx);
}
}
break;
case 4:
{
_localctx = new SingleAssignmentStatementStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(299);
singleAssignmentStatement();
}
break;
case 5:
{
_localctx = new MultipleAssignmentStatementStatementContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(300);
multipleAssignmentStatement();
}
break;
}
_ctx.stop = _input.LT(-1);
setState(315);
_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(303);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
setState(304);
statementModifier();
setState(308);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(305);
match(NL);
}
}
setState(310);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(311);
expressionOrCommand(0);
}
}
}
setState(317);
_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(320);
_errHandler.sync(this);
switch (_input.LA(1)) {
case LBRACK:
case EQ2:
case EQ3:
case LTEQGT:
case LT2:
case LOCAL_VARIABLE_IDENTIFIER:
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 CONSTANT_IDENTIFIER:
case ASSIGNMENT_LIKE_METHOD_IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
setState(318);
definedMethodName();
}
break;
case COLON:
case SYMBOL_LITERAL:
enterOuterAlt(_localctx, 2);
{
setState(319);
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(370);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(322);
variable();
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 2:
enterOuterAlt(_localctx, 2);
{
setState(332);
match(COLON2);
setState(333);
match(CONSTANT_IDENTIFIER);
setState(334);
assignmentOperator();
setState(338);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(335);
match(NL);
}
}
setState(340);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(341);
methodInvocationWithoutParentheses();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(343);
primary();
setState(344);
match(LBRACK);
setState(346);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (STAR - 3)) | (1L << (STAR2 - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN_ - 67)) | (1L << (END_ - 67)) | (1L << (ALIAS - 67)) | (1L << (AND - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (DO - 67)) | (1L << (ELSE - 67)) | (1L << (ELSIF - 67)) | (1L << (END - 67)) | (1L << (ENSURE - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (IN - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (NOT - 67)) | (1L << (OR - 67)) | (1L << (REDO - 67)) | (1L << (RESCUE - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (THEN - 67)) | (1L << (TRUE - 67)) | (1L << (UNDEF - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHEN - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(345);
indexingArgumentList();
}
}
setState(348);
match(RBRACK);
setState(349);
assignmentOperator();
setState(353);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(350);
match(NL);
}
}
setState(355);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(356);
methodInvocationWithoutParentheses();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(358);
primary();
setState(359);
_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(360);
methodName();
setState(361);
assignmentOperator();
setState(365);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(362);
match(NL);
}
}
setState(367);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(368);
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(416);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(372);
leftHandSide();
setState(373);
match(EQ);
setState(377);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(374);
match(NL);
}
}
setState(379);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(380);
multipleRightHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(382);
packingLeftHandSide();
setState(383);
match(EQ);
setState(387);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(384);
match(NL);
}
}
setState(389);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(392);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) {
case 1:
{
setState(390);
methodInvocationWithoutParentheses();
}
break;
case 2:
{
setState(391);
operatorExpression(0);
}
break;
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(394);
multipleLeftHandSide();
setState(395);
match(EQ);
setState(399);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(396);
match(NL);
}
}
setState(401);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(402);
multipleRightHandSide();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(404);
multipleLeftHandSideExceptPacking();
setState(405);
match(EQ);
setState(409);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(406);
match(NL);
}
}
setState(411);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(414);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
{
setState(412);
methodInvocationWithoutParentheses();
}
break;
case 2:
{
setState(413);
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(436);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
case 1:
_localctx = new VariableLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(418);
variable();
setState(421);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
{
setState(419);
match(EQ);
setState(420);
primary();
}
break;
}
}
break;
case 2:
_localctx = new IndexingLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(423);
primary();
setState(424);
match(LBRACK);
setState(426);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (STAR - 3)) | (1L << (STAR2 - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN_ - 67)) | (1L << (END_ - 67)) | (1L << (ALIAS - 67)) | (1L << (AND - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (DO - 67)) | (1L << (ELSE - 67)) | (1L << (ELSIF - 67)) | (1L << (END - 67)) | (1L << (ENSURE - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (IN - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (NOT - 67)) | (1L << (OR - 67)) | (1L << (REDO - 67)) | (1L << (RESCUE - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (THEN - 67)) | (1L << (TRUE - 67)) | (1L << (UNDEF - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHEN - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(425);
indexingArgumentList();
}
}
setState(428);
match(RBRACK);
}
break;
case 3:
_localctx = new MemberAccessLeftHandSideContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(430);
primary();
setState(431);
_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(432);
_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(434);
match(COLON2);
setState(435);
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(475);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(441);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(438);
multipleLeftHandSideItem();
setState(439);
match(COMMA);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(443);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,29,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(446);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (REDO - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (TRUE - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(445);
multipleLeftHandSideItem();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(451);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(448);
multipleLeftHandSideItem();
setState(449);
match(COMMA);
}
}
setState(453);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (REDO - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (TRUE - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0) );
setState(456);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==STAR) {
{
setState(455);
packingLeftHandSide();
}
}
setState(468);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
setState(459);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(458);
match(COMMA);
}
}
setState(464);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(461);
match(NL);
}
}
setState(466);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(467);
procParameter();
}
break;
}
setState(471);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(470);
match(COMMA);
}
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(473);
packingLeftHandSide();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(474);
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(498);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(480);
_errHandler.sync(this);
_alt = 1;
do {
switch (_alt) {
case 1:
{
{
setState(477);
multipleLeftHandSideItem();
setState(478);
match(COMMA);
}
}
break;
default:
throw new NoViableAltException(this);
}
setState(482);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,38,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
setState(485);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (REDO - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (TRUE - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(484);
multipleLeftHandSideItem();
}
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(490);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(487);
multipleLeftHandSideItem();
setState(488);
match(COMMA);
}
}
setState(492);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( ((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (REDO - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (TRUE - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0) );
setState(495);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==STAR) {
{
setState(494);
packingLeftHandSide();
}
}
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(497);
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;
enterOuterAlt(_localctx, 1);
{
setState(500);
match(STAR);
setState(502);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (REDO - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (TRUE - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(501);
leftHandSide();
}
}
setState(508);
_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(504);
match(COMMA);
setState(505);
multipleLeftHandSideItem();
}
}
}
setState(510);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,44,_ctx);
}
}
}
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(511);
match(LPAREN);
setState(512);
multipleLeftHandSide();
setState(513);
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(517);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(515);
leftHandSide();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(516);
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 List operatorExpressionList() {
return getRuleContexts(OperatorExpressionListContext.class);
}
public OperatorExpressionListContext operatorExpressionList(int i) {
return getRuleContext(OperatorExpressionListContext.class,i);
}
public List splattingRightHandSide() {
return getRuleContexts(SplattingRightHandSideContext.class);
}
public SplattingRightHandSideContext splattingRightHandSide(int i) {
return getRuleContext(SplattingRightHandSideContext.class,i);
}
public List COMMA() { return getTokens(RubyParser.COMMA); }
public TerminalNode COMMA(int i) {
return getToken(RubyParser.COMMA, i);
}
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 {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(521);
_errHandler.sync(this);
switch (_input.LA(1)) {
case REGULAR_EXPRESSION_START:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case DOT2:
case DOT3:
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 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 GLOBAL_VARIABLE_IDENTIFIER:
case INSTANCE_VARIABLE_IDENTIFIER:
case CLASS_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
{
setState(519);
operatorExpressionList();
}
break;
case STAR:
case STAR2:
{
setState(520);
splattingRightHandSide();
}
break;
default:
throw new NoViableAltException(this);
}
setState(530);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,48,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(523);
match(COMMA);
setState(526);
_errHandler.sync(this);
switch (_input.LA(1)) {
case REGULAR_EXPRESSION_START:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case DOT2:
case DOT3:
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 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 GLOBAL_VARIABLE_IDENTIFIER:
case INSTANCE_VARIABLE_IDENTIFIER:
case CLASS_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
{
setState(524);
operatorExpressionList();
}
break;
case STAR:
case STAR2:
{
setState(525);
splattingRightHandSide();
}
break;
default:
throw new NoViableAltException(this);
}
}
}
}
setState(532);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,48,_ctx);
}
}
}
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(533);
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(538);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,49,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(535);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(536);
match(CONSTANT_IDENTIFIER);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(537);
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(543);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(540);
methodIdentifier();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(541);
keyword();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(542);
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(548);
_errHandler.sync(this);
switch (_input.LA(1)) {
case CONSTANT_IDENTIFIER:
{
setState(545);
match(CONSTANT_IDENTIFIER);
}
break;
case LOCAL_VARIABLE_IDENTIFIER:
{
setState(546);
match(LOCAL_VARIABLE_IDENTIFIER);
}
break;
case LINE__:
case ENCODING__:
case FILE__:
case FALSE:
case NIL:
case SELF:
case TRUE:
{
setState(547);
pseudoVariable();
}
break;
default:
throw new NoViableAltException(this);
}
setState(550);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << QMARK) | (1L << EMARK) | (1L << EQ))) != 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 PrimaryValueListWithAssociationContext primaryValueListWithAssociation() {
return getRuleContext(PrimaryValueListWithAssociationContext.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 PrimaryValueListWithAssociationContext primaryValueListWithAssociation() {
return getRuleContext(PrimaryValueListWithAssociationContext.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(568);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,53,_ctx) ) {
case 1:
_localctx = new CommandMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(552);
command();
}
break;
case 2:
_localctx = new ChainedMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(553);
chainedCommandWithDoBlock();
setState(558);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) {
case 1:
{
setState(554);
_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(555);
methodName();
setState(556);
commandArgumentList();
}
break;
}
}
break;
case 3:
_localctx = new ReturnMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(560);
match(RETURN);
setState(561);
primaryValueListWithAssociation();
}
break;
case 4:
_localctx = new BreakMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(562);
match(BREAK);
setState(563);
primaryValueList();
}
break;
case 5:
_localctx = new NextMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(564);
match(NEXT);
setState(565);
primaryValueList();
}
break;
case 6:
_localctx = new YieldMethodInvocationWithoutParenthesesContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(566);
match(YIELD);
setState(567);
primaryValueListWithAssociation();
}
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 CommandTernaryOperatorExpressionContext extends CommandContext {
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 CommandTernaryOperatorExpressionContext(CommandContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterCommandTernaryOperatorExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitCommandTernaryOperatorExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitCommandTernaryOperatorExpression(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(605);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,58,_ctx) ) {
case 1:
_localctx = new CommandTernaryOperatorExpressionContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(570);
operatorExpression(0);
setState(571);
match(QMARK);
setState(575);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(572);
match(NL);
}
}
setState(577);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(578);
operatorExpression(0);
setState(582);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(579);
match(NL);
}
}
setState(584);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(585);
match(COLON);
setState(589);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(586);
match(NL);
}
}
setState(591);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(592);
operatorExpression(0);
}
break;
case 2:
_localctx = new MemberAccessCommandContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(594);
primary();
setState(596);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==NL) {
{
setState(595);
match(NL);
}
}
setState(598);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << COLON2) | (1L << DOT) | (1L << AMPDOT))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
setState(599);
methodName();
setState(600);
commandArgument();
}
break;
case 3:
_localctx = new SimpleCommandContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(602);
methodIdentifier();
setState(603);
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(609);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) {
case 1:
_localctx = new CommandArgumentCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(607);
commandArgumentList();
}
break;
case 2:
_localctx = new CommandCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(608);
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(611);
commandWithDoBlock();
setState(615);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,60,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(612);
chainedMethodInvocation();
}
}
}
setState(617);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,60,_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(618);
_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(619);
methodName();
setState(621);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) {
case 1:
{
setState(620);
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(637);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(623);
match(SUPER);
setState(624);
argumentList();
setState(625);
doBlock();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(627);
methodIdentifier();
setState(628);
argumentList();
setState(629);
doBlock();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(631);
primary();
setState(632);
_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(633);
methodName();
setState(634);
argumentList();
setState(635);
doBlock();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BracketedArrayElementListContext extends ParserRuleContext {
public List bracketedArrayElement() {
return getRuleContexts(BracketedArrayElementContext.class);
}
public BracketedArrayElementContext bracketedArrayElement(int i) {
return getRuleContext(BracketedArrayElementContext.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 BracketedArrayElementListContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bracketedArrayElementList; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBracketedArrayElementList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBracketedArrayElementList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBracketedArrayElementList(this);
else return visitor.visitChildren(this);
}
}
public final BracketedArrayElementListContext bracketedArrayElementList() throws RecognitionException {
BracketedArrayElementListContext _localctx = new BracketedArrayElementListContext(_ctx, getState());
enterRule(_localctx, 48, RULE_bracketedArrayElementList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(639);
bracketedArrayElement();
setState(652);
_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(641);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(640);
match(COMMA);
}
}
setState(646);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(643);
match(NL);
}
}
setState(648);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(649);
bracketedArrayElement();
}
}
}
setState(654);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,65,_ctx);
}
setState(656);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(655);
match(COMMA);
}
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BracketedArrayElementContext extends ParserRuleContext {
public IndexingArgumentContext indexingArgument() {
return getRuleContext(IndexingArgumentContext.class,0);
}
public CommandContext command() {
return getRuleContext(CommandContext.class,0);
}
public HashLiteralContext hashLiteral() {
return getRuleContext(HashLiteralContext.class,0);
}
public SplattingArgumentContext splattingArgument() {
return getRuleContext(SplattingArgumentContext.class,0);
}
public IndexingArgumentListContext indexingArgumentList() {
return getRuleContext(IndexingArgumentListContext.class,0);
}
public BracketedArrayElementContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_bracketedArrayElement; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBracketedArrayElement(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBracketedArrayElement(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBracketedArrayElement(this);
else return visitor.visitChildren(this);
}
}
public final BracketedArrayElementContext bracketedArrayElement() throws RecognitionException {
BracketedArrayElementContext _localctx = new BracketedArrayElementContext(_ctx, getState());
enterRule(_localctx, 50, RULE_bracketedArrayElement);
try {
setState(663);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,67,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(658);
indexingArgument();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(659);
command();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
setState(660);
hashLiteral();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
setState(661);
splattingArgument();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
setState(662);
indexingArgumentList();
}
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 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 IndexingArgumentIndexingArgumentListContext extends IndexingArgumentListContext {
public List indexingArgument() {
return getRuleContexts(IndexingArgumentContext.class);
}
public IndexingArgumentContext indexingArgument(int i) {
return getRuleContext(IndexingArgumentContext.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 IndexingArgumentIndexingArgumentListContext(IndexingArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterIndexingArgumentIndexingArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitIndexingArgumentIndexingArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitIndexingArgumentIndexingArgumentList(this);
else return visitor.visitChildren(this);
}
}
public static class SplattingArgumentIndexingArgumentListContext extends IndexingArgumentListContext {
public List splattingArgument() {
return getRuleContexts(SplattingArgumentContext.class);
}
public SplattingArgumentContext splattingArgument(int i) {
return getRuleContext(SplattingArgumentContext.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 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, 52, RULE_indexingArgumentList);
int _la;
try {
int _alt;
setState(707);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) {
case 1:
_localctx = new OperatorExpressionListIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(665);
operatorExpressionList();
setState(667);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) {
case 1:
{
setState(666);
match(COMMA);
}
break;
}
}
break;
case 2:
_localctx = new OperatorExpressionListWithSplattingArgumentIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(669);
operatorExpressionList();
setState(670);
match(COMMA);
setState(671);
splattingArgument();
}
break;
case 3:
_localctx = new IndexingArgumentIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(673);
indexingArgument();
setState(686);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,71,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(675);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(674);
match(COMMA);
}
}
setState(680);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(677);
match(NL);
}
}
setState(682);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(683);
indexingArgument();
}
}
}
setState(688);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,71,_ctx);
}
}
break;
case 4:
_localctx = new AssociationListIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(689);
associationList();
setState(691);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,72,_ctx) ) {
case 1:
{
setState(690);
match(COMMA);
}
break;
}
}
break;
case 5:
_localctx = new SplattingArgumentIndexingArgumentListContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(693);
splattingArgument();
setState(704);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,74,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(694);
match(COMMA);
setState(698);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(695);
match(NL);
}
}
setState(700);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(701);
splattingArgument();
}
}
}
setState(706);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,74,_ctx);
}
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class IndexingArgumentContext extends ParserRuleContext {
public IndexingArgumentContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_indexingArgument; }
public IndexingArgumentContext() { }
public void copyFrom(IndexingArgumentContext ctx) {
super.copyFrom(ctx);
}
}
public static class SymbolIndexingArgumentContext extends IndexingArgumentContext {
public SymbolContext symbol() {
return getRuleContext(SymbolContext.class,0);
}
public SymbolIndexingArgumentContext(IndexingArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterSymbolIndexingArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitSymbolIndexingArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitSymbolIndexingArgument(this);
else return visitor.visitChildren(this);
}
}
public static class NumericLiteralIndexingArgumentContext extends IndexingArgumentContext {
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 NumericLiteralIndexingArgumentContext(IndexingArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterNumericLiteralIndexingArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitNumericLiteralIndexingArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitNumericLiteralIndexingArgument(this);
else return visitor.visitChildren(this);
}
}
public static class AssociationIndexingArgumentContext extends IndexingArgumentContext {
public AssociationContext association() {
return getRuleContext(AssociationContext.class,0);
}
public AssociationIndexingArgumentContext(IndexingArgumentContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterAssociationIndexingArgument(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitAssociationIndexingArgument(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitAssociationIndexingArgument(this);
else return visitor.visitChildren(this);
}
}
public final IndexingArgumentContext indexingArgument() throws RecognitionException {
IndexingArgumentContext _localctx = new IndexingArgumentContext(_ctx, getState());
enterRule(_localctx, 54, RULE_indexingArgument);
int _la;
try {
setState(715);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) {
case 1:
_localctx = new SymbolIndexingArgumentContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(709);
symbol();
}
break;
case 2:
_localctx = new AssociationIndexingArgumentContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(710);
association();
}
break;
case 3:
_localctx = new NumericLiteralIndexingArgumentContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(712);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PLUS || _la==MINUS) {
{
setState(711);
((NumericLiteralIndexingArgumentContext)_localctx).sign = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==PLUS || _la==MINUS) ) {
((NumericLiteralIndexingArgumentContext)_localctx).sign = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
}
}
setState(714);
unsignedNumericLiteral();
}
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, 56, RULE_splattingArgument);
try {
setState(721);
_errHandler.sync(this);
switch (_input.LA(1)) {
case STAR:
enterOuterAlt(_localctx, 1);
{
setState(717);
match(STAR);
setState(718);
operatorExpression(0);
}
break;
case STAR2:
enterOuterAlt(_localctx, 2);
{
setState(719);
match(STAR2);
setState(720);
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, 58, RULE_operatorExpressionList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(723);
operatorExpression(0);
setState(734);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,80,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(724);
match(COMMA);
setState(728);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(725);
match(NL);
}
}
setState(730);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(731);
operatorExpression(0);
}
}
}
setState(736);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,80,_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, 60, RULE_operatorExpressionList2);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
setState(737);
operatorExpression(0);
setState(746);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
setState(738);
match(COMMA);
setState(742);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(739);
match(NL);
}
}
setState(744);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(745);
operatorExpression(0);
}
}
setState(748);
_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, 62, RULE_argumentWithParentheses);
int _la;
try {
int _alt;
setState(832);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) {
case 1:
_localctx = new EmptyArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(750);
match(LPAREN);
setState(754);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,83,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(751);
match(NL);
}
}
}
setState(756);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,83,_ctx);
}
setState(758);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(757);
match(COMMA);
}
}
setState(763);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(760);
match(NL);
}
}
setState(765);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(766);
match(RPAREN);
}
break;
case 2:
_localctx = new ArgumentListArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(767);
match(LPAREN);
setState(771);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(768);
match(NL);
}
}
setState(773);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(774);
argumentList();
setState(776);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(775);
match(COMMA);
}
}
setState(781);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(778);
match(NL);
}
}
setState(783);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(784);
match(RPAREN);
}
break;
case 3:
_localctx = new OperatorExpressionsAndChainedCommandWithBlockArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(786);
match(LPAREN);
setState(790);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(787);
match(NL);
}
}
setState(792);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(793);
operatorExpressionList();
setState(794);
match(COMMA);
setState(798);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(795);
match(NL);
}
}
setState(800);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(801);
chainedCommandWithDoBlock();
setState(803);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(802);
match(COMMA);
}
}
setState(808);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(805);
match(NL);
}
}
setState(810);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(811);
match(RPAREN);
}
break;
case 4:
_localctx = new ChainedCommandWithDoBlockArgumentWithParenthesesContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(813);
match(LPAREN);
setState(817);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(814);
match(NL);
}
}
setState(819);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(820);
chainedCommandWithDoBlock();
setState(822);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(821);
match(COMMA);
}
}
setState(827);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(824);
match(NL);
}
}
setState(829);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(830);
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 ArrayArgumentListContext extends ArgumentListContext {
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 ArrayArgumentListContext(ArgumentListContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterArrayArgumentList(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitArrayArgumentList(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitArrayArgumentList(this);
else return visitor.visitChildren(this);
}
}
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, 64, RULE_argumentList);
int _la;
try {
setState(914);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,112,_ctx) ) {
case 1:
_localctx = new BlockArgumentArgumentListContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(834);
blockArgument();
}
break;
case 2:
_localctx = new SplattingArgumentArgumentListContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(835);
splattingArgument();
setState(844);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,98,_ctx) ) {
case 1:
{
setState(836);
match(COMMA);
setState(840);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(837);
match(NL);
}
}
setState(842);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(843);
blockArgument();
}
break;
}
setState(854);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,100,_ctx) ) {
case 1:
{
setState(846);
match(COMMA);
setState(850);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(847);
match(NL);
}
}
setState(852);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(853);
operatorExpressionList();
}
break;
}
}
break;
case 3:
_localctx = new OperatorsArgumentListContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(856);
operatorExpressionList();
setState(865);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) {
case 1:
{
setState(857);
match(COMMA);
setState(861);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(858);
match(NL);
}
}
setState(863);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(864);
associationList();
}
break;
}
setState(875);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) {
case 1:
{
setState(867);
match(COMMA);
setState(871);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(868);
match(NL);
}
}
setState(873);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(874);
splattingArgument();
}
break;
}
setState(885);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) {
case 1:
{
setState(877);
match(COMMA);
setState(881);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(878);
match(NL);
}
}
setState(883);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(884);
blockArgument();
}
break;
}
}
break;
case 4:
_localctx = new AssociationsArgumentListContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(887);
associationList();
setState(896);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,108,_ctx) ) {
case 1:
{
setState(888);
match(COMMA);
setState(892);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(889);
match(NL);
}
}
setState(894);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(895);
splattingArgument();
}
break;
}
setState(906);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,110,_ctx) ) {
case 1:
{
setState(898);
match(COMMA);
setState(902);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(899);
match(NL);
}
}
setState(904);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(905);
blockArgument();
}
break;
}
}
break;
case 5:
_localctx = new ArrayArgumentListContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(908);
match(LBRACK);
setState(910);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (STAR - 3)) | (1L << (STAR2 - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN_ - 67)) | (1L << (END_ - 67)) | (1L << (ALIAS - 67)) | (1L << (AND - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (DO - 67)) | (1L << (ELSE - 67)) | (1L << (ELSIF - 67)) | (1L << (END - 67)) | (1L << (ENSURE - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (IN - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (NOT - 67)) | (1L << (OR - 67)) | (1L << (REDO - 67)) | (1L << (RESCUE - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (THEN - 67)) | (1L << (TRUE - 67)) | (1L << (UNDEF - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHEN - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(909);
indexingArgumentList();
}
}
setState(912);
match(RBRACK);
}
break;
case 6:
_localctx = new SingleCommandArgumentListContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(913);
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, 66, RULE_commandArgumentList);
int _la;
try {
setState(928);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(916);
associationList();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(917);
primaryValueList();
setState(926);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,114,_ctx) ) {
case 1:
{
setState(918);
match(COMMA);
setState(922);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(919);
match(NL);
}
}
setState(924);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(925);
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, 68, RULE_primaryValueList);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(930);
primaryValue(0);
setState(941);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,117,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(931);
match(COMMA);
setState(935);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(932);
match(NL);
}
}
setState(937);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(938);
primaryValue(0);
}
}
}
setState(943);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,117,_ctx);
}
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class PrimaryValueListWithAssociationContext extends ParserRuleContext {
public List primaryValue() {
return getRuleContexts(PrimaryValueContext.class);
}
public PrimaryValueContext primaryValue(int i) {
return getRuleContext(PrimaryValueContext.class,i);
}
public List association() {
return getRuleContexts(AssociationContext.class);
}
public AssociationContext association(int i) {
return getRuleContext(AssociationContext.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 MethodInvocationWithoutParenthesesContext methodInvocationWithoutParentheses() {
return getRuleContext(MethodInvocationWithoutParenthesesContext.class,0);
}
public PrimaryValueListWithAssociationContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_primaryValueListWithAssociation; }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValueListWithAssociation(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValueListWithAssociation(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValueListWithAssociation(this);
else return visitor.visitChildren(this);
}
}
public final PrimaryValueListWithAssociationContext primaryValueListWithAssociation() throws RecognitionException {
PrimaryValueListWithAssociationContext _localctx = new PrimaryValueListWithAssociationContext(_ctx, getState());
enterRule(_localctx, 70, RULE_primaryValueListWithAssociation);
int _la;
try {
int _alt;
setState(965);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
setState(946);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,118,_ctx) ) {
case 1:
{
setState(944);
primaryValue(0);
}
break;
case 2:
{
setState(945);
association();
}
break;
}
setState(961);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,121,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(948);
match(COMMA);
setState(952);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(949);
match(NL);
}
}
setState(954);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(957);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) {
case 1:
{
setState(955);
primaryValue(0);
}
break;
case 2:
{
setState(956);
association();
}
break;
}
}
}
}
setState(963);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,121,_ctx);
}
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
setState(964);
methodInvocationWithoutParentheses();
}
break;
}
}
catch (RecognitionException re) {
_localctx.exception = re;
_errHandler.reportError(this, re);
_errHandler.recover(this, re);
}
finally {
exitRule();
}
return _localctx;
}
public static class BlockArgumentContext extends ParserRuleContext {
public TerminalNode AMP() { return getToken(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, 72, RULE_blockArgument);
try {
enterOuterAlt(_localctx, 1);
{
setState(967);
match(AMP);
setState(969);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) {
case 1:
{
setState(968);
operatorExpression(0);
}
break;
}
}
}
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 = 74;
enterRecursionRule(_localctx, 74, RULE_expressionOrCommand, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(985);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,126,_ctx) ) {
case 1:
{
_localctx = new OperatorExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(972);
operatorExpression(0);
}
break;
case 2:
{
_localctx = new CommandExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(974);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) {
case 1:
{
setState(973);
match(EMARK);
}
break;
}
setState(976);
methodInvocationWithoutParentheses();
}
break;
case 3:
{
_localctx = new NotExpressionOrCommandContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(977);
match(NOT);
setState(981);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(978);
match(NL);
}
}
setState(983);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(984);
expressionOrCommand(2);
}
break;
}
_ctx.stop = _input.LT(-1);
setState(998);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,128,_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(987);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(988);
((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(992);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(989);
match(NL);
}
}
setState(994);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(995);
((KeywordAndOrExpressionOrCommandContext)_localctx).rhs = expressionOrCommand(2);
}
}
}
setState(1000);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,128,_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 = 76;
enterRecursionRule(_localctx, 76, RULE_operatorExpression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
_localctx = new PrimaryOperatorExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
setState(1002);
primary();
}
_ctx.stop = _input.LT(-1);
setState(1030);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,132,_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(1004);
if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)");
setState(1005);
match(QMARK);
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);
operatorExpression(0);
setState(1016);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1013);
match(NL);
}
}
setState(1018);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1019);
match(COLON);
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);
operatorExpression(2);
}
}
}
setState(1032);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,132,_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, 78, RULE_primary);
try {
setState(1039);
_errHandler.sync(this);
switch (_input.LA(1)) {
case RETURN:
_localctx = new ReturnWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 1);
{
setState(1033);
match(RETURN);
}
break;
case BREAK:
_localctx = new BreakWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 2);
{
setState(1034);
match(BREAK);
}
break;
case NEXT:
_localctx = new NextWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 3);
{
setState(1035);
match(NEXT);
}
break;
case REDO:
_localctx = new RedoWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 4);
{
setState(1036);
match(REDO);
}
break;
case RETRY:
_localctx = new RetryWithoutArgumentsContext(_localctx);
enterOuterAlt(_localctx, 5);
{
setState(1037);
match(RETRY);
}
break;
case REGULAR_EXPRESSION_START:
case LBRACK:
case LPAREN:
case LCURLY:
case COLON:
case COLON2:
case DOT2:
case DOT3:
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 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 GLOBAL_VARIABLE_IDENTIFIER:
case INSTANCE_VARIABLE_IDENTIFIER:
case CLASS_VARIABLE_IDENTIFIER:
case CONSTANT_IDENTIFIER:
_localctx = new PrimaryValuePrimaryContext(_localctx);
enterOuterAlt(_localctx, 6);
{
setState(1038);
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 HashLiteralContext extends ParserRuleContext {
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(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_hashLiteral; }
@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 final HashLiteralContext hashLiteral() throws RecognitionException {
HashLiteralContext _localctx = new HashLiteralContext(_ctx, getState());
enterRule(_localctx, 80, RULE_hashLiteral);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
setState(1041);
match(LCURLY);
setState(1045);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,134,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
setState(1042);
match(NL);
}
}
}
setState(1047);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,134,_ctx);
}
setState(1052);
_errHandler.sync(this);
_la = _input.LA(1);
if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (REGULAR_EXPRESSION_START - 3)) | (1L << (LBRACK - 3)) | (1L << (LPAREN - 3)) | (1L << (LCURLY - 3)) | (1L << (COLON - 3)) | (1L << (COLON2 - 3)) | (1L << (DOT2 - 3)) | (1L << (DOT3 - 3)) | (1L << (MINUSGT - 3)) | (1L << (EMARK - 3)) | (1L << (PLUS - 3)) | (1L << (MINUS - 3)) | (1L << (STAR2 - 3)) | (1L << (TILDE - 3)) | (1L << (SINGLE_QUOTED_STRING_LITERAL - 3)) | (1L << (DOUBLE_QUOTED_STRING_START - 3)) | (1L << (QUOTED_NON_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_STRING_LITERAL_START - 3)) | (1L << (QUOTED_EXPANDED_REGULAR_EXPRESSION_START - 3)))) != 0) || ((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (QUOTED_EXPANDED_EXTERNAL_COMMAND_LITERAL_START - 67)) | (1L << (QUOTED_NON_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_STRING_ARRAY_LITERAL_START - 67)) | (1L << (HERE_DOC - 67)) | (1L << (QUOTED_NON_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (QUOTED_EXPANDED_SYMBOL_ARRAY_LITERAL_START - 67)) | (1L << (DECIMAL_INTEGER_LITERAL - 67)) | (1L << (BINARY_INTEGER_LITERAL - 67)) | (1L << (OCTAL_INTEGER_LITERAL - 67)) | (1L << (HEXADECIMAL_INTEGER_LITERAL - 67)) | (1L << (FLOAT_LITERAL_WITHOUT_EXPONENT - 67)) | (1L << (FLOAT_LITERAL_WITH_EXPONENT - 67)) | (1L << (SYMBOL_LITERAL - 67)) | (1L << (LOCAL_VARIABLE_IDENTIFIER - 67)) | (1L << (LINE__ - 67)) | (1L << (ENCODING__ - 67)) | (1L << (FILE__ - 67)) | (1L << (BEGIN_ - 67)) | (1L << (END_ - 67)) | (1L << (ALIAS - 67)) | (1L << (AND - 67)) | (1L << (BEGIN - 67)) | (1L << (BREAK - 67)) | (1L << (CASE - 67)) | (1L << (CLASS - 67)) | (1L << (DEF - 67)) | (1L << (IS_DEFINED - 67)) | (1L << (DO - 67)) | (1L << (ELSE - 67)) | (1L << (ELSIF - 67)) | (1L << (END - 67)) | (1L << (ENSURE - 67)) | (1L << (FOR - 67)) | (1L << (FALSE - 67)) | (1L << (IF - 67)) | (1L << (IN - 67)) | (1L << (MODULE - 67)) | (1L << (NEXT - 67)) | (1L << (NIL - 67)) | (1L << (NOT - 67)) | (1L << (OR - 67)) | (1L << (REDO - 67)) | (1L << (RESCUE - 67)) | (1L << (RETRY - 67)) | (1L << (RETURN - 67)) | (1L << (SELF - 67)) | (1L << (SUPER - 67)) | (1L << (THEN - 67)) | (1L << (TRUE - 67)) | (1L << (UNDEF - 67)) | (1L << (UNLESS - 67)) | (1L << (UNTIL - 67)) | (1L << (WHEN - 67)) | (1L << (WHILE - 67)) | (1L << (YIELD - 67)) | (1L << (GLOBAL_VARIABLE_IDENTIFIER - 67)) | (1L << (INSTANCE_VARIABLE_IDENTIFIER - 67)) | (1L << (CLASS_VARIABLE_IDENTIFIER - 67)) | (1L << (CONSTANT_IDENTIFIER - 67)))) != 0)) {
{
setState(1048);
associationList();
setState(1050);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==COMMA) {
{
setState(1049);
match(COMMA);
}
}
}
}
setState(1057);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==NL) {
{
{
setState(1054);
match(NL);
}
}
setState(1059);
_errHandler.sync(this);
_la = _input.LA(1);
}
setState(1060);
match(RCURLY);
}
}
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 BoundedRangeExpressionContext 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 BoundedRangeExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBoundedRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBoundedRangeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBoundedRangeExpression(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 TerminalNode RETURN() { return getToken(RubyParser.RETURN, 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 BracketedArrayElementListContext bracketedArrayElementList() {
return getRuleContext(BracketedArrayElementListContext.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 LambdaExpressionParameterListContext lambdaExpressionParameterList() {
return getRuleContext(LambdaExpressionParameterListContext.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 BeginlessRangeExpressionContext extends PrimaryValueContext {
public RangeOperatorContext rangeOperator() {
return getRuleContext(RangeOperatorContext.class,0);
}
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public BeginlessRangeExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterBeginlessRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitBeginlessRangeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitBeginlessRangeExpression(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 EndlessRangeExpressionContext extends PrimaryValueContext {
public PrimaryValueContext primaryValue() {
return getRuleContext(PrimaryValueContext.class,0);
}
public RangeOperatorContext rangeOperator() {
return getRuleContext(RangeOperatorContext.class,0);
}
public EndlessRangeExpressionContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterEndlessRangeExpression(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitEndlessRangeExpression(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitEndlessRangeExpression(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 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 PrimaryValueHashLiteralContext extends PrimaryValueContext {
public HashLiteralContext hashLiteral() {
return getRuleContext(HashLiteralContext.class,0);
}
public PrimaryValueHashLiteralContext(PrimaryValueContext ctx) { copyFrom(ctx); }
@Override
public void enterRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).enterPrimaryValueHashLiteral(this);
}
@Override
public void exitRule(ParseTreeListener listener) {
if ( listener instanceof RubyParserListener ) ((RubyParserListener)listener).exitPrimaryValueHashLiteral(this);
}
@Override
public T accept(ParseTreeVisitor extends T> visitor) {
if ( visitor instanceof RubyParserVisitor ) return ((RubyParserVisitor extends T>)visitor).visitPrimaryValueHashLiteral(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 TerminalNode RETURN() { return getToken(RubyParser.RETURN, 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