I have a large database of boolean values and want to build a framework for easily running queries over all of the values. To do this, I'd like to write a function that, given a string representation of a boolean expression, would evaluate that expression over all of the elements of the database. For example, given input
(a && b) || c
The function would construct another function that would evaluate
return (funcA() && funcB()) || funcC();
where funcA
, funcB
, and funcC
are functions returning booleans