public class DOTParser extends Object implements Parser, DOTParserConstants
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DOTParser.JJCalls |
private static class |
DOTParser.LookaheadSuccess |
Modifier and Type | Field and Description |
---|---|
private boolean |
directed
Flag telling if the graph is directed.
|
private FileSourceDOT |
dot
The DOT source associated with this parser.
|
private HashMap<String,Object> |
globalEdgesAttributes
Global attributes of edges.
|
private HashMap<String,Object> |
globalNodesAttributes
Global attributes of nodes.
|
private DOTParser.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 static int[] |
jj_la1_1 |
private Token |
jj_lastpos |
private int[] |
jj_lasttokens |
private DOTParser.LookaheadSuccess |
jj_ls |
Token |
jj_nt
Next token.
|
private int |
jj_ntk |
private boolean |
jj_rescan |
private Token |
jj_scanpos |
private HashSet<String> |
nodeAdded
IDs of added nodes.
|
private String |
sourceId
Id of the parser used in events.
|
private boolean |
strict
Flag telling if the graph is 'strict'.
|
Token |
token
Current token.
|
DOTParserTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
DOTParser(DOTParserTokenManager tm)
Constructor with generated Token Manager.
|
DOTParser(FileSourceDOT dot,
InputStream stream)
Create a new parser associated with a DOT source from an input stream.
|
DOTParser(FileSourceDOT dot,
Reader stream)
Create a new parser associated with a DOT source from a reader.
|
DOTParser(InputStream stream)
Constructor with InputStream.
|
DOTParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding
|
DOTParser(Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
addEdges(LinkedList<String> edges,
HashMap<String,Object> attr) |
private void |
addNode(String nodeId,
String[] port,
HashMap<String,Object> attr) |
void |
all()
Parse the whole stream.
|
private void |
attributeList(HashMap<String,Object> attributes) |
private HashMap<String,Object> |
attributesList() |
private void |
attributeStatement() |
void |
close()
Closes the parser, closing the opened stream.
|
private String |
compassPoint() |
void |
disable_tracing()
Disable tracing.
|
private void |
edgeRHS(LinkedList<String> edges) |
private void |
edgeStatement() |
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 |
graph() |
private String |
id() |
private void |
init(FileSourceDOT dot) |
private boolean |
jj_2_1(int xla) |
private boolean |
jj_2_2(int xla) |
private boolean |
jj_3_1() |
private boolean |
jj_3_2() |
private boolean |
jj_3R_10() |
private boolean |
jj_3R_5() |
private boolean |
jj_3R_6() |
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 static void |
jj_la1_init_1() |
private int |
jj_ntk() |
private void |
jj_rescan_token() |
private void |
jj_save(int index,
int xla) |
private boolean |
jj_scan_token(int kind) |
boolean |
next() |
private void |
nodeStatement() |
void |
open()
Start parsing the stream.
|
private String[] |
port() |
void |
ReInit(DOTParserTokenManager tm)
Reinitialise.
|
void |
ReInit(InputStream stream)
Reinitialise.
|
void |
ReInit(InputStream stream,
String encoding)
Reinitialise.
|
void |
ReInit(Reader stream)
Reinitialise.
|
private void |
setGlobalAttributes(String who,
HashMap<String,Object> attr) |
private void |
statement() |
private void |
subgraph() |
private FileSourceDOT dot
private boolean directed
private boolean strict
private HashMap<String,Object> globalNodesAttributes
private HashMap<String,Object> globalEdgesAttributes
public DOTParserTokenManager 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 static int[] jj_la1_1
private final DOTParser.JJCalls[] jj_2_rtns
private boolean jj_rescan
private int jj_gc
private final DOTParser.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 DOTParser(FileSourceDOT dot, InputStream stream)
public DOTParser(FileSourceDOT dot, Reader stream)
public DOTParser(InputStream stream)
public DOTParser(InputStream stream, String encoding)
public DOTParser(DOTParserTokenManager tm)
public void close() throws IOException
close
in interface Parser
IOException
private void init(FileSourceDOT dot)
private void setGlobalAttributes(String who, HashMap<String,Object> attr)
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 graph() throws ParseException
ParseException
private final void subgraph() throws ParseException
ParseException
private final String id() throws ParseException
ParseException
private final void statement() throws ParseException
ParseException
private final void nodeStatement() throws ParseException
ParseException
private final String compassPoint() throws ParseException
ParseException
private final String[] port() throws ParseException
ParseException
private final void edgeStatement() throws ParseException
ParseException
private final void edgeRHS(LinkedList<String> edges) throws ParseException
ParseException
private final void attributeStatement() throws ParseException
ParseException
private final HashMap<String,Object> attributesList() throws ParseException
ParseException
private final void attributeList(HashMap<String,Object> attributes) throws ParseException
ParseException
private boolean jj_2_1(int xla)
private boolean jj_2_2(int xla)
private boolean jj_3R_6()
private boolean jj_3_2()
private boolean jj_3R_8()
private boolean jj_3R_10()
private boolean jj_3R_7()
private boolean jj_3R_9()
private boolean jj_3R_5()
private boolean jj_3_1()
private static void jj_la1_init_0()
private static void jj_la1_init_1()
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(DOTParserTokenManager 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