I have an application in which a user can create entities that are stored in a database. Each entity has a string Name property and a boolean Value property. The user can also specify a string that contains logic to be executed against the entities. For example, the logic might be something like:
(Q1 or Q2) and (Q3 or Q4)
So, to evaluate this logic, my app needs to look for entities whose Name properties are Q1, Q2, Q3, and Q4, substitute the Value properties for the names in the above expression, and evaluate the expression.
The app is written in C#. I'm expert in C# and VB, but I have no experience with dynamic languages. I could write a parser that uses Regex to tokenize the logic string, but I'm wondering if there is an easier way to do this, maybe using something from the relatively new .Net dynamic language features.
Bob