<!-- markdownlint-disable-file MD033 -->
# PyRailroad : Railroad-Diagram Generator

<figure>![Title image](images/title.svg)</figure>

PyRailroad is a Python package to draw railroad (or syntax) diagrams. Based largely on [railroad-diagrams](https://github.com/tabatkins/railroad-diagrams) and the [partial parser](https://github.com/speced/bikeshed/blob/main/bikeshed/railroadparser.py[), both by [tbatkins](https://github.com/tabatkins)

This package can be used as a stand-alone (command-line interface) generator or as a library. this generates railroad diagrams (like what [JSON.org](http://json.org) uses) using SVG.

Railroad diagrams, or syntax diagrams, are useful in representing *grammar* in the programming sense.

This tool cas be used standalone as a command line program ([CLI](cli/index.md)) or as a [library](library.md).

A [Gallery](gallery.md) is also available to see how all the elements interact together.
