DecisionInfo

This class contains profiling gathered for a particular decision.

<p> Parsing performance in ANTLR 4 is heavily influenced by both static factors (e.g. the form of the rules in the grammar) and dynamic factors (e.g. the choice of input and the state of the DFA cache at the time profiling operations are started). For best results, gather and use aggregate statistics from a large sample of inputs representing the inputs expected in production before using the results to make changes in the grammar.</p>

@since 4.3

Constructors

this
this(int decision)

Constructs a new instance of the {@link DecisionInfo} class to contain statistics for a particular decision.

Members

Functions

toString
string toString()

@uml @override

Variables

LL_ATNTransitions
long LL_ATNTransitions;

The total number of ATN transitions required during LL prediction for this decision. An ATN transition is determined by the number of times the DFA does not contain an edge that is required for prediction, resulting in on-the-fly computation of that edge.

LL_DFATransitions
long LL_DFATransitions;

The total number of DFA transitions required during LL prediction for this decision.

LL_Fallback
long LL_Fallback;

Gets the total number of times SLL prediction completed in a conflict state, resulting in fallback to LL prediction.

LL_MaxLook
long LL_MaxLook;

Gets the maximum lookahead required for any single LL prediction to complete for this decision. An LL prediction completes when the algorithm reaches a unique prediction, a conflict state (for {@link PredictionMode#LL}, an ambiguity state (for {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.

LL_MaxLookEvent
LookaheadEventInfo LL_MaxLookEvent;
Undocumented in source.
LL_MinLook
long LL_MinLook;

Gets the minimum lookahead required for any single LL prediction to complete for this decision. An LL prediction completes when the algorithm reaches a unique prediction, a conflict state (for {@link PredictionMode#LL}, an ambiguity state (for {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error.

LL_TotalLook
long LL_TotalLook;

The sum of the lookahead required for LL prediction for this decision. Note that LL prediction is only used when SLL prediction reaches a conflict state.

SLL_ATNTransitions
long SLL_ATNTransitions;

The total number of ATN transitions required during SLL prediction for this decision. An ATN transition is determined by the number of times the DFA does not contain an edge that is required for prediction, resulting in on-the-fly computation of that edge.

SLL_DFATransitions
long SLL_DFATransitions;

The total number of DFA transitions required during SLL prediction for this decision.

SLL_MaxLook
long SLL_MaxLook;

Gets the maximum lookahead required for any single SLL prediction to complete for this decision, by reaching a unique prediction, reaching an SLL conflict state, or encountering a syntax error.

SLL_MaxLookEvent
LookaheadEventInfo SLL_MaxLookEvent;

Gets the {@link LookaheadEventInfo} associated with the event where the {@link #SLL_MaxLook} value was set.

SLL_MinLook
long SLL_MinLook;

Gets the minimum lookahead required for any single SLL prediction to complete for this decision, by reaching a unique prediction, reaching an SLL conflict state, or encountering a syntax error.

SLL_TotalLook
long SLL_TotalLook;

The sum of the lookahead required for SLL prediction for this decision. Note that SLL prediction is used before LL prediction for performance reasons even when {@link PredictionMode#LL} or {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used.

ambiguities
AmbiguityInfo[] ambiguities;
Undocumented in source.
contextSensitivities
ContextSensitivityInfo[] contextSensitivities;
Undocumented in source.
decision
int decision;

@uml The decision number, which is an index into {@link ATN#decisionToState}.

errors
ErrorInfo[] errors;
Undocumented in source.
invocations
long invocations;
Undocumented in source.
predicateEvals
PredicateEvalInfo[] predicateEvals;
Undocumented in source.
timeInPrediction
long timeInPrediction;

The total time spent in {@link ParserATNSimulator#adaptivePredict} for this decision, in nanoseconds.

Meta