Package org.antlr.v4.runtime.atn
Class PredicateEvalInfo
java.lang.Object
org.antlr.v4.runtime.atn.DecisionEventInfo
org.antlr.v4.runtime.atn.PredicateEvalInfo
This class represents profiling event information for semantic predicate
evaluations which occur during prediction.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanThe result of evaluating the semantic contextsemctx.final intThe alternative number for the decision which is guarded by the semantic contextsemctx.final SemanticContextThe semantic context which was evaluated.Fields inherited from class org.antlr.v4.runtime.atn.DecisionEventInfo
decision, fullCtx, input, startIndex, state, stopIndex -
Constructor Summary
ConstructorsConstructorDescriptionPredicateEvalInfo(SimulatorState state, int decision, TokenStream input, int startIndex, int stopIndex, SemanticContext semctx, boolean evalResult, int predictedAlt) Constructs a new instance of thePredicateEvalInfoclass with the specified detailed predicate evaluation information. -
Method Summary
-
Field Details
-
semctx
The semantic context which was evaluated. -
predictedAlt
public final int predictedAltThe alternative number for the decision which is guarded by the semantic contextsemctx. Note that other ATN configurations may predict the same alternative which are guarded by other semantic contexts and/orSemanticContext.NONE. -
evalResult
public final boolean evalResultThe result of evaluating the semantic contextsemctx.
-
-
Constructor Details
-
PredicateEvalInfo
public PredicateEvalInfo(@NotNull SimulatorState state, int decision, @NotNull TokenStream input, int startIndex, int stopIndex, @NotNull SemanticContext semctx, boolean evalResult, int predictedAlt) Constructs a new instance of thePredicateEvalInfoclass with the specified detailed predicate evaluation information.- Parameters:
state- The simulator statedecision- The decision numberinput- The input token streamstartIndex- The start index for the current predictionstopIndex- The index at which the predicate evaluation was triggered. Note that the input stream may be reset to other positions for the actual evaluation of individual predicates.semctx- The semantic context which was evaluatedevalResult- The results of evaluating the semantic contextpredictedAlt- The alternative number for the decision which is guarded by the semantic contextsemctx. SeepredictedAltfor more information.- See Also:
-