ANTLR

Getting started with ANTLR

Remarks#

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It’s widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.

Antlr Versions
Antlr is separated in two big parts, the grammar (grammar files) and the generated code files, which derive from the grammar based on target language. The antlr versions are in the format of V1.V2.V3 :

  • V1: Change in V1 means that new syntax of features were introduced in grammar files
  • V2: Change in V2 means that new features or major fixes were introduced in the generated files (e.g addition of new functions)
  • V3: stands for bug fixes or minor improvements

Runtime Libraries and Code Generation Targets
The Antlr tool is written in Java, however it is able to generate parsers and lexers in various languages. To run the parser and lexer you will also need having the runtime library of antlr alongside with the parser and lexer code. The supported target language (and runtime libraries) are the following:

  • Java

  • C#

  • Python (2 and 3)

  • JavaScript

Versions#

VersionRelease Date
2.01997-05-01
3.02011-01-19
4.02013-01-21
4.12013-07-01
4.22014-02-05
4.2.12014-03-25
4.2.22014-04-07
4.32014-06-19
4.42014-07-16
4.52015-01-23
4.5.12016-07-16
4.5.22016-01-30
4.5.32016-03-31
4.62016-12-15
4.72017-03-30

Hello world


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow