module ActionDispatch::Journey::NFA::Dot
def to_dot
:nodoc:
:nodoc:
def to_dot edges = transitions.map { |from, sym, to| " #{from} -> #{to} [label=\"#{sym || 'ε'}\"];" } # memo_nodes = memos.values.flatten.map { |n| # label = n # if Journey::Route === n # label = "#{n.verb.source} #{n.path.spec}" # end # " #{n.object_id} [label=\"#{label}\", shape=box];" # } # memo_edges = memos.flat_map { |k, memos| # (memos || []).map { |v| " #{k} -> #{v.object_id};" } # }.uniq <<-eodot nfa { r=LR; shape = doublecircle]; pting_states.join ' '}; shape = circle]; join "\n"} eodot end