Syntax Diagrams¶
Python library for rendering syntax diagrams (a.k.a. railroad diagrams).
Features¶
Automatic line wrapping, keeping width of the diagram below limits.
Clever rendering of optionals, avoiding clutter where possible.
Automatic right-to-left rendering in one-or-more loops.
Producing SVGs or ASCII art.
See also: sphinx-syntax, a Sphinx plugin for documenting grammars.
Example output¶
This is a part of SQLite’s grammar rendered with this library: