parser generator in d

BCS ao at pathlink.com
Wed Jul 2 15:44:11 PDT 2008


Reply to llee,

> Robert Fraser Wrote:
> 
>> llee Wrote:
>> 
>>> Does any one know of any parser generators for D? I'm linking
>>> against c files generated using bison, and while this works, It
>>> would be better if D had support for complex parsing tasks.
>>> 
>> Besides the ones already mentioned, there's also this marvel of
>> CTFE/template meta-programming that doesn't require any separate
>> generation step (you put the BNF grammar right into your source
>> file): http://www.dsource.org/projects/scrapple/browser/trunk/dparser
>> 
>> IMO, it's the coolest ting I've seen in D, but it'll bloat your
>> compile-times to a few minutes if you use a complex grammar.
>> 
> do you have any documentation for it? If so I'll probably put it to
> use.
> 

If you are planning on doing anything serious, be warned I have some major 
braking changes coming but I have no clue when. 

The current implementation forces the user to do gobs of down casts and I 
think I have figured out how to avoid that. However it is going to change 
the call signature on just about everything.

The documentation is at the top of the file. I have a revamp of that as well, 
but it's for the new version and again, pot luck on when it will get done.

This thing isn't alpha, it prototype, if that.





More information about the Digitalmars-d mailing list