com.alexmerz.graphviz
Class Parser
java.lang.Object
com.alexmerz.graphviz.Parser
- All Implemented Interfaces:
- ParserConstants
public class Parser
- extends java.lang.Object
- implements ParserConstants
The parser creates a list of Graph objects
found in a Reader object.
- Version:
- $Id: graphviz.jj,v 1.2 2006/03/20 11:26:03 Alexander Exp $
| 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 |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public ParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
Parser
public Parser()
Parser
public Parser(java.io.InputStream stream)
Parser
public Parser(java.io.InputStream stream,
java.lang.String encoding)
Parser
public Parser(java.io.Reader stream)
Parser
public Parser(ParserTokenManager tm)
getGraphs
public java.util.ArrayList<Graph> getGraphs()
- Returns the main Graphs found in the Reader stream
- Returns:
- the list of main Graphs
parse
public boolean parse(java.io.Reader in)
throws ParseException
- Parses a Graphviz document
- Parameters:
in - the Reader to parse
- Returns:
- normally true should be returned, if false then
something in the JDK is broken...
- Throws:
ParseException
parse
public boolean parse(java.lang.StringBuffer sb)
throws ParseException
- Parses a Graphviz document
- Parameters:
sb - the StringBuffer containing the document
- Returns:
- normally true should be returned, if false then
something in the JDK is broken...
- Throws:
ParseException
graphs
public final void graphs(java.util.ArrayList<Graph> gglist)
throws ParseException
- Throws:
ParseException
graph
public final void graph(java.util.ArrayList<Graph> gglist)
throws ParseException
- Throws:
ParseException
stmt_list
public final void stmt_list()
throws ParseException
- Throws:
ParseException
reallist
public final void reallist()
throws ParseException
- Throws:
ParseException
stmt
public final void stmt()
throws ParseException
- Throws:
ParseException
lb_stmt
public final void lb_stmt()
throws ParseException
- Throws:
ParseException
lb
public final void lb()
throws ParseException
- Throws:
ParseException
edge
public final void edge()
throws ParseException
- Throws:
ParseException
edge_op
public final void edge_op()
throws ParseException
- Throws:
ParseException
matrix
public final java.util.ArrayList<Node> matrix()
throws ParseException
- Throws:
ParseException
generic_attributes
public final void generic_attributes()
throws ParseException
- Throws:
ParseException
subgraph
public final Node subgraph()
throws ParseException
- Throws:
ParseException
sg_stmt_list
public final void sg_stmt_list()
throws ParseException
- Throws:
ParseException
graph_attrib_assign
public final void graph_attrib_assign()
throws ParseException
- Throws:
ParseException
node_port
public final PortNode node_port()
throws ParseException
- Throws:
ParseException
node_listing
public final void node_listing()
throws ParseException
- Throws:
ParseException
single_node
public final void single_node()
throws ParseException
- Throws:
ParseException
attribute_list
public final java.util.Hashtable<java.lang.String,java.lang.String> attribute_list()
throws ParseException
- Throws:
ParseException
attribute
public final java.lang.String[] attribute()
throws ParseException
- Throws:
ParseException
attrib_value
public final java.lang.String attrib_value()
throws ParseException
- Throws:
ParseException
node
public final Node node()
throws ParseException
- Throws:
ParseException
id
public final Id id()
throws ParseException
- Throws:
ParseException
value
public final java.lang.String value()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(java.io.InputStream stream)
ReInit
public void ReInit(java.io.InputStream stream,
java.lang.String encoding)
ReInit
public void ReInit(java.io.Reader stream)
ReInit
public void ReInit(ParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()