Class DOTGenerator


  • public class DOTGenerator
    extends Object
    The DOT (part of graphviz) generation aspect.
    • 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​(DFA dfa,
                             boolean isLexer)
      • getDOT

        public String getDOT​(ATNState startState,
                             boolean isLexer)
      • 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.