(self)
Prints a graphviz diagram of the BM automaton(for debugging)
Prints a graphviz diagram of the BM automaton(for debugging)
Prints a graphviz diagram of the BM automaton ( for debugging )
def print_ac(self):
        "Prints a graphviz diagram of the BM automaton(for debugging)"
        print("digraph g{")
        def print_node(node):
            for subnode_key in node.transition_table.keys():
                subnode = node.transition_table[subnode_key]
                print("%d -> %d [label=%s] //%s" %
                      (node.id, subnode.id, type_repr(subnode_key), str(subnode.fixers)))
                if subnode_key == 1:
                    print(subnode.content)
                print_node(subnode)
        print_node(self.root)
        print("}")
def print_ac ( self ) : print ( "digraph g{" ) def print_node ( node ) : for subnode_key in node . transition_table . keys ( ) : subnode = node . transition_table [ subnode_key ] print ( "%d -> %d [label=%s] //%s" % ( node . id , subnode . id , type_repr ( subnode_key ) , str ( subnode . fixers ) ) ) if subnode_key == 1 : print ( subnode . content ) print_node ( subnode ) print_node ( self . root ) print ( "}" )