This program is written in Ubuntu12.04 and in python 2.7.  This program use data structure 'list' and 'dict' in principle such as 'PDA' , 'NFA','DFA' which we learned in TOC to generate Rules and NFA from expression instead of using 're' module provided by python. This program use pygraphviz to draw the NFA and output a 'pdf' file. Pygraphviz is a interface of 'graphviz' for python,So you should make sure that you have install pygraphviz if you want to draw a NFA.