I'm currently trying to parse math expression into expression tree. But I'm stuck on the stage where I need to implement functions and negates. I don't understand logic to do it using Shunting-Yard algorithm.
What I currently want to do is to support
- Negates, like -(x+5)
- Function calls, like min(x,y)
- Power just after function name, like cos^2(x)
- Implicit multiplication, like 2x is same as 2*x
- Scientific notation
- Constants e and pi
Can somebody tell me hints how to implement this?