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 looked at ragel and I will probably end up using it. Does anyone know where I can find examples or further documentation for using it with d.
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.

That is very cool. Deserves a link on the D website, I reckon. The number of quality tools with native support for D is quite limited, and we should promote them as much as possible.
July 04, 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.

I'm working on one right now as a side project, but it's nowhere near being in any usable form yet.


July 04, 2008
llee wrote:

> parser generators for D

GOLD (http://www.devincook.com/goldparser/) is a forever free tool for visual aiding the definition of LALR(1)-grammars for a given language.

It has an import feature for yacc grammars and can generate parsers and scanners in D. The generation process is guided by user definable macros.

A macro collection for D is available (author: Matthias Piepkorn) http://www.devincook.com/goldparser/engine/d/index.htm

I have setup a macro collection too, which seems to be twice as fast as Matthias'. My collection is unpublished but I am willing to share on a personal basis.

-manfred
1 2
Next ›   Last »