public class TLPParser extends Object implements Parser, TLPParserConstants
Modifier and Type | Class and Description |
---|---|
protected static class |
TLPParser.Cluster |
(package private) static class |
TLPParser.JJCalls |
private static class |
TLPParser.LookaheadSuccess |
protected static class |
TLPParser.PropertyType |
Modifier and Type | Field and Description |
---|---|
private HashMap<Integer,TLPParser.Cluster> |
clusters |
private TLPParser.JJCalls[] |
jj_2_rtns |
private int |
jj_endpos |
private List<int[]> |
jj_expentries |
private int[] |
jj_expentry |
private int |
jj_gc |
private int |
jj_gen |
(package private) SimpleCharStream |
jj_input_stream |
private int |
jj_kind |
private int |
jj_la |
private int[] |
jj_la1 |
private static int[] |
jj_la1_0 |
private Token |
jj_lastpos |
private int[] |
jj_lasttokens |
private TLPParser.LookaheadSuccess |
jj_ls |
Token |
jj_nt
Next token.
|
private int |
jj_ntk |
private boolean |
jj_rescan |
private Token |
jj_scanpos |
private TLPParser.Cluster |
root |
private String |
sourceId
Id of the parser used in events.
|
private Stack<TLPParser.Cluster> |
stack |
private FileSourceTLP |
tlp
The DOT source associated with this parser.
|
Token |
token
Current token.
|
TLPParserTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
TLPParser(FileSourceTLP tlp,
InputStream stream)
Create a new parser associated with a TLP source from an input stream.
|
TLPParser(FileSourceTLP tlp,
Reader stream)
Create a new parser associated with a DOT source from a reader.
|
TLPParser(InputStream stream)
Constructor with InputStream.
|
TLPParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding
|
TLPParser(Reader stream)
Constructor.
|
TLPParser(TLPParserTokenManager tm)
Constructor with generated Token Manager.
|
Modifier and Type | Method and Description |
---|---|
private void |
addEdge(String id,
String source,
String target) |
private void |
addNode(String id) |
void |
all()
Parse the whole stream.
|
void |
close()
Closes the parser, closing the opened stream.
|
private void |
cluster() |
private Object |
convert(TLPParser.PropertyType type,
String value) |
void |
disable_tracing()
Disable tracing.
|
private void |
edge() |
private void |
edges() |
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
private void |
graphAttribute(String key,
Object value) |
private void |
headers() |
private void |
includeEdge(String id) |
private void |
init(FileSourceTLP tlp) |
private Integer |
integer() |
private boolean |
jj_2_1(int xla) |
private boolean |
jj_2_2(int xla) |
private boolean |
jj_2_3(int xla) |
private boolean |
jj_2_4(int xla) |
private boolean |
jj_2_5(int xla) |
private boolean |
jj_3_1() |
private boolean |
jj_3_2() |
private boolean |
jj_3_3() |
private boolean |
jj_3_4() |
private boolean |
jj_3_5() |
private boolean |
jj_3R_10() |
private boolean |
jj_3R_11() |
private boolean |
jj_3R_12() |
private boolean |
jj_3R_13() |
private boolean |
jj_3R_14() |
private boolean |
jj_3R_7() |
private boolean |
jj_3R_8() |
private boolean |
jj_3R_9() |
private void |
jj_add_error_token(int kind,
int pos) |
private Token |
jj_consume_token(int kind) |
private static void |
jj_la1_init_0() |
private int |
jj_ntk() |
private void |
jj_rescan_token() |
private void |
jj_save(int index,
int xla) |
private boolean |
jj_scan_token(int kind) |
private void |
newProperty(Integer cluster,
String name,
TLPParser.PropertyType type,
String nodeDefault,
String edgeDefault,
HashMap<String,String> nodes,
HashMap<String,String> edges) |
boolean |
next() |
private void |
nodes() |
void |
open()
Start parsing the stream.
|
private void |
popCluster() |
private void |
property() |
private void |
pushCluster(int i,
String name) |
void |
ReInit(InputStream stream)
Reinitialise.
|
void |
ReInit(InputStream stream,
String encoding)
Reinitialise.
|
void |
ReInit(Reader stream)
Reinitialise.
|
void |
ReInit(TLPParserTokenManager tm)
Reinitialise.
|
private void |
statement() |
private String |
string() |
private void |
tlp() |
private TLPParser.PropertyType |
type() |
private FileSourceTLP tlp
private TLPParser.Cluster root
private HashMap<Integer,TLPParser.Cluster> clusters
private Stack<TLPParser.Cluster> stack
public TLPParserTokenManager token_source
SimpleCharStream jj_input_stream
private int jj_ntk
private Token jj_scanpos
private Token jj_lastpos
private int jj_la
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private final TLPParser.JJCalls[] jj_2_rtns
private boolean jj_rescan
private int jj_gc
private final TLPParser.LookaheadSuccess jj_ls
private List<int[]> jj_expentries
private int[] jj_expentry
private int jj_kind
private int[] jj_lasttokens
private int jj_endpos
public TLPParser(FileSourceTLP tlp, InputStream stream)
public TLPParser(FileSourceTLP tlp, Reader stream)
public TLPParser(InputStream stream)
public TLPParser(InputStream stream, String encoding)
public TLPParser(TLPParserTokenManager tm)
public void close() throws IOException
close
in interface Parser
IOException
private void init(FileSourceTLP tlp)
private void addNode(String id) throws ParseException
ParseException
private void addEdge(String id, String source, String target) throws ParseException
ParseException
private void includeEdge(String id) throws ParseException
ParseException
private void graphAttribute(String key, Object value)
private void pushCluster(int i, String name)
private void popCluster()
private void newProperty(Integer cluster, String name, TLPParser.PropertyType type, String nodeDefault, String edgeDefault, HashMap<String,String> nodes, HashMap<String,String> edges)
private Object convert(TLPParser.PropertyType type, String value)
public final void all() throws ParseException
Parser
all
in interface Parser
ParseException
public final boolean next() throws ParseException
next
in interface Parser
ParseException
public final void open() throws ParseException
Parser
open
in interface Parser
ParseException
private final void tlp() throws ParseException
ParseException
private final void headers() throws ParseException
ParseException
private final void statement() throws ParseException
ParseException
private final void nodes() throws ParseException
ParseException
private final void edge() throws ParseException
ParseException
private final void edges() throws ParseException
ParseException
private final void cluster() throws ParseException
ParseException
private final void property() throws ParseException
ParseException
private final TLPParser.PropertyType type() throws ParseException
ParseException
private final String string() throws ParseException
ParseException
private final Integer integer() throws ParseException
ParseException
private boolean jj_2_1(int xla)
private boolean jj_2_2(int xla)
private boolean jj_2_3(int xla)
private boolean jj_2_4(int xla)
private boolean jj_2_5(int xla)
private boolean jj_3_1()
private boolean jj_3_5()
private boolean jj_3R_9()
private boolean jj_3_4()
private boolean jj_3_3()
private boolean jj_3R_14()
private boolean jj_3R_13()
private boolean jj_3_2()
private boolean jj_3R_12()
private boolean jj_3R_11()
private boolean jj_3R_10()
private boolean jj_3R_7()
private boolean jj_3R_8()
private static void jj_la1_init_0()
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(TLPParserTokenManager tm)
private Token jj_consume_token(int kind) throws ParseException
ParseException
private boolean jj_scan_token(int kind)
public final Token getNextToken()
private int jj_ntk()
private void jj_add_error_token(int kind, int pos)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
private void jj_rescan_token()
private void jj_save(int index, int xla)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses