FSAPy/download/files/Wlist2RE.py
def makeDOT(myFSA):
    """Return DOT representation for graphviz."""

    buffer = "digraph fsa {\nrankdir=LR;\nnode [shape=doublecircle];\n"
    for i in myFSA.getFinalStates():
        buffer = u" ".join((buffer, str(i)))
    buffer += u";\nnode [shape = circle];\n"
    for i in myFSA.states.keys():
        val = myFSA.states[i]
        buffer = u" ".join( (buffer, str(i[0]), u"->", str(val[0]), u"[ label=\"", i[1], u"\" ];\n") )
    return "".join((buffer, "\n}"))
Return DOT representation for graphviz.
Return DOT representation for graphviz.
Return DOT representation for graphviz .
def makeDOT(myFSA):
    buffer = "digraph fsa {\nrankdir=LR;\nnode [shape=doublecircle];\n"
    for i in myFSA.getFinalStates():
        buffer = u" ".join((buffer, str(i)))
    buffer += u";\nnode [shape = circle];\n"
    for i in myFSA.states.keys():
        val = myFSA.states[i]
        buffer = u" ".join( (buffer, str(i[0]), u"->", str(val[0]), u"[ label=\"", i[1], u"\" ];\n") )
    return "".join((buffer, "\n}"))
def makeDOT ( myFSA ) : buffer = "digraph fsa {\nrankdir=LR;\nnode [shape=doublecircle];\n" for i in myFSA . getFinalStates ( ) : buffer = u" " . join ( ( buffer , str ( i ) ) ) buffer += u";\nnode [shape = circle];\n" for i in myFSA . states . keys ( ) : val = myFSA . states [ i ] buffer = u" " . join ( ( buffer , str ( i [ 0 ] ) , u"->" , str ( val [ 0 ] ) , u"[ label=\"" , i [ 1 ] , u"\" ];\n" ) ) return "" . join ( ( buffer , "\n}" ) )
Return DOT representation for graphviz.
Return DOT representation for graphviz .
"""Return DOT representation for graphviz."""
myFSA