public class GMLParser extends java.lang.Object implements Parser, GMLParserConstants
Modifier and Type | Field and Description |
---|---|
(package private) GMLContext |
ctx |
(package private) boolean |
inGraph |
private java.util.List<int[]> |
jj_expentries |
private int[] |
jj_expentry |
private int |
jj_gen |
(package private) SimpleCharStream |
jj_input_stream |
private int |
jj_kind |
private int[] |
jj_la1 |
private static int[] |
jj_la1_0 |
Token |
jj_nt
Next token.
|
private int |
jj_ntk |
(package private) boolean |
step |
Token |
token
Current token.
|
GMLParserTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
GMLParser(FileSourceGML gml,
java.io.InputStream stream) |
GMLParser(FileSourceGML gml,
java.io.Reader stream) |
GMLParser(GMLParserTokenManager tm)
Constructor with generated Token Manager.
|
GMLParser(java.io.InputStream stream)
Constructor with InputStream.
|
GMLParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
GMLParser(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
all()
Parse the whole stream.
|
void |
close()
Closes the parser, closing the opened stream.
|
void |
diGraphStart() |
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
void |
graphEnd() |
void |
graphStart() |
boolean |
isInGraph() |
private Token |
jj_consume_token(int kind) |
private static void |
jj_la1_init_0() |
private int |
jj_ntk() |
java.lang.String |
keyValue(KeyValues values)
A set of key and value, the value can recursively be a list of
key-values.
|
KeyValues |
list()
A list of key values, all values are stored in a KeyValues object.
|
boolean |
next() |
KeyValues |
nextEvents()
The top-level method to be called by the file source.
|
void |
open()
Start parsing the stream.
|
void |
ReInit(GMLParserTokenManager tm)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.Reader stream)
Reinitialise.
|
void |
start()
Unused rule, call it to slurp in the whole file.
|
boolean |
step() |
java.lang.Object |
value(java.lang.String key)
A value for a key, either a number, a string or a recursive list of
key-values.
|
boolean inGraph
GMLContext ctx
boolean step
public GMLParserTokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
private int jj_ntk
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private java.util.List<int[]> jj_expentries
private int[] jj_expentry
private int jj_kind
public GMLParser(FileSourceGML gml, java.io.InputStream stream)
public GMLParser(FileSourceGML gml, java.io.Reader stream)
public GMLParser(java.io.InputStream stream)
public GMLParser(java.io.InputStream stream, java.lang.String encoding)
public GMLParser(java.io.Reader stream)
public GMLParser(GMLParserTokenManager tm)
public boolean isInGraph()
public void open() throws java.io.IOException, ParseException
Parser
open
in interface Parser
ParseException
java.io.IOException
public boolean next() throws java.io.IOException, ParseException
next
in interface Parser
ParseException
java.io.IOException
public boolean step() throws java.io.IOException, ParseException
java.io.IOException
ParseException
public void close() throws java.io.IOException
public final void start() throws ParseException
ParseException
public final void all() throws ParseException, java.io.IOException
Parser
all
in interface Parser
ParseException
java.io.IOException
public final void graphStart() throws ParseException
ParseException
public final void diGraphStart() throws ParseException
ParseException
public final void graphEnd() throws ParseException
ParseException
public final KeyValues nextEvents() throws ParseException
ParseException
public final KeyValues list() throws ParseException
ParseException
public final java.lang.String keyValue(KeyValues values) throws ParseException
ParseException
public final java.lang.Object value(java.lang.String key) throws ParseException
ParseException
private static void jj_la1_init_0()
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(GMLParserTokenManager tm)
private Token jj_consume_token(int kind) throws ParseException
ParseException
public final Token getNextToken()
public final Token getToken(int index)
private int jj_ntk()
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()