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

public Class ContextSensitivityInfo

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

This class represents profiling event information for a context sensitivity. Context sensitivities are decisions where a particular input resulted in an SLL conflict, but LL prediction produced a single unique alternative.

In some cases, the unique alternative identified by LL prediction is not equal to the minimum represented alternative in the conflicting SLL configuration set. Grammars and inputs which result in this scenario are unable to use PredictionMode#SLL, which in turn means they cannot use the two-stage parsing strategy to improve parsing performance for that input.

Since
4.3
See Also
ParserATNSimulator#reportContextSensitivity, ParserErrorListener#reportContextSensitivity

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
ContextSensitivityInfo(int
The decision number
decision
,
SimulatorState
The final simulator state containing the unique alternative identified by full-context prediction
state
,
TokenStream
The input token stream
input
,
int
The start index for the current prediction
startIndex
,
int
The index at which the context sensitivity was identified during full-context prediction
stopIndex
)

Constructs a new instance of the ContextSensitivityInfo class with the specified detailed context sensitivity information.

Constructor Detail

ContextSensitivityInfoback to summary
public ContextSensitivityInfo(int decision, SimulatorState state, TokenStream input, int startIndex, int stopIndex)

Constructs a new instance of the ContextSensitivityInfo class with the specified detailed context sensitivity information.

Parameters
decision:int

The decision number

state:SimulatorState

The final simulator state containing the unique alternative identified by full-context prediction

input:TokenStream

The input token stream

startIndex:int

The start index for the current prediction

stopIndex:int

The index at which the context sensitivity was identified during full-context prediction