On 07/04/2012 11:41 PM, Jonathan M Davis wrote:
On Wednesday, July 04, 2012 15:32:16 Wouter Verhelst wrote:
Jonathan M Davis<jmdavisp...@gmx.com> writes:
On Wednesday, July 04, 2012 14:53:02 Wouter Verhelst wrote:
Hi folks,
Does someone know of a parser generator for D?
If it doesn't exist, I can write a parser by hand, but having it
generated (at least for my initial permutation) seems like a better
idea...
Thanks,
https://github.com/PhilippeSigaud/Pegged
https://github.com/PhilippeSigaud/Pegged/wiki
Whoa. That's so perfect, it makes me drool.
Yeah. It's pretty cool. It really shows up D's metaprogramming capabilities.
The one thing to watch out for though is that such metaprogramming tends to
eat up a lot of memory when compiling at this point (primarily because the
compiler doesn't manage memory very well at this point - it's approach is very
simplistic). So, that may or may not cause you problems. It should be fixed
eventually, but it does sometimes cause problems with this sort of thing.
std.regex has similar issues.
- Jonathan M Davis
https://github.com/PhilippeSigaud/Pegged/wiki/Grammars-as-D-Modules