Class InterpreterRuleContext
java.lang.Object
org.graalvm.shadowed.org.antlr.v4.runtime.RuleContext
org.graalvm.shadowed.org.antlr.v4.runtime.ParserRuleContext
org.graalvm.shadowed.org.antlr.v4.runtime.InterpreterRuleContext
- All Implemented Interfaces:
ParseTree,RuleNode,SyntaxTree,Tree
This class extends
ParserRuleContext by allowing the value of
getRuleIndex() to be explicitly set for the context.
ParserRuleContext does not include field storage for the rule index
since the context classes created by the code generator override the
getRuleIndex() method to return the correct value for that context.
Since the parser interpreter does not use the context classes generated for a
parser, this class (with slightly more memory overhead per node) is used to
provide equivalent functionality.
-
Field Summary
FieldsFields inherited from class org.graalvm.shadowed.org.antlr.v4.runtime.ParserRuleContext
children, EMPTY, exception, start, stopFields inherited from class org.graalvm.shadowed.org.antlr.v4.runtime.RuleContext
invokingState, parent -
Constructor Summary
ConstructorsConstructorDescriptionInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex) Constructs a newInterpreterRuleContextwith the specified parent, invoking state, and rule index. -
Method Summary
Methods inherited from class org.graalvm.shadowed.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, toInfoStringMethods inherited from class org.graalvm.shadowed.org.antlr.v4.runtime.RuleContext
accept, depth, getAltNumber, getPayload, getRuleContext, getText, isEmpty, setAltNumber, setParent, toString, toString, toString, toString, toString, toStringTree, toStringTree, toStringTree
-
Field Details
-
ruleIndex
protected int ruleIndexThis is the backing field forgetRuleIndex().
-
-
Constructor Details
-
InterpreterRuleContext
public InterpreterRuleContext() -
InterpreterRuleContext
Constructs a newInterpreterRuleContextwith the specified parent, invoking state, and rule index.- Parameters:
parent- The parent context.invokingStateNumber- The invoking state number.ruleIndex- The rule index for the current context.
-
-
Method Details
-
getRuleIndex
public int getRuleIndex()- Overrides:
getRuleIndexin classRuleContext
-