I looked a little over the available parsers on the net but don't really understand what is the most suitable for my custom expression. (Antlr seems a little to heavyweight for my needs, but it's just a first impression)
I have the following expression that needs to be validated that it's well formed:
IF(var1>var2;15;IF(var3<=var4;1;2))
The expression translates to: if the condition is true then the result is 15 else the other expression.
I need only to validate that this is well formed (no extra brackets, that there is always a first and second branch, that the IF keyword is used correctly, nested IFs etc..)