view code/graph/regnfa.dot @ 6:168d60b03e2c

add dotTranslator(Translator), that can translate from DFA or NFA into Dot-file(Dot is graph generater using tex.)
author ryoma <shinya@firefly.cr.ie.u-ryukyu.ac.jp>
date Fri, 02 Jul 2010 02:43:28 +0900
parents
children
line wrap: on
line source

digraph G{
        d2tdocpreamble = "\usetikzlibrary{automata}";
        d2tfigpreamble = "\tikzstyle{every state}= \
        [draw=blue!50,very thick,shape=circle, fill=blue!20]";
        node [style="state"];
        edge [lblstyle="fill=blue!20", style="arrows=->", topath="bend left"];
        s6 [style="state, initial"]
        s8 [style="state, accepting"]
        s1 -> s2 [texlbl="A"]
        s3 -> s4 [texlbl="B"]
        s2 -> s5 [texlbl="$\varepsilon$"]
        s2 -> s7 [texlbl="$\varepsilon$"]
        s5 -> s1 [texlbl="$\varepsilon$"]
        s5 -> s3 [texlbl="$\varepsilon$"]
        s4 -> s5 [texlbl="$\varepsilon$"]
        s4 -> s7 [texlbl="$\varepsilon$"]
        s7 -> s8 [texlbl="C"]
        s6 -> s5 [texlbl="$\varepsilon$"]
        s6 -> s7 [texlbl="$\varepsilon$"]
}