Evaluating a set of rules defined in a string
<p>I made a system that creates a simple string with Function/Response format, example:</p>

<pre><code>Check('Value'):ShowImage(@)|Check('Value'):OtherFunction(@)....and so on
</code></pre>

<p>Where <code>Check</code> is the name of a function, <code>Value</code> is the parameter, <code>ShowImage</code> is the name of a Response function, <code>@</code> is the entry paremeter (result of the previous function). The pipe splits another Function/Response pair that fires if the first <code>Check('Value')</code> function once "checked" were not satisfied (say, if the parameter was not accomplished the <code>Check</code> condition the function is invalid and hence the Response part in the first Function/Response pair is not executed, so system keep trying Functions awaiting to find the one that executes the right Response).</p>

<p>The way the application should work is to evaluate each rule (similar to a JavaScript eval function) and take appropriate action based on function results.</p>

<p>At first glance, it looks complicated, because first of all I need to cast the string to the right real C# function that will actually process the condition. Therefore, depending on the function result, decide where to point to execute my Response function. </p>

<p>Furthermore: This is just the kind example, because there are functions as <code>*</code> that represent something like: "any condition is true" what in almost all cases this function is the last in the chain (the default function).</p>

<p>That's my problem, I can't realize what is the easiest way to cope with this problem.
Maybe a chain of delegates? Lambdas? Anonymous stored into a structure...</p>

<p>Could you give me your measure/advise? Where to start?</p>
