Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ANTLR – ANother Tool for Language Recognition – is a tool that helps you is used in the construction of formal language software tools (or just language tools) such as translators, compilers, recognizers and, static/dynamic program analyzers. Developers use ANTLR to reduce the time and effort needed to build and maintain language processing software tools more quickly and easily. It does this by generating source code for inclusion in these tools from language specifications that you supply. In common terminology, ANTLR is a compiler generator or compiler compiler (in the tradition of tools such as Lex/Flex and Yacc/Bison) and it is used to generate the source code for language recognizers, analyzers and translators from language specifications. ANTLR takes as it's input a grammar - which is a precise description of a language augmented with semantic actions - and generates a number of files including source code files for the and other auxiliary files. The target language of the generated source code (e.g. Java, C/C++, C#, Python, Ruby) that is specified in the grammar.

Software developers and language tool implementors can use ANTLR to reduce their workload when implementing implement Domain-Specific Languages or, to build generate parts of language compilers and translators, or even to help them build tools that parse complex XML.

As stated above, ANTLR 3 can generate generates the source code for various tools that can be used to reognize, analyze and transform input in the language defined by the an input grammar. The basic types of language processing tools that ANTLR can generates are Lexers (a.k.a scanners, tokenizers), Parsers and, TreeParsers (a.k.a tree walkers, c.f. visitors).

...

ANTLR reads a language description file called a grammar and generates a number of files for yousource code files and other auxiliary files. Most uses of ANTLR generates at least one (and quite often both) of these tools:

...