Given a string containing a mathematical expression, given a set of functions/commands and given a set of assigned variables, are there tools that .NET provides to quickly build a parser?
I would like to build a simple parser that analyzes an expression and breaks it into its simplest components, for example:
d*(abs(a-b)+sqrt(c))
becomes
f = abs(a-b)andg = sqrt(c)e = f + gd*e
Check out veparser as well. Here is a sample code that shows how you can build an expression evaluator( the code parses the expression and directly calculates the output ). This sample can be modified to store the evaluation tree instead of running it.