public class ATNDeserializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SERIALIZED_VERSION |
| Constructor and Description |
|---|
ATNDeserializer() |
ATNDeserializer(ATNDeserializationOptions deserializationOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCondition(boolean condition) |
protected void |
checkCondition(boolean condition,
String message) |
static int[] |
decodeIntsEncodedAs16BitWords(char[] data16) |
static int[] |
decodeIntsEncodedAs16BitWords(char[] data16,
boolean trimToSize)
Convert a list of chars (16 uint) that represent a serialized and compressed list of ints for an ATN.
|
ATN |
deserialize(char[] data) |
ATN |
deserialize(int[] data) |
protected Transition |
edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
static IntegerList |
encodeIntsWith16BitWords(IntegerList data)
Given a list of integers representing a serialized ATN, encode values too large to fit into 15 bits
as two 16bit values.
|
protected LexerAction |
lexerActionFactory(LexerActionType type,
int data1,
int data2) |
protected void |
markPrecedenceDecisions(ATN atn)
Analyze the
StarLoopEntryState states in the specified ATN to set
the StarLoopEntryState.isPrecedenceDecision field to the
correct value. |
protected ATNState |
stateFactory(int type,
int ruleIndex) |
protected static int |
toInt(char c) |
protected static int |
toInt32(char[] data,
int offset) |
protected static int |
toInt32(int[] data,
int offset) |
protected void |
verifyATN(ATN atn) |
public ATNDeserializer()
public ATNDeserializer(ATNDeserializationOptions deserializationOptions)
public ATN deserialize(char[] data)
public ATN deserialize(int[] data)
protected void markPrecedenceDecisions(ATN atn)
StarLoopEntryState states in the specified ATN to set
the StarLoopEntryState.isPrecedenceDecision field to the
correct value.atn - The ATN.protected void verifyATN(ATN atn)
protected void checkCondition(boolean condition)
protected void checkCondition(boolean condition,
String message)
protected static int toInt(char c)
protected static int toInt32(char[] data,
int offset)
protected static int toInt32(int[] data,
int offset)
protected Transition edgeFactory(ATN atn, int type, int src, int trg, int arg1, int arg2, int arg3, List<IntervalSet> sets)
protected ATNState stateFactory(int type, int ruleIndex)
protected LexerAction lexerActionFactory(LexerActionType type, int data1, int data2)
public static IntegerList encodeIntsWith16BitWords(IntegerList data)
org.antlr.v4.codegen.model.SerializedJavaATN
to encode ints as char values for the java target, but it is convenient to combine it with the
#decodeIntsEncodedAs16BitWords that follows as they are a pair (I did not want to introduce a new class
into the runtime). Used only for Java Target.public static int[] decodeIntsEncodedAs16BitWords(char[] data16)
public static int[] decodeIntsEncodedAs16BitWords(char[] data16,
boolean trimToSize)
ATNDeserializer.encodeIntsWith16BitWords(IntegerList) above. Used only for Java Target.