Introduction
DrawSyntax is a tool to draw syntax diagrams automatically from a formal grammar. Currently, it handles EBNF grammars as defined in ISO IEC 14977 1996 (E).
Here is an example of the diagrams produced for the classical arithmetic expressions grammar:
Optional grammar simplifiers
DrawSyntax provides a set of optional automatic simplifiers which change the generated diagrams.
The most useful example is how to draw "A = B, { C, B };". The naive approach draws it like on the left image bellow, just because A is defined as "B followed by zero or more (C followed by B)". But it is completely equivalent to "one or more B's separated by C's", which should be drawn like shown on the right. According to your needs, you can activate the automatic simplifier to get this second type of diagram for the same input grammar.
There are also simplifiers to factorize the common parts in alternatives:
Or to remove the duplicate alternatives:
