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

public Class DecisionEventInfo

extends Object
Class Inheritance
Known Direct Subclasses
org.antlr.v4.runtime.atn.ErrorInfo, org.antlr.v4.runtime.atn.LookaheadEventInfo, org.antlr.v4.runtime.atn.PredicateEvalInfo, org.antlr.v4.runtime.atn.AmbiguityInfo, org.antlr.v4.runtime.atn.ContextSensitivityInfo
Imports
org.antlr.v4.runtime.TokenStream

This is the base class for gathering detailed information about prediction events which occur during parsing. Note that we could record the parser call stack at the time this event occurred but in the presence of left recursive rules, the stack is kind of meaningless. It's better to look at the individual configurations for their individual stacks. Of course that is a PredictionContext object not a parse tree node and so it does not have information about the extent (start...stop) of the various subtrees. Examining the stack tops of all configurations provide the return states for the rule invocations. From there you can get the enclosing rule.
Since
4.3

Field Summary

Modifier and TypeField and Description
public final ATNConfigSet
configs

The configuration set containing additional information relevant to the prediction state when the current event occurred, or null if no additional information is relevant or available.

public final int
decision

The invoked decision number which this event is related to.

public final boolean
fullCtx

true if the current event occurred during LL prediction; otherwise, false if the input occurred during SLL prediction.

public final TokenStream
input

The input token stream which is being parsed.

public final int
startIndex

The token index in the input stream at which the current prediction was originally invoked.

public final int
stopIndex

The token index in the input stream at which the current event occurred.

Constructor Summary

AccessConstructor and Description
public
DecisionEventInfo(int decision, ATNConfigSet configs, TokenStream input, int startIndex, int stopIndex, boolean fullCtx)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configsback to summary
public final ATNConfigSet configs

The configuration set containing additional information relevant to the prediction state when the current event occurred, or null if no additional information is relevant or available.

decisionback to summary
public final int decision

The invoked decision number which this event is related to.

See Also
ATN#decisionToState
fullCtxback to summary
public final boolean fullCtx

true if the current event occurred during LL prediction; otherwise, false if the input occurred during SLL prediction.

inputback to summary
public final TokenStream input

The input token stream which is being parsed.

startIndexback to summary
public final int startIndex

The token index in the input stream at which the current prediction was originally invoked.

stopIndexback to summary
public final int stopIndex

The token index in the input stream at which the current event occurred.

Constructor Detail

DecisionEventInfoback to summary
public DecisionEventInfo(int decision, ATNConfigSet configs, TokenStream input, int startIndex, int stopIndex, boolean fullCtx)