Generation of Syntax Diagrams

The following form calls a program written in C++, that converts a grammar into syntax diagrams. The diagrams can be used for direct printing and inclusion in printable text files. Two examples for a grammar are given (a variant of the EBNF-grammar and the XPath-grammar).

The file-upload, some choices of the grammar type, the choice of the output format and comments are not yet implemented, so please don't use them.

If you find any errors, please contact one of us by email. Give information about the used grammar, the used options and a description of the error please. We don't store anything you input - more exactly, we delete any stored information daily at 2.14 GMT, so we can't trace back any error.

The program is submitted for public and free use. We can not assume any responsability for errors resulting from the use of this program. Neither is any liability assumed for any problems or damage resulting from the use of this program. We do not intend any commercial purpose.

The program uses the cgic and the gd package from Thomas Boutell and indirectly the freeware products libpng.a, libjpeg.a, zlib and freetype. The input filter for different grammars uses bison and flex. The program has been translated with Gnu C/C++.

The XPath grammar of the example was extracted from a publication of W3C. The BNF grammar of the example is widely known and found in thousands of books and 5010 Web pages (google search on 4.Feb.2004)

If you have problems with the page, please contact me:

spam preventioning email address

Necessary german law court amendment only: Wir distanzieren uns selbstverständlich vom Inhalt aller verlinkten Seiten! (Sogar, wenn wir sie gut finden)

Last change: 1. Nov. 2011, F. Braun

Give grammar-file for upload (not yet implemented)
or enter grammar in EBNF like the example on the left (replacing the example in the textarea of the XPath grammar written in EBNF):

syntax =  { rule } .
rule =  identifier  ":"  expression ".".
expression =  term  ( "|" term )*.
term =  factor+ .
factor =  identifier |
                quoted_symbol |
                "("  expression  ")" .
identifier =  letter ( letter | digit ).
quoted_symbol = "\""  any_character* "\"".

List of further examples

Grammar type (only the grammar types with links are implemented!) Output format Comments
lazy BNF/EBNF defined by Backus/Naur/Wirth et al png Discard comments
strict BNF defined by Jim Backus and
Pete Naur for Algol 60
jpeg Print comments
ISO EBNF defined by ISO/IEC 14977 1996(E) (zip-File) and in BSI 6154;
final draft version (SC22/N2249); (list of public standards);
W3C-BNF defined in Extensible Markup
Language (XML) 1.0
(Second Edition)
ABNF defined in RFC 2234
YACC/Bison input structure
XBNF defined in Syntax (XBNF)
Text size (pt) Image width (pixel) Image height (pixel) Magnification of images (factor)

  Written by Prof. Dr. Fritz Jobst and Dipl. Math. Frank Braun, Regensburg, Germany

Last change 4. Dec. 2013, Frank Braun,

Valid HTML 4.01! Impressum