Skip to content

ghuysmans/autogramm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

SML graph

Simplified C function definition parser

autogramm.py fp.py|dot -Tps >fp.ps

yields

FP graph

Usage

autogramm.py [--back] [--unused] script

positional arguments:
  script      input file

optional arguments:
  --back      show backreferences
  --unused    show unused rules

Releases

No releases published

Packages

No packages published

Languages