C# Class Antlr4.Runtime.InterpreterRuleContext

This class extends ParserRuleContext by allowing the value of RuleIndex() 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 RuleIndex() 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.

Inheritance: ParserRuleContext
Show file Open project: antlr/antlr4 Class Usage Examples

Public Methods

Method Description
InterpreterRuleContext ( ParserRuleContext parent, int invokingStateNumber, int ruleIndex ) : Antlr4.Runtime

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

Method Details

InterpreterRuleContext() public method

Constructs a new InterpreterRuleContext with the specified parent, invoking state, and rule index.
public InterpreterRuleContext ( ParserRuleContext parent, int invokingStateNumber, int ruleIndex ) : Antlr4.Runtime
parent ParserRuleContext The parent context.
invokingStateNumber int The invoking state number.
ruleIndex int The rule index for the current context.
return Antlr4.Runtime