+4  A: 

There was a similar question a few days ago: What is a good tool for creating railroad diagrams?

That question was about how railroad diagrams in the SQLite syntax diagrams were generated. The accepted answer found that the diagrams were generated using a DSL written in Tcl.

Another answer offered a suggestion to use a diagram generator which works off of EBNL grammar.

coobird
To add to that, there is also a list of tools in the Wikipedia article I link to. A true railroad diagram should not need arrows--if you imagine a train travelling those tracks it should be clear what routes you can or cannot take. And the json.org diagrams are just so pretty, I have to know if there's a tool for them =)Have already seen these links but might helps others.
aleemb
+1  A: 

See this, for example. Not quite what you need but still.

Anton Gogolev
+8  A: 

from Douglas Crockford
to Aleem B
date Tue, Apr 28, 2009 at 6:01 PM
subject Re: Railroad Diagrams on json.org

I drew them with Visio. Creative Docs.NET also works well.

--

Aleem B wrote:

Hello Douglas,

I thoroughly enjoy most things you put out there and the railroad diagrams on json.org are no different. I have been trying to look around for a tool that would generate diagrams nearly as eloquent but have had no luck:

http://stackoverflow.com/questions/796824/tool-for-generating-railroad-diagram-used-on-json-org

Is there some tool you used to convert the BNF to these diagrams or were they hand crafted?

-- Aleem

aleemb