In the first part of article I presented the parser for conversion a traditional algebraic expression to the RPN representation. In this part, I will show you, how to implement the algorithm for calculating the RPN expression and the architecture to extending abilities of the parser to support custom functions.
-
-
Mathematical expressions in the traditional algebraic notation can be calculated using an algorithm RPN (Reverse Polish Notation). In the first part of this article, I will show you how to implement a parser that converts the traditional algebraic form of mathematical expression to the RPN notation. In the second part of article, I will implement an algorithm for calculating the RPN expression and the architecture which allows for easy extend the the parser to support mathematical custom functions.