4.5-rc-1
版本发布时间: 2015-01-11 02:31:03
antlr/antlr4最新发布版本:4.13.2(2024-08-04 03:28:03)
Major Milestone Release (release candidate)
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.
We highly recommend that you regenerate your lexers and parsers using the latest version of the Tool.
Download Binaries
Download ANTLR jars at the antlr.org site.
Runtime Libraries for Language Targets
- Java is embedded with the tool, but is also available from maven-central (will be)
- 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
- C# (Sam Harwell's version) is available through NuGet. Note that this release is distributed with a standalone copy of the ANTLR Tool, and does not work with code generated by this combined distribution.
Documentation
- Java runtime API (4.5)
- Java Tool API (4.5)
- ANTLR 4 Maven plugin (4.3) we'll update mvn stuff once we are sure that this release candidate is okay.
Summary of Changes
You can view all issues closed for this release, all pull requests merged and all commits for this release.
Bug Fixes
-
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
IDE Support
We have not updated the IDE plugins for this prerelease.
Language Targets
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.