I recently replied a post like this. I that case I suggested the use of
BeanShell. It is an open source scripting language and it comes with an expression evaluator. You simply pass an
String containg the expression and get the result.
Another option would be to use the new scripting powers of JDK6. Take a look at it.
I hope this helps!