Hacker News new | past | comments | ask | show | jobs | submit login
Top Down Operator Precedence (1971) [pdf] (daesan.com)
27 points by breck 38 days ago | hide | past | web | favorite | 4 comments



Precedence climbing can be derived intuitively from recursive descent:

https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm#more_clim...

... and "Pratt Parsing and Precedence Climbing Are the Same Algorithm" 2016):

https://www.oilshell.org/blog/2016/11/01.html

and these techniques, despite originating in the 70s, are still the state of the art in most production programming language parsers


That article "Pratt Parsing and Precedence Climbing Are the Same Algorithm" is excellent. Though Andy has a later article where he clarifies that Precedence Climbing is a special case and is more popular than general Pratt Parsing because of it's simplicity [1].

[1] "Precedence Climbing is Widely Used" http://www.oilshell.org/blog/2017/03/30.html



The only way to fly....




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: