/automata-from-regex

A python program to build nfa, dfa and minimised DFA from given regular expression. Uses Tkinter for GUI and GraphViz for graphs.

Primary LanguagePython

Automata From Regular Expressions

Overview and Usage

This is a python program to contruct e-NFA, DFA, and minimised DFA from a given regular expression, built as a class project for Formal Language and Automata Theory.

It requires the python programming language: Python 2.7 (http://python.org/download/)

The program can be run by passing the regex as a command line argument: python cli.py "(0+1)*+01*0"

Alternately, you can use the GUI built using the Tkinter Library: python gui.py

You may get a 'command not found' error in Windows, which means python is not in your PATH. Check out how to add python to your path here: http://superuser.com/questions/143119/how-to-add-python-to-the-windows-path

The program also has the ability to create graphs from the built automata. For that, it requires:

Ubuntu users can install them by running sudo apt-get install python-imaging-tk graphviz

Checkout the included screenshots. The GUI is not the best in the world, but it gets the work done :)

Acknowledgements

License

GNU GPLv3