On Tue, Nov 5, 2013 at 8:27 AM, Brian Schott <briancsch...@gmail.com> wrote:

> But we should take a step back first. Before we try to implement a parser
> for D's grammar, we need to figure out what exactly D's grammar is.
>
> Seriously. We don't have a real grammar for D. We have the language spec
> on dlang.org, but it isn't complete, consistent, or updated when the
> language changes. Want examples? I have a tracker for them here:
> http://d.puremagic.com/issues/show_bug.cgi?id=10233
>
> There's also my project here: https://github.com/Hackerpilot/DGrammar,
> but it's not official and I keep finding differences between it and the
> behavior of DMD.
>
> Why am I the only one who thinks this is a problem?
>

You're not alone in this, but Walter's answer is that we must make pull
requests on the website if we find errors in the online grammar. The
problem is not knowing what the intended behavior is. When the reference
compiler and the grammar disagree, who I am to say which is wrong?

We could also see if some slight modification to the grammar could push it
into LALR(1) territory.

Reply via email to