Let's stop parser Hell

Roman D. Boiko rb at d-coding.com
Thu Jul 5 05:28:07 PDT 2012


On Thursday, 5 July 2012 at 12:11:33 UTC, Denis Shelomovskij 
wrote:
> There are more and more projects requiring parsing D code (IDE 
> plugins, DCT and dfmt now).
>
> We definitely need a _standard_ fast D parser (suitable as 
> tokenizer). We already have a good one at least in Visual D. 
> Maybe dmd's parser is faster. If so, it can be (easily?) 
> rewritten in D. We also already have some other parsers (in C# 
> from Mono-D etc.).
>
> What about to get one and call it standard?

Visual-D is not Boost-licensed (I think this would be possible to 
change)
Mono-D is written in C#, as you mentioned
Pegged may eventually become standard, if it will be performance 
optimized and a bit more customizable
Dscanner(https://github.com/Hackerpilot/Dscanner) from Brian 
Schott is pretty good, too.
SDC is another nice option
DIL (http://code.google.com/p/dil/) is very nice but GPL

I plan to try using Pegged inside my DCT project. Probably that 
will require huge modifications though...

Some more links from Pegged readme:

> Hisayuki Mima's CTPG(https://github.com/youkei/ctpg), very 
> similar, also done in D. Have a look!
> Nick Sabalausky's Goldie 
> (http://www.dsource.org/projects/goldie).
> Benjamin Shropshire's dparser 
> (http://dsource.org/projects/scrapple/browser/trunk/dparser).

> Martin Nowak put these gists on the D newsgroup:
> https://gist.github.com/1255439 - lexer generator
> https://gist.github.com/1262321 - complete and fast D lexer



More information about the Digitalmars-d mailing list