I am working on a C# project and let's assume I have a string containing something like this:
string content = "[IF FullName = 'Bob Smith']Hello my friend";
content += "[ELSEIF TotalPurchases > 1000]Dear valued customer";
content += "[ELSE]Dear [FirstName]";
content += "[ENDIF]";
and let's assume I have a Key/Value dictionary where keys are "FullName" and "TotalPurchases" and values are "Jane Doe" and "500". What would be a good way to parse the content and most importantly evaluate the "IF...ELSE...ENDIF"?
Is there an open source project I can leverage or should I just write my own code to parse the content?