Parsing object-oriented expressions with Dijkstra's shunting yard algorithm
Oct 05, 2010, 03:03 (0 Talkback[s])
"Dijkstra's standard shunting yard algorithm converts infix
expressions to RPN (Reverse Polish Notation).
"For example:
1.$ echo "a+b" | ./shunt2.sh
2.
3.a b +
4.
The standard algorithm is able to handle operator precedence:
1.$ echo "a+b*5" | ./shunt2.sh
2.
3.a b 5 * +
4.
Complete Story
Related Stories: