PredictionModeExtension extension
Static Methods
-
allConfigsInRuleStopStates(
ATNConfigSet configs) → bool -
Checks if all configurations in
configs
are in a RuleStopState. Configurations meeting this condition have reached the end of the decision rule (local context) or end of start rule (full context). -
allSubsetsConflict(
List< BitSet> altsets) → bool -
Determines if every alternative subset in
altsets
contains more than one alternative. -
allSubsetsEqual(
List< BitSet> altsets) → bool -
Determines if every alternative subset in
altsets
is equivalent. -
getAlts(
List< BitSet> altsets) → BitSet -
Gets the complete set of represented alternatives for a collection of
alternative subsets. This method returns the union of each
BitSet
inaltsets
. -
getAltsFromConfigs(
ATNConfigSet configs) → BitSet - Get union of all alts from configs.
-
getConflictingAltSubsets(
ATNConfigSet configs) → List< BitSet> -
This function gets the conflicting alt subsets from a configuration set.
For each configuration
c
inconfigs
: -
getSingleViableAlt(
List< BitSet> altsets) → int -
getStateToAltMap(
ATNConfigSet configs) → Map< ATNState, BitSet> -
Get a map from state to alt subset from a configuration set. For each
configuration
c
inconfigs
: -
getUniqueAlt(
List< BitSet> altsets) → int -
Returns the unique alternative predicted by all alternative subsets in
altsets
. If no such alternative exists, this method returns {@link ATN#INVALID_ALT_NUMBER}. -
hasConfigInRuleStopState(
ATNConfigSet configs) → bool -
Checks if any configuration in
configs
is in a RuleStopState. Configurations meeting this condition have reached the end of the decision rule (local context) or end of start rule (full context). -
hasConflictingAltSet(
List< BitSet> altsets) → bool -
Determines if any single alternative subset in
altsets
contains more than one alternative. -
hasNonConflictingAltSet(
List< BitSet> altsets) → bool -
Determines if any single alternative subset in
altsets
contains exactly one alternative. -
hasSLLConflictTerminatingPrediction(
PredictionMode mode, ATNConfigSet configs) → bool - Computes the SLL prediction termination condition.
-
hasStateAssociatedWithOneAlt(
ATNConfigSet configs) → bool -
resolvesToJustOneViableAlt(
List< BitSet> altsets) → int - Full LL prediction termination.