4 ms·
For now, it produces a recursive descent parser. Packrat parsing is an open-question since I'm afraid that adding a memoization layer all throughout the parser
by dragostis 9y ago
For now, it produces a recursive descent parser. Packrat parsing is an open-question since I'm afraid that adding a memoization layer all throughout the parser will lead to a consistent general slowdown.
- DC-3 9y agoInteresting. I'll try and find some time to read the source - am interested to see how this is implemented.
- dragostis 9y agoA good place to start would be in the manually written example. [1] My current plan is to try and limit the the use of memoization such that it still guarantees linear parsing, but it doesn't memoize unless necessary. [1]: https://github.com/pest-parser/pest/blob/master/pest/examples/parens.rs#L20 https://github.com/pest-parser/pest/blob/master/pest/example...
- DC-3 9y agoI appreciate the link - I'm teaching myself about parsers right now and like the rest of HN I like Rust programs ;)