I have an application that needs to allow users to write expressions similar to excel:
(H1 + (D1 / C3)) * I8
and more complex things like
If(H1 = \'True
Check out ANTLR. You define a language syntax, test it using a GUI tool and generate source code in a variety of languages. Open Source.