Sunny88
Sunny88

Reputation: 2940

Producing a picture of DFA that recognizes given regexps

Is there a tool that will accept a list of regexps and produce a picture of the minimal DFA that will recognize these regexps, each into its corresponding final state?

It should look something like this: https://i.sstatic.net/ZOGRS.jpg The picture is taken from Stanford compilers class, probably made by the teacher himself. This FA handles a subset of Pascal tokens, the numbered/lettered states are final states.

I don't need the actual code for the DFA, just the picture of how it looks.

If there is no such tool, how would I go about making this kind of graphs? Is there some kind of specialized python GUI library that will do that?

Upvotes: 3

Views: 389

Answers (1)

Griffin
Griffin

Reputation: 14654

I can't remember if it does exactly what you want, but JFLAP Will let you enter a regular expression and then convert to a NFA/DFA.

Upvotes: 2

Related Questions