Package org.antlr.runtime
Class SerializedGrammar
- java.lang.Object
-
- org.antlr.runtime.SerializedGrammar
-
public class SerializedGrammar extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
SerializedGrammar.Block
protected class
SerializedGrammar.Node
protected class
SerializedGrammar.Rule
protected class
SerializedGrammar.RuleRef
protected class
SerializedGrammar.TokenRef
-
Field Summary
Fields Modifier and Type Field Description static String
COOKIE
static int
FORMAT_VERSION
String
name
List<? extends SerializedGrammar.Rule>
rules
char
type
-
Constructor Summary
Constructors Constructor Description SerializedGrammar(String filename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<SerializedGrammar.Node>
readAlt(DataInputStream in)
protected SerializedGrammar.Block
readBlock(DataInputStream in)
protected void
readFile(DataInputStream in)
protected SerializedGrammar.Rule
readRule(DataInputStream in)
protected List<? extends SerializedGrammar.Rule>
readRules(DataInputStream in, int numRules)
protected String
readString(DataInputStream in)
String
toString()
-
-
-
Field Detail
-
COOKIE
public static final String COOKIE
- See Also:
- Constant Field Values
-
FORMAT_VERSION
public static final int FORMAT_VERSION
- See Also:
- Constant Field Values
-
name
public String name
-
type
public char type
-
rules
public List<? extends SerializedGrammar.Rule> rules
-
-
Constructor Detail
-
SerializedGrammar
public SerializedGrammar(String filename) throws IOException
- Throws:
IOException
-
-
Method Detail
-
readFile
protected void readFile(DataInputStream in) throws IOException
- Throws:
IOException
-
readRules
protected List<? extends SerializedGrammar.Rule> readRules(DataInputStream in, int numRules) throws IOException
- Throws:
IOException
-
readRule
protected SerializedGrammar.Rule readRule(DataInputStream in) throws IOException
- Throws:
IOException
-
readBlock
protected SerializedGrammar.Block readBlock(DataInputStream in) throws IOException
- Throws:
IOException
-
readAlt
protected List<SerializedGrammar.Node> readAlt(DataInputStream in) throws IOException
- Throws:
IOException
-
readString
protected String readString(DataInputStream in) throws IOException
- Throws:
IOException
-
-