I took the following figure from JSON official site.

Is there a package to do it easily?
Anyway, what is the name of this diagram?
|
that are so-called railroad diagrams for the syntax and can be set with simple nodes and loops:
|
|||
|
|
|
I believe these are called "syntax diagrams". I don't know about a package, but there is a tool called syngen on ctan that will generate those. It uses LaTeX picture environment, so the results are not as good looking as if you used tikz or pstricks, but maybe you could modify the code to produce some tikz code instead. |
|||
|
|
|
No package but a tutorial: Diagrams as Simple Graphs in the pgfmanual page 60. You only need to change (modify) some styles |
|||
|
|
|
I am sure you can find an example on www.texample.net that you can modify to suit your needs. I am not aware of a package that does precesily the job. |
|||
|
|
chainslibrary. See the fourth tutorial in the TikZ manual. – Caramdir Mar 24 '11 at 4:26