I need to implement an expression evaluator with some custom types, it is easy to evaluate expressions with only numbers or variables with the help of postfix (or prefix) notation but how to extend the postfix (or prefix) form to support functions with arbitrary parameters?
Infix | postfix |
---|---|
(3+2)*2 | 32+2* |
funone(funtwo(3), 2) * 2 | ?????? |
How to convert the expression with function calls to postfix and evaluate it there are any standard algorithms for it?
I have looked at expr-eval-web and expr-eval-github the library saying it is modified version of Raphael Graf’s ActionScript Expression Parser and provided a link for it but i think it is not valid anymore. where can i find algorithm for Raphael Graf’s ActionScript Expression Parser ?