0

Here's an example taken from http://json.org/

enter image description here

Is there a name for this kind of diagram?

  • Looks like regular expression drawn with a diagram. – Euphoric Sep 10 '18 at 5:27
6

They are called railroad diagrams or syntax diagrams.

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 as metalanguages. Early books using syntax diagrams include the "Pascal User Manual" written by Niklaus Wirth 1 (diagrams start at page 47) and the Burroughs CANDE Manual.[2]. In the compilation field, textual representations like BNF or its variants are usually preferred. BNF is text-based, and used by compiler writers and parser generators. Railroad diagrams are visual, and may be more readily understood by laypeople, sometimes incorporated into graphic design. The canonical source defining the JSON data interchange format provides yet another example of a popular modern usage of these diagrams.

I like the name railroad diagram, because you can see the train ride along the tracks. And it would be fun to combine a model railroad to a parser ;-).

0

It looks like a state diagram. These are often used to describe Deterministic Finite Automata or a Finite State Machine.

Not the answer you're looking for? Browse other questions tagged or ask your own question.