grammar.py is meant as a compiler compiler compiler, taking in a grammar structure and returning flex and bison files. It can also parse EBNF. Currently there are still remnants of VHDL-specific stuff in the code, because parsing VHDL was what it was initially about.