4 ms·
It's odd that he talks about hacking together precedence parsing, when the very nice algorithms for doing that are well known. Check out http://en.wikipedia.or
by elgenie 16y ago
It's odd that he talks about hacking together precedence parsing, when the very nice algorithms for doing that are well known.
Check out http://en.wikipedia.org/wiki/Shunting_yard_algorithm http://en.wikipedia.org/wiki/Shunting_yard_algorithm at http://en.wikipedia.org/wiki/Operator-precedence_parser#Example_algorithm_known_as_precedence_climbing_to_parse_infix_notation http://en.wikipedia.org/wiki/Operator-precedence_parser#Exam... makes that
- beza1e1 16y agoAdditionally, precendence climbing allows the programmer to define new operators. For example Haskell has that.