Package org.antlr.v4.tool
Class GrammarInterpreterRuleContext
- java.lang.Object
-
- org.antlr.v4.runtime.RuleContext
-
- org.antlr.v4.runtime.ParserRuleContext
-
- org.antlr.v4.runtime.InterpreterRuleContext
-
- org.antlr.v4.tool.GrammarInterpreterRuleContext
-
- All Implemented Interfaces:
ParseTree
,RuleNode
,SyntaxTree
,Tree
public class GrammarInterpreterRuleContext extends InterpreterRuleContext
AnInterpreterRuleContext
that knows which alternative for a rule was matched.- Since:
- 4.5.1
- See Also:
GrammarParserInterpreter
-
-
Field Summary
Fields Modifier and Type Field Description protected int
outerAltNum
-
Fields inherited from class org.antlr.v4.runtime.InterpreterRuleContext
ruleIndex
-
Fields inherited from class org.antlr.v4.runtime.ParserRuleContext
children, EMPTY, exception, start, stop
-
Fields inherited from class org.antlr.v4.runtime.RuleContext
invokingState, parent
-
-
Constructor Summary
Constructors Constructor Description GrammarInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAltNumber()
int
getOuterAltNum()
The predicted outermost alternative for the rule associated with this context object.void
setAltNumber(int altNumber)
void
setOuterAltNum(int outerAltNum)
-
Methods inherited from class org.antlr.v4.runtime.InterpreterRuleContext
getRuleIndex
-
Methods inherited from class org.antlr.v4.runtime.ParserRuleContext
addAnyChild, addChild, addChild, addChild, addErrorNode, addErrorNode, copyFrom, enterRule, exitRule, getChild, getChild, getChildCount, getParent, getRuleContext, getRuleContexts, getSourceInterval, getStart, getStop, getToken, getTokens, removeLastChild, toInfoString
-
Methods inherited from class org.antlr.v4.runtime.RuleContext
accept, depth, getPayload, getRuleContext, getText, isEmpty, setParent, toString, toString, toString, toString, toString, toStringTree, toStringTree, toStringTree
-
-
-
-
Constructor Detail
-
GrammarInterpreterRuleContext
public GrammarInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)
-
-
Method Detail
-
getOuterAltNum
public int getOuterAltNum()
The predicted outermost alternative for the rule associated with this context object. If this node left recursive, the true original outermost alternative is returned.
-
setOuterAltNum
public void setOuterAltNum(int outerAltNum)
-
getAltNumber
public int getAltNumber()
- Overrides:
getAltNumber
in classRuleContext
-
setAltNumber
public void setAltNumber(int altNumber)
- Overrides:
setAltNumber
in classRuleContext
-
-