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
I recommend to look at CoreCalc/FunCalc work: http://www.itu.dk/people/sestoft/funcalc/
I've used their grammar for COCO\R parser generator in production and it works really fast.
All you need to do is: 1. get excel grammar from corecalc 2. run coco.exe on it (generates parser for excel-like expressions) 3. translate expression tree to reverse polish notation 4. simple calc