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

public Class PredicateEvalInfo

extends DecisionEventInfo
Class Inheritance
Imports
org.antlr.v4.runtime.ParserRuleContext, .Recognizer, .RuleContext, .TokenStream

This class represents profiling event information for semantic predicate evaluations which occur during prediction.
Since
4.3
See Also
ParserATNSimulator#evalSemanticContext

Field Summary

Modifier and TypeField and Description
public final boolean
evalResult

The result of evaluating the semantic context semctx.

public final int
predictedAlt

The alternative number for the decision which is guarded by the semantic context semctx.

public final SemanticContext
semctx

The semantic context which was evaluated.

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

Constructor Summary

AccessConstructor and Description
public
PredicateEvalInfo(int
The decision number
decision
,
TokenStream
The input token stream
input
,
int
The start index for the current prediction
startIndex
,
int
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.
stopIndex
,
SemanticContext
The semantic context which was evaluated
semctx
,
boolean
The results of evaluating the semantic context
evalResult
,
int
The alternative number for the decision which is guarded by the semantic context semctx. See predictedAlt for more information.
predictedAlt
,
boolean
true if the semantic context was evaluated during LL prediction; otherwise, false if the semantic context was evaluated during SLL prediction
fullCtx
)

Constructs a new instance of the PredicateEvalInfo class with the specified detailed predicate evaluation information.

Field Detail

evalResultback to summary
public final boolean evalResult

The result of evaluating the semantic context semctx.

predictedAltback to summary
public final int predictedAlt

The alternative number for the decision which is guarded by the semantic context semctx. Note that other ATN configurations may predict the same alternative which are guarded by other semantic contexts and/or SemanticContext#NONE.

semctxback to summary
public final SemanticContext semctx

The semantic context which was evaluated.

Constructor Detail

PredicateEvalInfoback to summary
public PredicateEvalInfo(int decision, TokenStream input, int startIndex, int stopIndex, SemanticContext semctx, boolean evalResult, int predictedAlt, boolean fullCtx)

Constructs a new instance of the PredicateEvalInfo class with the specified detailed predicate evaluation information.

Parameters
decision:int

The decision number

input:TokenStream

The input token stream

startIndex:int

The start index for the current prediction

stopIndex:int

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:SemanticContext

The semantic context which was evaluated

evalResult:boolean

The results of evaluating the semantic context

predictedAlt:int

The alternative number for the decision which is guarded by the semantic context semctx. See predictedAlt for more information.

fullCtx:boolean

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)