Welcome to Railroad Diagram Generator!
This is a tool for creating
also known as railroad diagrams, from
EBNF. Syntax diagrams have
been used for decades now, so the concept is well-known, and some tools for diagram generation are
in existence. This one has a focus on web orientation, so its features are
- usage of the W3C's EBNF notation,
- web-scraping of grammars from W3C specifications,
- online editing of grammars,
- diagram presentation in SVG,
and it was completely written in web languages
Due to the use of SVG, a browser capable of handling inline SVG is required. However this applies
to most modern browsers.
For the original description of the EBNF notation as it is used here, please refer to
in the XQuery recommendation. The
XML recommendation contains a
similar section, "6 Notation".
Below is a self-describing grammar for the EBNF notation.
For viewing railroad diagrams of this very grammar, you could either
- select "EBNF Notation" from the "Get Grammar" tab, or
- copy and paste the above grammar to the "Edit Grammar" tab
and then proceed to the "View Diagram" tab. Or just click
for a shortcut.