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.
autogramm.py sml.py|dot -Tps >sml.ps
yields
autogramm.py fp.py|dot -Tps >fp.ps
yields
autogramm.py [--back] [--unused] script
positional arguments:
script input file
optional arguments:
--back show backreferences
--unused show unused rules