PLY grammar visualization tool
- Python 100%
| .gitignore | ||
| autogramm.py | ||
| fp.dot | ||
| fp.png | ||
| fp.py | ||
| lexer.py | ||
| LICENSE | ||
| parser.py | ||
| README.md | ||
| sml.dot | ||
| sml.png | ||
| sml.py | ||
autogramm, a PLY grammar visualization tool
Sometimes you need to understand the context of a particular grammar rule. This could be tedious when the grammar is a bit complex or not as you would've written it.
autogram generates a DOT (GraphViz) script you can fairly easily customize to produce some nice PostScript output.
Examples
Simplified XML parser
autogramm.py sml.py|dot -Tps >sml.ps
yields
Simplified C function definition parser
autogramm.py fp.py|dot -Tps >fp.ps
yields
Usage
autogramm.py [--back] [--unused] script
positional arguments:
script input file
optional arguments:
--back show backreferences
--unused show unused rules

