public class GMLParser extends Object implements Parser, GMLParserConstants
Modifier and Type | Field and Description |
---|---|
(package private) GMLContext |
ctx |
(package private) boolean |
inGraph |
private 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,
InputStream stream) |
GMLParser(FileSourceGML gml,
Reader stream) |
GMLParser(GMLParserTokenManager tm)
Constructor with generated Token Manager.
|
GMLParser(InputStream stream)
Constructor with InputStream.
|
GMLParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding
|
GMLParser(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() |
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(InputStream stream)
Reinitialise.
|
void |
ReInit(InputStream stream,
String encoding)
Reinitialise.
|
void |
ReInit(Reader stream)
Reinitialise.
|
void |
start()
Unused rule, call it to slurp in the whole file.
|
boolean |
step() |
Object |
value(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
private int jj_ntk
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private List<int[]> jj_expentries
private int[] jj_expentry
private int jj_kind
public GMLParser(FileSourceGML gml, InputStream stream)
public GMLParser(FileSourceGML gml, Reader stream)
public GMLParser(InputStream stream)
public GMLParser(InputStream stream, String encoding)
public GMLParser(GMLParserTokenManager tm)
public boolean isInGraph()
public void open() throws IOException, ParseException
Parser
open
in interface Parser
ParseException
IOException
public boolean next() throws IOException, ParseException
next
in interface Parser
ParseException
IOException
public boolean step() throws IOException, ParseException
IOException
ParseException
public void close() throws IOException
close
in interface Parser
IOException
public final void start() throws ParseException
ParseException
public final void all() throws ParseException, IOException
Parser
all
in interface Parser
ParseException
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 String keyValue(KeyValues values) throws ParseException
ParseException
public final Object value(String key) throws ParseException
ParseException
private static void jj_la1_init_0()
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(GMLParserTokenManager tm)
private Token jj_consume_token(int kind) throws ParseException
ParseException
public final Token getNextToken()
private int jj_ntk()
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses