Thread overview
Exact Grammar for D and Implicit Violations without Documentation
Apr 03, 2022
tyckesak
Apr 03, 2022
max haughton
Apr 03, 2022
Basile B.
April 03, 2022

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!

April 03, 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.

April 03, 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!

I've looked a bit to the updates in the issue tracker and it turns out that what you actually talk about is not the grammar but the semantics. Grammar issues are tracked in this meta issue, and are only related to errors in the parsing rules, i.e sequences of tokens.