3 ms·
Ctrl+F "pratt", no matches. How is this technique still not widely known? (Though one of their sources does mention it in passing)
by formerly_proven 6y ago
Ctrl+F "pratt", no matches. How is this technique still not widely known? (Though one of their sources does mention it in passing)
- neel_k 6y agoPratt parsing (aka top-down operator precedence) is a special case of LR parsing. Since Laurie Tratt (the author of the article) is advocating LR parsing, he has no need to talk about Pratt parsing since it is a special case of the approach he advocates. The nicest explanation of this fact is in Olivier Danvy and Kevin Millikin's paper Refunctionalisation at Work -- as an example of their program transformation technique, they demonstrate how operator precedence turns into shift-reduce. It's really cute.