ANTLR Introduction to ANTLR v4


ANTLR v4 is a powerful tool used for building new programming languages and processing/translating structured text or binary files. ANTLR uses a grammar you create to generate a parser which can build and traverse a parse tree (or abstract syntax tree, AST). The parser consists of output files in a target language that you specify. ANTLR v4 supports several targets including: Java, C#, JavaScript, Python2, and Python3. Support for C++ is being worked on. For working in GUI IDEs, there are plug-ins for Visual Studio, Intellij, NetBeans, and Eclipse.

For general information, visit the ANTLR website. To get serious about ANTLR, check out the highly recommended book written by Terrence Parr (the guy who created ANTLR) The Definitive ANTLR 4 Reference.

Significant Version Info

  • 4.5: 01/22/15 - Added JavaScript target and upgraded C# target. 4.5 Release Notes
  • 4.4: 07/16/14 - Added Python2 and Python3 as targets. 4.4 Release Notes
  • 4.3: 06/18/14 - Major bug fixes; prepared for adding new targets. 4.3 Release Notes
  • 4.2: 02/04/14 - Improved syntax for selecting/matching parse trees. 4.2 Release Notes
  • 4.1: 06/30/13 - Improved parsing performance; export ASTs to PNG. 4.1 Release Notes
  • 4.0: 01/21/13 - Initial release.