Top Description Fields Constructors Methods
org.antlr.v4.runtime

public Class InterpreterRuleContext

extends ParserRuleContext
Class Inheritance

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

Modifier and TypeField and Description
protected int
ruleIndex

This is the backing field for getRuleIndex.

Inherited from org.antlr.v4.runtime.ParserRuleContext:
childrenEMPTYexceptionstartstop

Constructor Summary

AccessConstructor and Description
public
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 InterpreterRuleContext with the specified parent, invoking state, and rule index.

Method Summary

Modifier and TypeMethod and Description
public int
Inherited from org.antlr.v4.runtime.ParserRuleContext:
addAnyChildaddChildaddChildaddChildaddErrorNodeaddErrorNodecopyFromenterRuleexitRulegetChildgetChildgetChildCountgetParentgetRuleContextgetRuleContextsgetSourceIntervalgetStartgetStopgetTokengetTokensremoveLastChildtoInfoString

Field Detail

ruleIndexback to summary
protected int ruleIndex

This is the backing field for getRuleIndex.

Constructor Detail

InterpreterRuleContextback to summary
public InterpreterRuleContext()
InterpreterRuleContextback to summary
public InterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)

Constructs a new InterpreterRuleContext with the specified parent, invoking state, and rule index.

Parameters
parent:ParserRuleContext

The parent context.

invokingStateNumber:int

The invoking state number.

ruleIndex:int

The rule index for the current context.

Method Detail

getRuleIndexback to summary
public int getRuleIndex()

Overrides org.antlr.v4.runtime.RuleContext.getRuleIndex.

Annotations
@Override