January 10th, 2013, 10:18 AM
evaluating logical boolean expressions
I am looking for a library to aid me in evaluating Boolean expressions.
For example, i have an expression like this:
(it can alos be much longer!)
(1*(5+3)+9*65/5-(354*4565*5643+98) >= 12345) && ( 654*987+123 || (2345 > 23423 && 1 != 2)))
and would like to evaluate them to a true/false boolean.
My dear gcc would kick some *** here with its static evaluation, but it`s way too complicated to use a compiler or the like for this.
There are tons of libraries to calculate the (numerical) result of a mathematical expression, but this is not what i want to do.
Click Here to Expand Forum to Full Width