Jump to page: 1 2
Thread overview
parser generator in d
Jul 02, 2008
llee
Jul 02, 2008
BCS
Jul 02, 2008
Robert Fraser
Jul 02, 2008
llee
Jul 02, 2008
BCS
Jul 02, 2008
Moritz Warning
Jul 03, 2008
sambeau
Jul 03, 2008
llee
Jul 03, 2008
llee
Jul 03, 2008
Don
Jul 03, 2008
llee
Jul 04, 2008
Nick Sabalausky
Jul 04, 2008
Manfred_Nowak
July 02, 2008
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.
July 02, 2008
"llee" <llee@goucher.edu> wrote in message news:g4gp9o$2042$1@digitalmars.com...
> 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.

There's Enki:

http://www.dsource.org/projects/ddl/wiki/Enki

I've never used it, so I can't say how complete/powerful it is.


July 02, 2008
Reply to llee,

> 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.
> 

Antlr is supposed to have D support but I havn't even tried to use it. (I found antler to be hard to work with in general)
http://www.antlr.org/

there's also my project dparser. Not vary mature and not well tested but it doesn't requirer anything but DMD to build.
http://www.dsource.org/projects/scrapple/browser/trunk/dparser/dparse.d

APaGeD - Attributed Parser Generator for D
http://www.digitalmars.com/d/archives/digitalmars/D/announce/Parser_Generator_APaGeD_0.3_beta_release_9653.html
http://apaged.mainia.de


July 02, 2008
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.
July 02, 2008
On Wed, 02 Jul 2008 16:43:36 -0400, 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.

There is http://apaged.mainia.de for example.
July 02, 2008
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.
July 02, 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.


July 03, 2008
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.

I'm a bit surprised that no-one has mentioned that the (kinda) new industry standard  hasn't been mentioned here..

Ragel:
http://research.cs.queensu.ca/~thurston/ragel/

it generates C, C++, Objective-C, ****D****, Java or Ruby code with no dependencies.

And a) generates very fast code, and b) is (frankly) very cool.



July 03, 2008
sambeau 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.
> 
> I'm a bit surprised that no-one has mentioned that the (kinda) new industry standard  hasn't been mentioned here..
> 
> Ragel:
> http://research.cs.queensu.ca/~thurston/ragel/
> 
> it generates C, C++, Objective-C, ****D****, Java or Ruby code with no dependencies.
> 
> And a) generates very fast code, and b) is (frankly) very cool.
> 
> 
> 
I just took a look at it. It loooks very promising. Thanks for the link.
July 03, 2008
sambeau 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.
> 
> I'm a bit surprised that no-one has mentioned that the (kinda) new industry standard  hasn't been mentioned here..
> 
> Ragel:
> http://research.cs.queensu.ca/~thurston/ragel/
> 
> it generates C, C++, Objective-C, ****D****, Java or Ruby code with no dependencies.
> 
> And a) generates very fast code, and b) is (frankly) very cool.
> 
> 
> 
I just took a look at it. It loooks very promising. Thanks for the link.
« First   ‹ Prev
1 2