D Parsing (again)/ D grammar

via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 2 08:01:11 PDT 2014


On Thursday, 2 October 2014 at 13:49:12 UTC, Vladimir Kazanov 
wrote:
> The generator itself is quite powerful, theoretically it should 
> be able to handle all context-free grammar (see 
> http://dotat.at/tmp/gll.pdf for theory).

Cool, GLL is the way to go IMO, but I am also looking at 
Earley-parsers. What is the advantage of GLL over Earley if you 
use a parser generator? I think they both are O(3) or something 
like that?

> From the discussion I found out that D parser is a hand-made 
> RD-parser with "a few tricks"(c).

I think D is close to LL(2) for the most part. But I suppose a 
GLL parser could allow keywords to be used as symbol names in 
most cases? That would be nice.



More information about the Digitalmars-d mailing list