Package org.antlr.v4.runtime.atn
Class ArrayPredictionContext
java.lang.Object
org.antlr.v4.runtime.atn.PredictionContext
org.antlr.v4.runtime.atn.ArrayPredictionContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal PredictionContext[]
Parent can be null only if full ctx mode and we make an array fromParserRuleContext.EMPTY
and non-empty.final int[]
Sorted for merge, no duplicates; if present,PredictionContext.EMPTY_RETURN_STATE
is always last.Fields inherited from class org.antlr.v4.runtime.atn.PredictionContext
cachedHashCode, EMPTY_RETURN_STATE, id
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getParent
(int index) int
getReturnState
(int index) boolean
isEmpty()
This means only theEmptyPredictionContext.Instance
(wildcard? not sure) context is in set.int
size()
toString()
Methods inherited from class org.antlr.v4.runtime.atn.PredictionContext
calculateEmptyHashCode, calculateHashCode, calculateHashCode, combineCommonParents, fromRuleContext, getAllContextNodes, getAllContextNodes_, getCachedContext, hasEmptyPath, hashCode, merge, mergeArrays, mergeRoot, mergeSingletons, toDOTString, toString, toStrings, toStrings
-
Field Details
-
parents
Parent can be null only if full ctx mode and we make an array fromParserRuleContext.EMPTY
and non-empty. We mergeParserRuleContext.EMPTY
by using null parent and returnState ==PredictionContext.EMPTY_RETURN_STATE
. -
returnStates
public final int[] returnStatesSorted for merge, no duplicates; if present,PredictionContext.EMPTY_RETURN_STATE
is always last.
-
-
Constructor Details
-
ArrayPredictionContext
-
ArrayPredictionContext
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from class:PredictionContext
This means only theEmptyPredictionContext.Instance
(wildcard? not sure) context is in set.- Overrides:
isEmpty
in classPredictionContext
-
size
public int size()- Specified by:
size
in classPredictionContext
-
getParent
- Specified by:
getParent
in classPredictionContext
-
getReturnState
public int getReturnState(int index) - Specified by:
getReturnState
in classPredictionContext
-
equals
- Specified by:
equals
in classPredictionContext
-
toString
-