public enum PredictionMode extends Enum<PredictionMode>
| Enum Constant and Description |
|---|
LL
Full LL(*) that always gets right answer.
|
LL_EXACT_AMBIG_DETECTION
Tell the full LL prediction algorithm to pursue lookahead until
it has uniquely predicted an alternative without conflict or it's
certain that it's found an ambiguous input sequence.
|
SLL
Do only local context prediction (SLL style) and using
heuristic which almost always works but is much faster
than precise answer.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
allSubsetsConflict(Collection<BitSet> altsets) |
static boolean |
allSubsetsEqual(Collection<BitSet> altsets) |
static BitSet |
getAlts(Collection<BitSet> altsets) |
static Collection<BitSet> |
getConflictingAltSubsets(ATNConfigSet configs)
This function gets the conflicting alt subsets from a configuration set.
|
static int |
getSingleViableAlt(Collection<BitSet> altsets) |
static Map<ATNState,BitSet> |
getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
static int |
getUniqueAlt(Collection<BitSet> altsets) |
static boolean |
hasConflictingAltSet(Collection<BitSet> altsets)
return (there exists len(A_i)>1 for some A_i in altsets A)
|
static boolean |
hasNonConflictingAltSet(Collection<BitSet> altsets)
return (there exists len(A_i)==1 for some A_i in altsets A)
|
static boolean |
hasSLLConflictTerminatingPrediction(PredictionMode mode,
ATNConfigSet configs)
SLL prediction termination.
|
static boolean |
hasStateAssociatedWithOneAlt(ATNConfigSet configs) |
static int |
resolvesToJustOneViableAlt(Collection<BitSet> altsets)
Full LL prediction termination.
|
static PredictionMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PredictionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PredictionMode SLL
public static final PredictionMode LL
public static final PredictionMode LL_EXACT_AMBIG_DETECTION
public static PredictionMode[] values()
for (PredictionMode c : PredictionMode.values()) System.out.println(c);
public static PredictionMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static boolean hasSLLConflictTerminatingPrediction(PredictionMode mode, @NotNull ATNConfigSet configs)
public static int resolvesToJustOneViableAlt(Collection<BitSet> altsets)
public static boolean allSubsetsConflict(Collection<BitSet> altsets)
public static boolean hasNonConflictingAltSet(Collection<BitSet> altsets)
public static boolean hasConflictingAltSet(Collection<BitSet> altsets)
public static boolean allSubsetsEqual(Collection<BitSet> altsets)
public static int getUniqueAlt(Collection<BitSet> altsets)
public static BitSet getAlts(Collection<BitSet> altsets)
public static Collection<BitSet> getConflictingAltSubsets(ATNConfigSet configs)
public static Map<ATNState,BitSet> getStateToAltMap(ATNConfigSet configs)
public static boolean hasStateAssociatedWithOneAlt(ATNConfigSet configs)
public static int getSingleViableAlt(Collection<BitSet> altsets)
Copyright © 2012. All Rights Reserved.