I'm a C# newbie. I want to write a calculator app in C#. Would C# expression trees be a good way to go for the guts of it? (That is, the part that takes a series of keypresses and turns them into an expression that the calculator can evaluate and display on the screen . . . or graph.)
I'll want to include the standard math functions, including trig, logs, exponents, etc.
Since your language for mathematical expressions will surely be much, much simpler than C#, I suspect that trying to reuse the framework expression tree classes to represent your ASTs will be overkill and probably a recipe for frustration; if you look at those classes, you'll see a lot of properties and functionality that would be totally irrelevant to your little language. I'd roll your own if I were you.