@sharwell sharwell released this Feb 4, 2014 · 3940 commits to master since this release

Major Milestone Release

ANTLR 4.2 is a major feature and bugfix update to ANTLR 4. For most users upgrading from ANTLR 4.1, this is a source- and binary-compatible update. However, to maximize the benefits provided by the update, we highly recommend that you regenerate your lexers and parsers using the latest version of the Tool.


Please see the latest release for links to the current documentation.

Summary of Changes

You can view all issues closed for this release here, and all commits for this release here.



  • Improved left-recursion elimination algorithm in the Tool (#268, #303, #313, #314, #355)
  • Substantial performance improvements for grammars containing left-recursive rules (#97, #192, #300, #400, #401)
  • antlr4-maven-plugin now prints proper error messages, and is now compatible with Eclipse m2e out-of-the-box (#319, #342)
  • A new annotation processor verifies correct use of @NotNull and @Nullable at compile time, and is available through Maven separately from the rest of ANTLR 4 in the new antlr4-annotations artifact (#434, #435) Note: This feature is only available for Maven users; not as part of the standalone ANTLR downloads.
  • Initial support for Java 8 (#337, #430)
  • The Tool supports grammar files in UTF-8 encoding with a byte order mark, a common default for text editors on Windows systems (#175)

Bug Fixes

  • Many other bug fixes