3 ms·
How is it so? If you're referring to the Packrat memoisation (which is not the only possible PEG implementation), you can do a lot of memory optimisation, like
by sklogic 12y ago
How is it so? If you're referring to the Packrat memoisation (which is not the only possible PEG implementation), you can do a lot of memory optimisation, like discarding memoised entries based on some rules (e.g., once a top-level entry, like a function or a class definition is parsed, all the alternative interpretations can be thrown away). You can memoise complex entries but re-parse simple tokens. And many, many more.
- sovande 12y agoI was and also when scanning/lexing. My limited PEG parsing experience is with peg/leg by http://piumarta.com/software/peg/ http://piumarta.com/software/peg/ and http://pegjs.majda.cz http://pegjs.majda.cz which is a Javascript PEG parser. Both very cool projects.
- sklogic 12y agoLooks like they do not include the optimisations I mentioned. But for this sort of use cases that would have been an overkill anyway.