Package org.antlr.v4.tool
Class DOTGenerator
- java.lang.Object
 - 
- org.antlr.v4.tool.DOTGenerator
 
 
- 
public class DOTGenerator extends Object
The DOT (part of graphviz) generation aspect. 
- 
- 
Constructor Summary
Constructors Constructor Description DOTGenerator(Grammar grammar)This aspect is associated with a grammar 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDOT(ATNState startState)StringgetDOT(ATNState startState, boolean isLexer)StringgetDOT(ATNState startState, String[] ruleNames, boolean isLexer)Return a String containing a DOT description that, when displayed, will show the incoming state machine visually.StringgetDOT(DFA dfa, boolean isLexer)protected StringgetEdgeLabel(String label)Fix edge strings so they print out in DOT properly; generate any gated predicates on edge too.protected StringgetStateLabel(ATNState s)protected StringgetStateLabel(DFAState s) 
 - 
 
- 
- 
Field Detail
- 
STRIP_NONREDUCED_STATES
public static final boolean STRIP_NONREDUCED_STATES
- See Also:
 - Constant Field Values
 
 
- 
arrowhead
protected String arrowhead
 
- 
rankdir
protected String rankdir
 
- 
stlib
public static final org.stringtemplate.v4.STGroup stlib
Library of output templates; use<attrname>format. 
- 
grammar
protected Grammar grammar
 
 - 
 
- 
Constructor Detail
- 
DOTGenerator
public DOTGenerator(Grammar grammar)
This aspect is associated with a grammar 
 - 
 
- 
Method Detail
- 
getDOT
public String getDOT(ATNState startState, String[] ruleNames, boolean isLexer)
Return a String containing a DOT description that, when displayed, will show the incoming state machine visually. All nodes reachable from startState will be included. 
- 
getEdgeLabel
protected String getEdgeLabel(String label)
Fix edge strings so they print out in DOT properly; generate any gated predicates on edge too. 
 - 
 
 -