| Modifier and Type | Field and Description |
|---|---|
| public final int | cachedHashCode
Stores the computed hash code of this |
| public static final int | EMPTY_RETURN_STATE
Represents |
| private static final AtomicInteger | |
| public final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static int | |
| protected static int | |
| protected static int | |
| protected static void | combineCommonParents(PredictionContext[] parents)
Make pass over all M |
| public abstract boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public static PredictionContext | fromRuleContext(ATN atn, RuleContext outerContext)
Convert a |
| public static List | |
| public static void | getAllContextNodes_(PredictionContext context, List<PredictionContext> nodes, Map<PredictionContext, PredictionContext> visited)
|
| public static PredictionContext | getCachedContext(PredictionContext context, PredictionContextCache contextCache, IdentityHashMap<PredictionContext, PredictionContext> visited)
|
| public abstract PredictionContext | |
| public abstract int | |
| public boolean | |
| public final int | |
| public boolean | |
| public static PredictionContext | merge(PredictionContext a, PredictionContext b, boolean rootIsWildcard, DoubleKeyMap<PredictionContext, PredictionContext, PredictionContext> mergeCache)
|
| public static PredictionContext | mergeArrays(ArrayPredictionContext a, ArrayPredictionContext b, boolean rootIsWildcard, DoubleKeyMap<PredictionContext, PredictionContext, PredictionContext> mergeCache)
Merge two |
| public static PredictionContext | mergeRoot(SingletonPredictionContext
the first a, SingletonPredictionContext SingletonPredictionContextthe second b, boolean SingletonPredictionContexttrue if this is a local-context merge,
otherwise false to indicate a full-context mergeHandle case where at least one of |
| public static PredictionContext | mergeSingletons(SingletonPredictionContext
the first a, SingletonPredictionContext SingletonPredictionContextthe second b, boolean SingletonPredictionContexttrue if this is a local-context merge,
otherwise false to indicate a full-context mergeMerge two |
| public abstract int | |
| public static String | |
| public String | |
| public String[] | |
| public String[] |
| cachedHashCode | back to summary |
|---|---|
| public final int cachedHashCode Stores the computed hash code of this
private int referenceHashCode() {
int hash =
| |
| EMPTY_RETURN_STATE | back to summary |
|---|---|
| public static final int EMPTY_RETURN_STATE Represents | |
| globalNodeCount | back to summary |
|---|---|
| private static final AtomicInteger globalNodeCount | |
| id | back to summary |
|---|---|
| public final int id | |
| INITIAL_HASH | back to summary |
|---|---|
| private static final int INITIAL_HASH | |
| PredictionContext | back to summary |
|---|---|
| protected PredictionContext(int cachedHashCode) | |
| calculateEmptyHashCode | back to summary |
|---|---|
| protected static int calculateEmptyHashCode() | |
| calculateHashCode | back to summary |
|---|---|
| protected static int calculateHashCode(PredictionContext parent, int returnState) | |
| calculateHashCode | back to summary |
|---|---|
| protected static int calculateHashCode(PredictionContext[] parents, int[] returnStates) | |
| combineCommonParents | back to summary |
|---|---|
| protected static void combineCommonParents(PredictionContext[] parents) Make pass over all M | |
| equals | back to summary |
|---|---|
| public abstract boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fromRuleContext | back to summary |
|---|---|
| public static PredictionContext fromRuleContext(ATN atn, RuleContext outerContext) Convert a | |
| getAllContextNodes | back to summary |
|---|---|
| public static List | |
| getAllContextNodes_ | back to summary |
|---|---|
| public static void getAllContextNodes_(PredictionContext context, List<PredictionContext> nodes, Map<PredictionContext, PredictionContext> visited) | |
| getCachedContext | back to summary |
|---|---|
| public static PredictionContext getCachedContext(PredictionContext context, PredictionContextCache contextCache, IdentityHashMap<PredictionContext, PredictionContext> visited) | |
| getParent | back to summary |
|---|---|
| public abstract PredictionContext getParent(int index) | |
| getReturnState | back to summary |
|---|---|
| public abstract int getReturnState(int index) | |
| hasEmptyPath | back to summary |
|---|---|
| public boolean hasEmptyPath() | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() This means only the | |
| merge | back to summary |
|---|---|
| public static PredictionContext merge(PredictionContext a, PredictionContext b, boolean rootIsWildcard, DoubleKeyMap<PredictionContext, PredictionContext, PredictionContext> mergeCache) | |
| mergeArrays | back to summary |
|---|---|
| public static PredictionContext mergeArrays(ArrayPredictionContext a, ArrayPredictionContext b, boolean rootIsWildcard, DoubleKeyMap<PredictionContext, PredictionContext, PredictionContext> mergeCache) Merge two Different tops, different parents. Shared top, same parents. Shared top, different parents. Shared top, all shared parents. Equal tops, merge parents and reduce top to
| |
| mergeRoot | back to summary |
|---|---|
| public static PredictionContext mergeRoot(SingletonPredictionContext a, SingletonPredictionContext b, boolean rootIsWildcard) Handle case where at least one of Local-Context MergesThese local-context merge operations are used when
Special case of last merge if local context. Full-Context MergesThese full-context merge operations are used when Must keep all contexts;
| |
| mergeSingletons | back to summary |
|---|---|
| public static PredictionContext mergeSingletons(SingletonPredictionContext a, SingletonPredictionContext b, boolean rootIsWildcard, DoubleKeyMap<PredictionContext, PredictionContext, PredictionContext> mergeCache) Merge two Stack tops equal, parents merge is same; return left graph. Same stack top, parents differ; merge parents giving array node, then
remainders of those graphs. A new root node is created to point to the
merged parents. Different stack tops pointing to same parent. Make array node for the
root where both element in the root point to the same (original)
parent. Different stack tops pointing to different parents. Make array node for
the root where each element points to the corresponding original
parent.
| |
| size | back to summary |
|---|---|
| public abstract int size() | |
| toDOTString | back to summary |
|---|---|
| public static String toDOTString(PredictionContext context) | |
| toString | back to summary |
|---|---|
| public String toString(Recognizer<?, ?> recog) | |
| toStrings | back to summary |
|---|---|
| public String[] toStrings(Recognizer<?, ?> recognizer, int currentState) | |
| toStrings | back to summary |
|---|---|
| public String[] toStrings(Recognizer<?, ?> recognizer, PredictionContext stop, int currentState) | |