public class ArrayPredictionContext extends PredictionContext
| Modifier and Type | Field and Description |
|---|---|
PredictionContext[] |
parents
Parent can be null only if full ctx mode and we make an array
from
PredictionContext.EMPTY and non-empty. |
int[] |
returnStates
Sorted for merge, no duplicates; if present,
PredictionContext.EMPTY_RETURN_STATE is always last. |
cachedHashCode, EMPTY, EMPTY_RETURN_STATE, globalNodeCount, id| Constructor and Description |
|---|
ArrayPredictionContext(PredictionContext[] parents,
int[] returnStates) |
ArrayPredictionContext(SingletonPredictionContext a) |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
calculateHashCode(PredictionContext[] parents,
int[] returnStates) |
protected static int |
calculateParentHashCode(PredictionContext[] parents) |
protected static int |
calculateReturnStatesHashCode(int[] returnStates) |
boolean |
equals(Object o) |
PredictionContext |
getParent(int index) |
int |
getReturnState(int index) |
boolean |
isEmpty()
This means only the
PredictionContext.EMPTY context is in set. |
Iterator<SingletonPredictionContext> |
iterator() |
int |
size() |
String |
toString() |
calculateHashCode, combineCommonParents, compareTo, fromRuleContext, getAllContextNodes_, getAllContextNodes, getCachedContext, hasEmptyPath, hashCode, merge, mergeArrays, mergeRoot, mergeSingletons, toDOTString, toString, toString, toStrings, toStringspublic final PredictionContext[] parents
PredictionContext.EMPTY and non-empty. We merge PredictionContext.EMPTY by using null parent and
returnState == PredictionContext.EMPTY_RETURN_STATE.public final int[] returnStates
PredictionContext.EMPTY_RETURN_STATE is always last.public ArrayPredictionContext(SingletonPredictionContext a)
public ArrayPredictionContext(PredictionContext[] parents, int[] returnStates)
protected static int calculateHashCode(PredictionContext[] parents, int[] returnStates)
protected static int calculateParentHashCode(PredictionContext[] parents)
protected static int calculateReturnStatesHashCode(int[] returnStates)
public Iterator<SingletonPredictionContext> iterator()
iterator in interface Iterable<SingletonPredictionContext>iterator in class PredictionContextpublic boolean isEmpty()
PredictionContextPredictionContext.EMPTY context is in set.isEmpty in class PredictionContextpublic int size()
size in class PredictionContextpublic PredictionContext getParent(int index)
getParent in class PredictionContextpublic int getReturnState(int index)
getReturnState in class PredictionContextCopyright © 1992-2013 ANTLR. All Rights Reserved.