Skip to content

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.