Package org.antlr.v4.runtime.atn
Class PredicateEvalInfo
- java.lang.Object
-
- org.antlr.v4.runtime.atn.DecisionEventInfo
-
- org.antlr.v4.runtime.atn.PredicateEvalInfo
-
public class PredicateEvalInfo extends DecisionEventInfo
This class represents profiling event information for semantic predicate evaluations which occur during prediction.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
evalResult
The result of evaluating the semantic contextsemctx
.int
predictedAlt
The alternative number for the decision which is guarded by the semantic contextsemctx
.SemanticContext
semctx
The semantic context which was evaluated.-
Fields inherited from class org.antlr.v4.runtime.atn.DecisionEventInfo
configs, decision, fullCtx, input, startIndex, stopIndex
-
-
Constructor Summary
Constructors Constructor Description PredicateEvalInfo(int decision, TokenStream input, int startIndex, int stopIndex, SemanticContext semctx, boolean evalResult, int predictedAlt, boolean fullCtx)
Constructs a new instance of thePredicateEvalInfo
class with the specified detailed predicate evaluation information.
-
-
-
Field Detail
-
semctx
public final SemanticContext semctx
The semantic context which was evaluated.
-
predictedAlt
public final int predictedAlt
The 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 evalResult
The result of evaluating the semantic contextsemctx
.
-
-
Constructor Detail
-
PredicateEvalInfo
public PredicateEvalInfo(int decision, TokenStream input, int startIndex, int stopIndex, SemanticContext semctx, boolean evalResult, int predictedAlt, boolean fullCtx)
Constructs a new instance of thePredicateEvalInfo
class with the specified detailed predicate evaluation information.- Parameters:
decision
- 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
. SeepredictedAlt
for more information.fullCtx
-true
if the semantic context was evaluated during LL prediction; otherwise,false
if the semantic context was evaluated during SLL prediction- See Also:
ParserATNSimulator.evalSemanticContext(SemanticContext, ParserRuleContext, int, boolean)
,SemanticContext.eval(Recognizer, RuleContext)
-
-