I want to develop a logical expression evaluator to compute applicability of certain logical expression against a particular expression. For example,
An expression could be of the form
(A AND B) NOT C
this expression should then be evaluated with another expression like
(B AND C) OR D
The result of the evaluation in the above case is FALSE as the second expression doesn't full fill the first.
The expression can be more complex also, like it can have numerical ranges R(1-100) which means the applicability of the expression is valid through the ranges, like [A-Za-z0-9] in regular expression.
So the expression can be complex like
(A AND B) OR C AND R(1-100) NOT R(80-100)
and this has to be then evaluated by an expression like
(C OR D) AND B NOT R(1-7) AND R(25-100)
There are clear rules on when an expression satisfies another expression. So, if one has to write an expression evaluator, what is the best way to go. Since, I haven't done something before, I would like to have an head start. Any relevant pointers, or similar implementations could be vast help.