3 ms·
> Not all PEGs and absolutely not all recursive descent parsers are packrats. Of course not, see the link I posted. PEGs are TDPL and recursive descent (not th
by muyuu 12y ago
> Not all PEGs and absolutely not all recursive descent parsers are packrats.
Of course not, see the link I posted. PEGs are TDPL and recursive descent (not the other way around), and an alternative to CFGs. PEGs were coined by Bryan Ford, who then coined packrat parsing based on them.
You want to do smarter things than just memoising everything, yeah. Especially for complex grammars.
See http://ialab.cs.tsukuba.ac.jp/~mizusima/publications/paste513-mizushima.pdf http://ialab.cs.tsukuba.ac.jp/~mizusima/publications/paste51...