20 ms·
But packrat parsers don’t require nearly that much space in practice, right? Most languages I’ve worked with will have a relatively small number of production r
by centimeter 6y ago
But packrat parsers don’t require nearly that much space in practice, right? Most languages I’ve worked with will have a relatively small number of production rules, requiring only a small number of results at each parsing position.
- chrisseaton 6y agoI think in practice they're pretty chunky.
- ackien 6y agoI've also had luck with only storing results for only a very small subset of the productions of a grammar.
- barrkel 6y agoLanguages with a small number of rules barely require parser tooling; ad-hoc hand-written recursive descent parsers don't add any dependencies, are trivial to write and are known to run well, if you have constant lookahead.