Railroad Diagrams (Syntax Diagrams)
Railroad diagrams aka syntax diagrams have never really taken off. I’ve only come across two memorable uses of them, in a Pascal textbook that I used as a freshman and on JSON.org. The former was surely influenced by Niklaus Wirth’s Pascal User Manual, which also used them. For communicating with laypeople, the simple diagrams convey much more information than a textual grammar.
There are a few tools which can generate such diagrams from EBNF grammars, including the online Railroad Diagram Generator and the Railroad-diagram Generator library. Other tools can be found in the answers to the StackOverflow question.
blog comments powered by Disqus