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.
| Modifier and Type | Field and Description |
|---|---|
| private final int | ruleIndex
This is the backing field for |
| Access | Constructor and Description |
|---|---|
| public | InterpreterRuleContext(ParserRuleContext
The parent context. parent, int The invoking state number. invokingStateNumber, int The rule index for the current context. ruleIndex)Constructs a new |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| ruleIndex | back to summary |
|---|---|
| private final int ruleIndex This is the backing field for | |
| InterpreterRuleContext | back to summary |
|---|---|
| public InterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex) Constructs a new
| |
| InterpreterRuleContext | back to summary |
|---|---|
| private InterpreterRuleContext(int ruleIndex) | |
| getRuleIndex | back to summary |
|---|---|
| public int getRuleIndex() Overrides org.
| |