I need NFA for regex
(a+b)?c
As far as I understand, it should contains epsilon from zero node to node before last one (to match string "c", for example).
To check my NFA I use "Regular Expression to NFA Visializaton web service", but graph for my regex on this service does not contain epsilon from zero node.
Is it bug in service, or I misunderstand something?
Thanks!
Seems like a bug. If I try (aa*b)?c
which should be the same language the NFA looks very different (and correct). Also when I try using a automata library I've develop myself some time ago I get this:
./fatool --in 're:^(a+b)?c$' --out dot:- | dot -Gdpi=70 -Tpng -onfa.png /dev/stdin
The library if you are interested: https://github.com/wader/libfa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With