I need to convert simple rules I write into a .net assembly. The rules are very simple in syntax. Its a bunch of if-then statements with the following structure:
if <conditions> then <return-string>
I've already made a program which does the necessary however, since the conditions may become complex and new operations be added/removed, I was suggested to use antlr for the purpose.
I usually use System.CodeDom for the purpose of creating the equivalent c# code, after parsing the input rule text. I do this by maintaining some sort of state in my parser program by which I identify the token is a variable, keyword, operation, or data, and form the correct CodeExpression object.
I've seen a few of antlr tutorials, but they all show a parser implementation. Is that what I want? Or a simple lexer?
If its a lexer what is the framework I have to work with. What would I have to be doing in my c# program to handle those parser states like I was earlier doing it...?