About this siteThis is not the official site for this software - that would be
https://www.bottlecaps.de/rr/ui. However,
the official site is only available via IPv6. This site is also available via IPv4, and is
based on a fork (which includes this paragraph, and may diverge slightly from the
software
on the official site).
Welcome to Railroad Diagram Generator!
This is a tool for creating
syntax diagrams,
also known as railroad diagrams, from
context-free grammars
specified in
EBNF. Syntax diagrams have
been used for decades now, so the concept is well-known, and some tools for diagram
generation are
in existence. The features of this one 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
(XQuery,
XHTML,
CSS,
JavaScript).
Notation
For the original description of the EBNF notation as it is used here, please refer
to
"A.1.1 Notation"
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, 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
here for a shortcut.
Download
This application can be run offline, both browser-based, and as a command-line application.
It comes as a Java executable
archive and can be run with Java 11 (or higher).
This is the download link:
Source Code
The source code of this application is available on GitHub: https://github.com/GuntherRademacher/rr