On 05/23/12 17:17, d coder wrote: > I am trying to use Pegged for compile time parsing. The only issue I am > facing is with the compile time memory. I have a rather simple grammar, > mostly derived from the arithmetic.d example that comes bundled with Pegged. > > I am wondering if the memory could be optimized by fine-tuning the code in > the grammar that I have written. I am pasting the code down here for > suggestions. On my 64-bit linux machine my small application is taking as > much as 2.2GB of RAM at the time of compiling the code using DMD 2.059. I am > using the latest Pegged code from github.
It really appears to be that heavy - i once tried to use it for some compile time parsing, but it turned out that just importing the module was so expensive (added seconds to every compiler invocation, iirc) and it got disqualified before i even had a chance to try it... artur
