DecisionInfo class

This class contains profiling gathered for a particular decision.

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.

@since 4.3

Constructors

DecisionInfo(int decision)
Constructs a new instance of the DecisionInfo class to contain statistics for a particular decision.

Properties

ambiguities List<AmbiguityInfo>
A collection of AmbiguityInfo instances describing the ambiguities encountered during LL prediction for this decision.
final
contextSensitivities List<ContextSensitivityInfo>
A collection of ContextSensitivityInfo instances describing the context sensitivities encountered during LL prediction for this decision.
final
decision int
The decision number, which is an index into {@link ATN#decisionToState}.
final
errors List<ErrorInfo>
A collection of ErrorInfo instances describing the parse errors identified during calls to {@link ParserATNSimulator#adaptivePredict} for this decision.
final
hashCode int
The hash code for this object.
no setterinherited
invocations int
The total number of times {@link ParserATNSimulator#adaptivePredict} was invoked for this decision.
getter/setter pair
LL_ATNTransitions int
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.
getter/setter pair
LL_DFATransitions int
The total number of DFA transitions required during LL prediction for this decision.
getter/setter pair
LL_Fallback int
Gets the total number of times SLL prediction completed in a conflict state, resulting in fallback to LL prediction.
getter/setter pair
LL_MaxLook int
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.
getter/setter pair
LL_MaxLookEvent LookaheadEventInfo?
Gets the LookaheadEventInfo associated with the event where the {@link #LL_MaxLook} value was set.
getter/setter pair
LL_MinLook int
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.
getter/setter pair
LL_TotalLook int
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.
getter/setter pair
predicateEvals List<PredicateEvalInfo>
A collection of PredicateEvalInfo instances describing the results of evaluating individual predicates during prediction for this decision.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
SLL_ATNTransitions int
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.
getter/setter pair
SLL_DFATransitions int
The total number of DFA transitions required during SLL prediction for this decision.
getter/setter pair
SLL_MaxLook int
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.
getter/setter pair
SLL_MaxLookEvent LookaheadEventInfo?
Gets the LookaheadEventInfo associated with the event where the {@link #SLL_MaxLook} value was set.
getter/setter pair
SLL_MinLook int
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.
getter/setter pair
SLL_TotalLook int
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.
getter/setter pair
timeInPrediction int
The total time spent in {@link ParserATNSimulator#adaptivePredict} for this decision, in nanoseconds.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited