Major Milestone Release
This release is primarily about the new JavaScript code generation target and the integration of a C# target derived from Sam Harwell's ANTLR project. Sam's is still available of course but we wanted a single tool that would generate Java, C#, Python2, Python3, and JavaScript. There are also a number of bug fixes in 4.5 as you can see below.
You need to regenerate your lexers and parsers using the latest version of the 4.5 Tool to use the 4.5 runtime.
Download Binaries
Download the ANTLR tool and all target runtimes at the antlr.org site.
The Java jars are OSGi compatible so you should be able to use them within Eclipse.
Runtime Libraries for Language Targets
- Java is embedded with the tool, but is also available from maven-central (will be but you can get 4.5-SNAPSHOT right now until I figure out deploying.)
- C# (zipped .dll) is a download from antlr.org. Might be in NuGet too in the future.
- JavaScript is a download from antlr.org. Might also be registered as a npm package for node.js
- Python2 and Python 3 are in PyPi
- Sam Harwell's alternative C# target is available through NuGet. Note that this alternative target is distributed with a standalone copy of the ANTLR Tool, and only works with code generated by that standalone copy.
Documentation
Summary of Changes
You can view all issues closed for this release, all pull requests merged and all commits for this release.
Be aware that we no longer deploy a maven antlr4-annotations artifact and in fact we no longer use Java annotations in the Java runtime and so that code is disappeared.
Bug Fixes
- Excess token consumption during recovery
- exception when importing grammar
- Generated
tokenNames
field in lexers is useless - Maven build has test failures due to order of token types
- Suppress warning 109 for matching options during import
- Parser.getTrace()
- exception when importing grammar
- ANTLRInputStream.getSourceName() has @NotNull annotation, but returns null
- deprecate ErrorType.ALL_OPS_NEED_SAME_ASSOC
- Multiline comments along with token declaration in lexer
- NullUsageProcessor not compatible with java>6
- Cannot start a new lexer mode right after some comments comment
- Docstring for TokenStreamRewriter is incorrect
Language Targets Info
As of 4.5, the standard distribution of ANTLR can generate code in the following languages:
In addition, the following languages are supported by standalone release(s) of the tool.
Also, Sam Harwell has an ANTLR 4 "Optimized" fork, which is currently consistent with ANTLR 4.4.