Complete D grammar
Nick Sabalausky
a at a.a
Mon Mar 28 13:29:43 PDT 2011
"David Nadlinger" <see at klickverbot.at> wrote in message
news:imq92m$1ru0$1 at digitalmars.com...
> On 3/28/11 5:17 PM, Kagamin wrote:
>> Trass3r Wrote:
>>
>>> Didn't someone here have a complete D grammar? I vaguely remember that
>>> there is at least a D1 one buried somewhere.
>>
>> huh?
>> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=20299
>
Like Trass3r said, that's lexing-only right now.
> Nope, Trass3r is talking about a grammar for the D language itself,
> whereas Goldie is a parser generator for D (which generates parsers for a
> given grammar).
>
Technically speaking, Goldie doesn't actually generate parsers, it has one
grammar-independent parser that it uses for all grammars (fairly
characteristic for LALR(1), AIUI). Although, in the static-style it does
make a slight custom modification to the parser and lexer so that each token
emitted is properly typed. Which I suppose amounts to six-of-one,
half-dozen-of-the-other...
> Unfortunately, I only remember someone working on one (and filing some
> related bugs), I lost the details as well.
>
Yea, I remember that too. Someone took all the BNF sections from D's docs on
digitalmars.com, put them together, and filled in some missing/erroneous
parts. Maybe it's on wiki4d?
More information about the Digitalmars-d
mailing list