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

public Class GrammarInterpreterRuleContext

extends InterpreterRuleContext
Class Inheritance
Imports
org.antlr.v4.runtime.InterpreterRuleContext, .ParserRuleContext

An InterpreterRuleContext that knows which alternative for a rule was matched.
Since
4.5.1
See Also
GrammarParserInterpreter

Field Summary

Modifier and TypeField and Description
protected int
Inherited from org.antlr.v4.runtime.InterpreterRuleContext:
ruleIndex

Constructor Summary

AccessConstructor and Description
public
GrammarInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)

Method Summary

Modifier and TypeMethod and Description
public int
getAltNumber()

Overrides org.antlr.v4.runtime.RuleContext.getAltNumber.

For rule associated with this parse tree internal node, return the outer alternative number used to match the input.
public int
getOuterAltNum()

The predicted outermost alternative for the rule associated with this context object.

public void
setAltNumber(int altNumber)

Overrides org.antlr.v4.runtime.RuleContext.setAltNumber.

Set the outer alternative number for this context node.
public void
setOuterAltNum(int outerAltNum)

Inherited from org.antlr.v4.runtime.InterpreterRuleContext:
getRuleIndex

Field Detail

outerAltNumback to summary
protected int outerAltNum

Constructor Detail

GrammarInterpreterRuleContextback to summary
public GrammarInterpreterRuleContext(ParserRuleContext parent, int invokingStateNumber, int ruleIndex)

Method Detail

getAltNumberback to summary
public int getAltNumber()

Overrides org.antlr.v4.runtime.RuleContext.getAltNumber.

Doc from org.antlr.v4.runtime.RuleContext.getAltNumber.

For rule associated with this parse tree internal node, return the outer alternative number used to match the input. Default implementation does not compute nor store this alt num. Create a subclass of ParserRuleContext with backing field and set option contextSuperClass. to set it.

Annotations
@Override
getOuterAltNumback to summary
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.

setAltNumberback to summary
public void setAltNumber(int altNumber)

Overrides org.antlr.v4.runtime.RuleContext.setAltNumber.

Doc from org.antlr.v4.runtime.RuleContext.setAltNumber.

Set the outer alternative number for this context node. Default implementation does nothing to avoid backing field overhead for trees that don't need it. Create a subclass of ParserRuleContext with backing field and set option contextSuperClass.

Annotations
@Override
setOuterAltNumback to summary
public void setOuterAltNum(int outerAltNum)