3 ms·
Recursive descent is a very elegant and simple algorithm, which is quite easy to understand even without going deep into language theory. Deriving precedence cl
by userbinator 11y ago
Recursive descent is a very elegant and simple algorithm, which is quite easy to understand even without going deep into language theory. Deriving precedence climbing from it is also not difficult:
https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm#more_climbing https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm#more_clim...
Precedence climbing is an even more elegant and simpler solution to multiple precedence levels, allowing things like this:
https://news.ycombinator.com/item?id=8558822 https://news.ycombinator.com/item?id=8558822