7

Take a look at this; it's very obvious how it works and what its purpose is:

alt text
(source: json.org)

  1. What's this type of chart called?
  2. Can I make this kind of chart in Visio?
  3. What software do you recommend for making this kind of chart?
Glorfindel
  • 19,729
  • 13
  • 67
  • 91
Nathan Ridley
  • 31,947
  • 30
  • 116
  • 188
  • 3
    Although I know what it does, I wouldn't go that far as to call it "obvious". – Rook Feb 16 '10 at 00:48
  • 3
    Honestly, I think a regex is far more "obvious" than that diagram. `/-?([1-9][0-9]*|0)(\.[0-9]*)?([eE][+-]?[0-9]*)?/` – Anon. Feb 16 '10 at 00:52
  • A regex isn't as universal as a railroad diagram. A regex requires someone to learn the syntax of a regex first, while a railroad diagram let's you dive in. – pokstad Feb 16 '10 at 01:00
  • I didn't even stop to think for a second that you were joking. Man, I am dense. "I'm Dumbass material, Mr Dumbass." "It's Du-mas" – pokstad Feb 16 '10 at 01:07

3 Answers3

7

It's called a railroad diagram. It can more specifically be called a syntax diagram. Not sure about Visio support but other tools can get the job done: What is a good tool for creating railroad diagrams?

alt text
(source: antlr.org)

If you have a grammar file you can try to get it working in ANTLR Works, which is specifically built for working with the syntax and grammar of languages.

Glorfindel
  • 19,729
  • 13
  • 67
  • 91
pokstad
  • 3,187
  • 3
  • 26
  • 39
2

These are called Syntax diagrams (or railroad diagrams).

They can be created with Visio or Creative Docs .NET

See here for more info:

Tool for generating railroad diagram used on json.org

Community
  • 1
  • 1
Chris Fulstow
  • 38,141
  • 9
  • 83
  • 109
1

It is a syntax diagram; not sure if there is any visio addon to paint this kind of chart.

Otávio Décio
  • 70,467
  • 17
  • 156
  • 220