Re:A Handwritten Math Parser in 100 lines of Python
by westurner on Thursday September 17, 2020 @10:13AM
(#24504857)
Reverse Polish notation (RPN) > Converting from infix notation
https://en.wikipedia.org/wiki/Reverse_Polish_notation#Conver... > Shunting-yard algorithm
https://en.wikipedia.org/wiki/Shunting-yard_algorithm
Infix notation supports parentheses.
Infix notation: 3 + 4 × (2 − 1)
RPN: 3 4 2 1 − × +
Re:A Handwritten Math Parser in 100 lines of Python
by mucinoab on Thursday September 17, 2020 @11:43AM
(#24506025)
I would like to know the name of that paper if anyone knows.
Re:A Handwritten Math Parser in 100 lines of Python
by lioeters on Friday September 18, 2020 @01:10AM
(#24513210)
I believe he was talking about Pratt parsing in the video.
Top Down Operator Precedence - Vaughan R. Pratt - https://tdop.github.io/
What he called "priority" is called "binding power" in the paper.
[1] https://www.youtube.com/watch?v=MnctEW1oL-E&t=4578s