public class DOTGenerator extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
arrowhead |
protected Grammar |
grammar |
protected Set<Object> |
markedStates
To prevent infinite recursion when walking state machines, record
which states we've visited.
|
protected String |
rankdir |
static org.stringtemplate.v4.STGroup |
stlib
Library of output templates; use
<attrname> format |
static boolean |
STRIP_NONREDUCED_STATES |
Constructor and Description |
---|
DOTGenerator(Grammar grammar)
This aspect is associated with a grammar
|
Modifier and Type | Method and Description |
---|---|
String |
getArrowheadType() |
String |
getDOT(State startState)
Return a String containing a DOT description that, when displayed,
will show the incoming state machine visually.
|
protected String |
getEdgeLabel(Transition edge)
Fix edge strings so they print out in DOT properly;
generate any gated predicates on edge too.
|
String |
getRankdir() |
protected String |
getStateLabel(State s) |
void |
setArrowheadType(String arrowhead) |
void |
setRankdir(String rankdir) |
protected void |
walkCreatingDFADOT(org.stringtemplate.v4.ST dot,
DFAState s)
Do a depth-first walk of the state machine graph and
fill a DOT description template.
|
protected void |
walkRuleNFACreatingDOT(org.stringtemplate.v4.ST dot,
State s)
Do a depth-first walk of the state machine graph and
fill a DOT description template.
|
public static final boolean STRIP_NONREDUCED_STATES
protected String arrowhead
protected String rankdir
public static org.stringtemplate.v4.STGroup stlib
<attrname>
formatprotected Set<Object> markedStates
protected Grammar grammar
public DOTGenerator(Grammar grammar)
public String getDOT(State startState)
protected void walkCreatingDFADOT(org.stringtemplate.v4.ST dot, DFAState s)
protected void walkRuleNFACreatingDOT(org.stringtemplate.v4.ST dot, State s)
protected String getEdgeLabel(Transition edge)
public String getArrowheadType()
public void setArrowheadType(String arrowhead)
public String getRankdir()
public void setRankdir(String rankdir)
Copyright © 1992–2015 ANTLR. All rights reserved.