10 templates
Railroad / syntax diagram templates
Native railroad (syntax) diagrams for grammars, json.org style. One production per block — `rule ::= term | other` — with sequences, stacked `|` choices, `[optional]` bypasses, `{repetition}` loops and `(grouping)`. Quoted terminals render as rounded pills, bare nonterminals as rectangles, and every rule in the document renders as its own stacked diagram. The standard way language and API docs explain syntax.
Railroad — JSON Grammar
The json.org grammar as stacked railroad diagrams — the canonical example.
UML & SoftwareRailroad — Arithmetic Expressions
Classic expr / term / factor precedence-climbing grammar for calculators and compilers.
UML & SoftwareRailroad — Semantic Version
SemVer 2.0: major.minor.patch with optional pre-release and build metadata.
UML & SoftwareRailroad — URL Structure
Simplified URI grammar: scheme, authority, path, optional query and fragment.
UML & SoftwareRailroad — CSV (RFC 4180)
Records, fields, and quoted fields with escaped double quotes.
Data & SchemaRailroad — ISO 8601 Date/Time
Calendar date with optional time, seconds, fraction, and timezone designator.
Data & SchemaRailroad — Email Address
Simplified RFC 5322 addr-spec: dot-atom local part at a dotted domain.
UML & SoftwareRailroad — SQL SELECT
The reading path of a SELECT statement: columns, FROM, joins, WHERE, GROUP BY, ORDER BY.
Data & SchemaRailroad — IPv4 & CIDR
Dotted-quad addresses and CIDR notation — a compact teaching grammar.
UML & SoftwareRailroad — Lexer Tokens
Identifier, number, and string-literal token shapes for a language spec's lexical section.
UML & Software