出典:Wikipedia
出典:『Wikipedia』 (2011/08/03 23:30 UTC 版)
Syntax diagrams (or railroad diagrams) are a way to represent a context-free grammar. They represent a graphical alternative to Backus–Naur Form or to EBNF. Early books using syntax diagrams include the "Pascal User Manual" written by Niklaus Wirth (diagrams start at page 47) and the Burroughs CANDE manual . In the compilation field, textual representations like BNF or its variants are usually preferred. BNF is well understood by compiler writers and compilers, but is not well understood by most users of languages. Railroad diagrams are more readily understood by most people. Some of the popularity of the JSON data interchange format is due to its representation in railroad diagrams.