Top Description Fields Constructors Methods
org.antlr.v4.runtime.dfa

public Class DFASerializer

extends Object
Class Inheritance
Known Direct Subclasses
org.antlr.v4.runtime.dfa.LexerDFASerializer
Imports
org.antlr.v4.runtime.Recognizer, .Vocabulary, .VocabularyImpl, org.antlr.v4.runtime.atn.ATN, .ATNConfig, .ATNSimulator, .ATNState, .PredictionContext, org.antlr.v4.runtime.misc.NotNull, .Nullable, java.util.ArrayList, .Arrays, .Collections, .Comparator, .List, .Map

A DFA walker that knows how to dump them to serialized strings.

Field Summary

Modifier and TypeField and Description
pack-priv final ATN
private final DFA
pack-priv final String[]
private final Vocabulary

Constructor Summary

AccessConstructor and Description
public
DFASerializer(DFA dfa, String[] tokenNames)

Deprecated Use DFASerializer(DFA, Vocabulary) instead.
public
DFASerializer(DFA dfa, Vocabulary vocabulary)

public
DFASerializer(DFA dfa, Recognizer<?, ?> parser)

public
DFASerializer(DFA dfa, String[] tokenNames, String[] ruleNames, ATN atn)

public
DFASerializer(DFA dfa, Vocabulary vocabulary, String[] ruleNames, ATN atn)

Method Summary

Modifier and TypeMethod and Description
protected String
protected String
getEdgeLabel(int i)

pack-priv String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

atnback to summary
pack-priv final ATN atn
Annotations
@Nullable
dfaback to summary
private final DFA dfa
Annotations
@NotNull
ruleNamesback to summary
pack-priv final String[] ruleNames
Annotations
@Nullable
vocabularyback to summary
private final Vocabulary vocabulary
Annotations
@NotNull

Constructor Detail

DFASerializerback to summary
public DFASerializer(DFA dfa, String[] tokenNames)

Deprecated

Use DFASerializer(DFA, Vocabulary) instead.

Annotations
@Deprecated
DFASerializerback to summary
public DFASerializer(DFA dfa, Vocabulary vocabulary)
DFASerializerback to summary
public DFASerializer(DFA dfa, Recognizer<?, ?> parser)
DFASerializerback to summary
public DFASerializer(DFA dfa, String[] tokenNames, String[] ruleNames, ATN atn)
Annotations
@Deprecated
DFASerializerback to summary
public DFASerializer(DFA dfa, Vocabulary vocabulary, String[] ruleNames, ATN atn)

Method Detail

getContextLabelback to summary
protected String getContextLabel(int i)
getEdgeLabelback to summary
protected String getEdgeLabel(int i)
getStateStringback to summary
pack-priv String getStateString(DFAState s)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override