A python tool for Regex conversion to nondeterministic finite automaton (NFA).
This repo contains the 🐍 code for converting a valid Regular Expression to its equivalent Epsilon-NFA.
The code is divided into these major parts:
- NFA CONSTRUCTION
- NFA TRANSITION TABLE
- NFA VISUALIZATION
Make sure you have Graphviz installed in your system and added to System PATH.
and for necessary Python Libraries, simply run:
pip install -r requirements.txt
Now open terminal(in the same folder) and run:
python convert.py "REGEX"
replace the REGEX with the actual Regular Expression you want to generate the table and graph for.
NOTE: No guarantee that the code works for all types of regular expressions, but works for most of them.
Any suggestions, improvements, and feedback is welcome.