Packrat Parsing: Simple, Powerful, Lazy, Linear Time, Unlimited Memory
But I still think it's a pretty good idea.
But I still think it's a pretty good idea.
It turns out that, in practice, it's better to be selective about where you apply the packrat mechanism.
The mathematical function doesn't matter as much as the practical overhead.
I mean... the clue's in the name, right?
(I worked on PEG and Packrat for my MEng.)
But, seriously, it's called "packrat parsing," because it saves all the things. You have to expect it's going to use a bit of memory.