PhilippeSigaud/Pegged — pull request #20 by chadjoan (2012-05-16 04:15:15+00:00)
Title: These are changes I needed to make to get things compiling with dmd 23bb1acdadaaa5b711974c5a144829b510d6f655

I like where Pegged is going!

I was never able to create a parser for the D grammar at compile time because DMD would run out of memory within the first couple hundred lines of the grammar. So instead, I have taken to generating the parser at runtime and executing it at runtime.

Note that I would have saved a few hours of staring at DMD segfaults if I had realized immediately that I should make grammar.d produce pragma statements to help me track the sources of problems. This is in the pull request.

When I did insert pragmas, I discovered that some recursive rules cause DMD to segfault. My workaround is to rewrite them as repetitions, which sounds like something that should be done anyways for efficiency reasons.