digitalmars.D - parser generator in d
- llee <llee goucher.edu> Jul 02 2008
- "Jarrett Billingsley" <kb3ctd2 yahoo.com> Jul 02 2008
- BCS <ao pathlink.com> Jul 02 2008
- Robert Fraser <fraserofthenight gmail.com> Jul 02 2008
- llee <llee goucher.edu> Jul 02 2008
- BCS <ao pathlink.com> Jul 02 2008
- Moritz Warning <moritzwarning web.de> Jul 02 2008
- sambeau <sambeau-nospam mac.com> Jul 02 2008
- llee <llee goucher.edu> Jul 03 2008
- llee <llee goucher.edu> Jul 03 2008
- Don <nospam nospam.com.au> Jul 03 2008
- llee <llee goucher.edu> Jul 03 2008
- "Nick Sabalausky" <a a.a> Jul 03 2008
- "Manfred_Nowak" <svv1999 hotmail.com> Jul 04 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.
Jul 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.
Jul 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
Jul 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.
Jul 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.
Jul 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.
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.
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.
Jul 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.
Jul 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.
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.
Jul 02 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.
Jul 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.
Jul 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.
Jul 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.
Jul 03 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.
Jul 03 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
Jul 04 2008









"Jarrett Billingsley" <kb3ctd2 yahoo.com> 