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

(source: json.org)
- What’s this type of chart called?
- Can I make this kind of chart in Visio?
- What software do you recommend for making this kind of chart?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?
(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.