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

public Class LookaheadEventInfo

extends DecisionEventInfo
Class Inheritance
Imports
org.antlr.v4.runtime.TokenStream, org.antlr.v4.runtime.misc.NotNull, .Nullable

This class represents profiling event information for tracking the lookahead depth required in order to make a prediction.
Since
4.3

Field Summary

Modifier and TypeField and Description
public final int
predictedAlt

The alternative chosen by adaptivePredict(), not necessarily the outermost alt shown for a rule; left-recursive rules have user-level alts that differ from the rewritten rule with a (...) block and a (..)* loop.

Inherited from org.antlr.v4.runtime.atn.DecisionEventInfo:
decisionfullCtxinputstartIndexstatestopIndex

Constructor Summary

AccessConstructor and Description
public
LookaheadEventInfo(int
The decision number
decision
,
SimulatorState
The final simulator state containing the necessary information to determine the result of a prediction, or null if the final state is not available
state
,
int predictedAlt, TokenStream
The input token stream
input
,
int
The start index for the current prediction
startIndex
,
int
The index at which the prediction was finally made
stopIndex
,
boolean
true if the current lookahead is part of an LL prediction; otherwise, false if the current lookahead is part of an SLL prediction
fullCtx
)

Constructs a new instance of the LookaheadEventInfo class with the specified detailed lookahead information.

Field Detail

predictedAltback to summary
public final int predictedAlt

The alternative chosen by adaptivePredict(), not necessarily the outermost alt shown for a rule; left-recursive rules have user-level alts that differ from the rewritten rule with a (...) block and a (..)* loop.

Constructor Detail

LookaheadEventInfoback to summary
public LookaheadEventInfo(int decision, SimulatorState state, int predictedAlt, TokenStream input, int startIndex, int stopIndex, boolean fullCtx)

Constructs a new instance of the LookaheadEventInfo class with the specified detailed lookahead information.

Parameters
decision:int

The decision number

state:SimulatorState

The final simulator state containing the necessary information to determine the result of a prediction, or null if the final state is not available

input:TokenStream

The input token stream

startIndex:int

The start index for the current prediction

stopIndex:int

The index at which the prediction was finally made

fullCtx:boolean

true if the current lookahead is part of an LL prediction; otherwise, false if the current lookahead is part of an SLL prediction