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 |
---|---|
boolean |
equals(Object o) |
PredictionContext |
getParent(int index) |
int |
getReturnState(int index) |
boolean |
isEmpty()
This means only the
PredictionContext.EMPTY context is in set. |
int |
size() |
String |
toString() |
calculateEmptyHashCode, calculateHashCode, calculateHashCode, combineCommonParents, fromRuleContext, getAllContextNodes_, getAllContextNodes, getCachedContext, hasEmptyPath, hashCode, merge, mergeArrays, mergeRoot, mergeSingletons, toDOTString, toString, toString, toStrings, toStrings
public 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)
public boolean isEmpty()
PredictionContext
PredictionContext.EMPTY
context is in set.isEmpty
in class PredictionContext
public int size()
size
in class PredictionContext
public PredictionContext getParent(int index)
getParent
in class PredictionContext
public int getReturnState(int index)
getReturnState
in class PredictionContext
public boolean equals(Object o)
equals
in class PredictionContext
Copyright © 1992-2013 ANTLR. All Rights Reserved.