|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alexmerz.graphviz.Parser
public class Parser
The parser creates a list of Graph objects found in a Reader object.
Field Summary | |
---|---|
Token |
jj_nt
|
boolean |
lookingAhead
|
Token |
token
|
ParserTokenManager |
token_source
|
Fields inherited from interface com.alexmerz.graphviz.ParserConstants |
---|
COMMA, DEFAULT, DIGRAPH, DOUBLE, EDGE, EDGE_DIRECTED, EDGE_UNDIRECTED, EOF, EQUAL, GRAPH, ID, IN_COMMENT, IN_COMMENT_OL, LB, LBRACE, LBRACKET, NODE, NUMBER, RBRACE, RBRACKET, SEMI, SPACE, STRICT, STRING, SUBGRAPH, tokenImage |
Constructor Summary | |
---|---|
Parser()
|
|
Parser(java.io.InputStream stream)
|
|
Parser(java.io.InputStream stream,
java.lang.String encoding)
|
|
Parser(ParserTokenManager tm)
|
|
Parser(java.io.Reader stream)
|
Method Summary | |
---|---|
java.lang.String |
attrib_value()
Production for the value of an attribute assignment |
java.util.Hashtable<java.lang.String,java.lang.String> |
attribute_list()
Production for an attribute list |
java.lang.String[] |
attribute()
Production for an attribute in an attribute list |
void |
disable_tracing()
|
void |
edge_op()
Production for the edge operator |
void |
edge()
Production for an edge The source is a single node, a list of nodes (matrix) or a subgraph. |
void |
enable_tracing()
|
ParseException |
generateParseException()
|
void |
generic_attributes()
Production for generic graph/edge/node attributes edge [color=blue] |
java.util.ArrayList<Graph> |
getGraphs()
Returns the main Graphs found in the Reader stream |
Token |
getNextToken()
|
Token |
getToken(int index)
|
void |
graph_attrib_assign()
Production for graph layout attributes (label="test") |
void |
graph(java.util.ArrayList<Graph> gglist)
Production for a single graph |
void |
graphs(java.util.ArrayList<Graph> gglist)
Production for all graph definitions in the stream |
Id |
id()
Production for single id element |
void |
lb()
Production for the statement ending yes lb is misleading.. |
java.util.ArrayList<Node> |
matrix()
Production for a list of nodes |
void |
node_listing()
Production for listing of nodes (node1 node2 [color=grey];) |
PortNode |
node_port()
Production for Node having port information (node:"e") |
Node |
node()
Production for a single node |
boolean |
parse(java.io.Reader in)
Parses a Graphviz document |
boolean |
parse(java.lang.StringBuffer sb)
Parses a Graphviz document |
void |
reallist()
Production for more then one statement in a graph |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
|
void |
ReInit(ParserTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
void |
sg_stmt_list()
Production for the statements in a subgraph |
void |
single_node()
Production for a single node on a line |
void |
stmt_list()
Production for the statements in the graph |
void |
stmt()
Production for the different types of statements |
Node |
subgraph()
Production for a subgraph |
java.lang.String |
value()
Production for a value |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
---|
public Parser()
public Parser(java.io.InputStream stream)
public Parser(java.io.InputStream stream, java.lang.String encoding)
public Parser(java.io.Reader stream)
public Parser(ParserTokenManager tm)
Method Detail |
---|
public java.util.ArrayList<Graph> getGraphs()
public boolean parse(java.io.Reader in) throws ParseException
in
- the Reader to parse
ParseException
public boolean parse(java.lang.StringBuffer sb) throws ParseException
sb
- the StringBuffer containing the document
ParseException
public final void graphs(java.util.ArrayList<Graph> gglist) throws ParseException
ParseException
public final void graph(java.util.ArrayList<Graph> gglist) throws ParseException
ParseException
public final void stmt_list() throws ParseException
ParseException
public final void reallist() throws ParseException
ParseException
public final void stmt() throws ParseException
ParseException
public final void lb() throws ParseException
ParseException
public final void edge() throws ParseException
ParseException
public final void edge_op() throws ParseException
ParseException
public final java.util.ArrayList<Node> matrix() throws ParseException
ParseException
public final void generic_attributes() throws ParseException
ParseException
public final Node subgraph() throws ParseException
ParseException
public final void sg_stmt_list() throws ParseException
ParseException
public final void graph_attrib_assign() throws ParseException
ParseException
public final PortNode node_port() throws ParseException
ParseException
public final void node_listing() throws ParseException
ParseException
public final void single_node() throws ParseException
ParseException
public final java.util.Hashtable<java.lang.String,java.lang.String> attribute_list() throws ParseException
ParseException
public final java.lang.String[] attribute() throws ParseException
ParseException
public final java.lang.String attrib_value() throws ParseException
ParseException
public final Node node() throws ParseException
ParseException
public final Id id() throws ParseException
ParseException
public final java.lang.String value() throws ParseException
ParseException
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(ParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |