- EMPTY
EmptyPredictionContext EMPTY;
Represents {@code $} in local context prediction, which means wildcard.
{@code *+x = *}.
- EMPTY_RETURN_STATE
enum int EMPTY_RETURN_STATE;
Represents {@code $} in an array in full context mode, when {@code $}
doesn't mean wildcard: {@code $ + x = [$,x]}. Here,
{@code $} = {@link #EMPTY_RETURN_STATE}.
- INITIAL_HASH
enum int INITIAL_HASH;
Undocumented in source.
- globalNodeCount
int globalNodeCount;
- id
int id;
Undocumented in source.
- fromRuleContext
PredictionContext fromRuleContext(ATN atn, RuleContext outerContext)
Undocumented in source. Be warned that the author may not have intended to support it.
- size
size_t size()
Undocumented in source.
- getParent
PredictionContext getParent(int index)
Undocumented in source.
- getReturnState
int getReturnState(int index)
Undocumented in source.
- isEmpty
bool isEmpty()
@uml
This means only the {@link #EMPTY} context is in set.
- hasEmptyPath
bool hasEmptyPath()
Undocumented in source. Be warned that the author may not have intended to support it.
- toHash
size_t toHash()
@uml
@safe
@nothrow
@override
- opEquals
bool opEquals(Object obj)
- calculateEmptyHashCode
size_t calculateEmptyHashCode()
Undocumented in source. Be warned that the author may not have intended to support it.
- calculateHashCode
size_t calculateHashCode(PredictionContext parent, int returnState)
Undocumented in source. Be warned that the author may not have intended to support it.
- calculateHashCode
size_t calculateHashCode(PredictionContext[] parents, int[] returnStates)
Undocumented in source. Be warned that the author may not have intended to support it.
- merge
PredictionContext merge(PredictionContext a, PredictionContext b, bool rootIsWildcard, DoubleKeyMap!(PredictionContext, PredictionContext, PredictionContext) mergeCache)
Undocumented in source.
- mergeSingletons
PredictionContext mergeSingletons(SingletonPredictionContext a, SingletonPredictionContext b, bool rootIsWildcard, DoubleKeyMap!(PredictionContext, PredictionContext, PredictionContext) mergeCache)
@uml
Merge two {@link SingletonPredictionContext} instances.
- mergeRoot
PredictionContext mergeRoot(SingletonPredictionContext a, SingletonPredictionContext b, bool rootIsWildcard)
Handle case where at least one of {@code a} or {@code b} is
{@link #EMPTY}. In the following diagrams, the symbol {@code $} is used
to represent {@link #EMPTY}.
- mergeArrays
PredictionContext mergeArrays(ArrayPredictionContext a, ArrayPredictionContext b, bool rootIsWildcard, DoubleKeyMap!(PredictionContext, PredictionContext, PredictionContext) mergeCache)
Merge two {@link ArrayPredictionContext} instances.
*
<p>Different tops, different parents.<br>
<embed src="images/ArrayMerge_DiffTopDiffPar.svg" type="image/svg+xml"/></p>
- combineCommonParents
void combineCommonParents(PredictionContext[] parents)
Make pass over all <em>M</em> {@code parents}; merge any {@code equals()}
ones.
- toDOTString
string toDOTString(PredictionContext context)
Undocumented in source. Be warned that the author may not have intended to support it.
- getCachedContext
PredictionContext getCachedContext(PredictionContext context, PredictionContextCache contextCache, PredictionContext[PredictionContext] visited)
- getAllContextNodes
PredictionContext[] getAllContextNodes(PredictionContext context)
recursive version of Sam's getAllNodes()
- getAllContextNodes_
void getAllContextNodes_(PredictionContext context, PredictionContext[] nodes, PredictionContext[PredictionContext] visited)
Undocumented in source. Be warned that the author may not have intended to support it.
- toStrings
string[] toStrings(InterfaceRecognizer recognizer, int currentState)
Undocumented in source. Be warned that the author may not have intended to support it.
- toStrings
string[] toStrings(InterfaceRecognizer recognizer, PredictionContext stop, int currentState)
Undocumented in source. Be warned that the author may not have intended to support it.
Array of prediction contexts