Is the declaration grammar definition of 'Parameter' correct?

Michal Minich michal.minich at gmail.com
Sun Jun 13 13:34:48 PDT 2010


On Sun, 13 Jun 2010 20:15:46 +0000, BCS wrote:

> The first thing to do is put all of the description of the grammar in
> the docs into one place.

If we are at it, it would be good to enhance visual representation of 
docs by generate syntax diagram, similarly as on http://www.json.org/ it 
not only helps to learn and understand grammar, but also lowers the 
barrier to just looking at it. When I first saw this kind of diagrams on 
JSON site, it made good impression on me.

Tool used for this is.
http://dotnet.jku.at/applications/Visualizer/

Another important point is - having it visually really help find and 
enhance specs.

This tools accepts EBNF syntax that is specified on the page. D syntax is 
specified in BNF, and uses different syntax, but (E)BNF is so simple, it 
should be possible to adjust different syntaxes just using regex (I think/
hope).

If there is interest in such diagrams, and there is one file syntax file, 
I would be willing to make changes to this tool (C#) to be able to batch-
generate these images. (It would be also a good idea to look at first if 
BNF diagrams look good, and if EBNF isn't necessary.)


More information about the Digitalmars-d mailing list