In reference to the accepted solution in: SO:expression_evaluator
Can anyone provide a version that works with negation as well? things like
((!(0 or !1) and !((0 or 1 or 1) and !1))
need to work as well.
I got it working so that negating the 0's or 1's is fine but I can't get it to work with the negation of whole groups(!'s at beginning of parenthesis)
I tried negating tmp after returning from eval in the *expr == '(' block.. if ! had been seen before calling it, but that didn't work.