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
- XPath-like syntax for selecting parse tree nodes
- Parse tree pattern matching using concrete syntax
ParserInterpreterare much more powerful and now part of the runtime library (details)
- 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
@Nullableat 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)
- Many other bug fixes