Converting infix to RPN (shunting-yard algorithm)
If you've tried to write your own calculator (something in the style of gcalctool) you've probably had to build a simple converter for your mathematical expressions from infix notation to RPN (Reverse Polish Notation).
Inspired by this classical SPOJ challenge I wanted to write my own simplified version of an expression converter.
In order to parse and convert a given infix mathematical expression to RPN we will use the shunting-yard algorithm . Just like the evaluation of RPN, the algorithm is stack-based .
To find out more please read the full article .