A friend recently had to work with expressions, and he was looking around for some existing libraries which would let him do this. That's when he found ANTLR (http://www.antlr.org).
From the website :
ANTLR, ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. ANTLR provides excellent support for tree construction, tree walking, translation, error recovery, and error reporting.
I tried to work with it ANTLR today and I think it is pretty good. One good thing about it is that it also has a GUI to write the grammar, once your grammar is ready, you can generate code in a number of languages.
My primary development language is C# so I was very happy to see that they have also explained how to tweak .csproj and compile the grammar in a visual studio project.
No comments:
Post a Comment