Shunting Yard algorithm and calculating from Reverse Polish Notation