Exact Grammar for D and Implicit Violations without Documentation

max haughton maxhaton at gmail.com
Sun Apr 3 18:23:20 UTC 2022


On Sunday, 3 April 2022 at 17:37:09 UTC, tyckesak wrote:
> Hi all, is there a definitive grammar sheet for D somewhere? I 
> looked
> through the grammar documentation online and through some bugs 
> on Bugzilla
> and it seems that D tacitly encourages violating the grammar 
> specs in favor of some
> ill-defined notion of brevity, but this comes at the cost of 
> much needed clarity.
> I would like to try to clean up some old bugs in Bugzilla that 
> have gone stale, and it would
> be _very_ helpful to have a common reference to stick to; right 
> now it looks like everybody
> is just winging it.
>
> Take care and be safe!

The grammar as listed on dlang.org is the closest thing to a 
singular reference but as you mention it does have bugs.

There was some movement to get this cleaned up so a tree-sitter 
grammar can be done for D, but this is still ongoing.


More information about the Digitalmars-d mailing list