ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
BSD-3-CLAUSE License
Bot releases are visible (Hide)
Published by parrt over 9 years ago
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 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.
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.
tokenNames
field in lexers is uselessAs 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.
Published by parrt almost 10 years ago
This version has an important bug fix, #670, and a big update to the build system while we try to accommodate maven and its deployed mechanism.
Also be aware that we no longer deploy a maven antlr4-annotations artifact, which is only used at compile time for runtime and the ANTLR tool itself. If you use the runtime jars, you should not needed at all. If you need to compile/build, grab stuff from github.
Published by parrt almost 10 years ago
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 ANTLR jars at the antlr.org site.
You can view all issues closed for this release, all pull requests merged and all commits for this release.
tokenNames
field in lexers is uselessWe have not updated the IDE plugins for this prerelease.
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.
Published by parrt over 10 years ago
ANTLR 4.4 is a major feature and minor bugfix update to ANTLR 4. The primary enhancement is the introduction of both Python2 and Python3 language targets, which you can access with -Dlanguage=Python2 from the ANTLR command line. For C#, please use Visual Studio plugin/tool that Sam Harwell has built.
Please note that tool error messages have been altered to remove unnecessary single quotes and we have added some more specific error messages.
This release includes a new build script called bild.py and was not build using maven. bild.py is a Python script I made that looks like a makefile and self bootstraps by pulling in the required bilder.py library from the net. See http://bildtool.org. On a unix box, just type "./bild.py all" to build antlr from source (if you are so inclined).
We highly recommend that you regenerate your lexers and parsers using the latest version of the Tool.
Download ANTLR jars at the antlr.org site.
You can view all issues closed for this release here, and all commits for this release here.
Project | Release which Supports ANTLR 4.4 |
---|---|
ANTLRWorks 2 | |
IntelliJ Plugin | 1.5 |
Eclipse Plugin | |
Visual Studio Extension | 1.2.1 |
As of 4.4, ANTLR can generate code in the following languages:
Also, Sam Harwell has an ANTLR 4 "Optimized" fork, which is currently consistent with ANTLR 4.3.
Published by sharwell over 10 years ago
ANTLR 4.3 is a major feature and bugfix update to ANTLR 4. For most users upgrading from ANTLR 4.2, 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.
Download ANTLR jars at the antlr.org site.
You can view all issues closed for this release here, and all commits for this release here.
clearDFA()
method to easily clear the DFA cache (#584)ATN
(#561)<assoc=right>
(#542)IntervalSet
code (#623)$ruleName
. Instead, use the special symbol $ctx
to refer to the enclosing rule. Parsers already generated from grammars prior to this change are not affected, but the grammar will need to be updated prior to generating code with ANTLR 4.3. This change was required as part of correcting #571.IntervalSet.getMinElement
now returns the first element, even if that element is negative. Code which relied on this method to return a non-negative value even if the set contained negative values will need to be updated.The following tables list several related projects, along with the version number corresponding to this release. The tables will be updated as each of the projects release updates to support this release of ANTLR 4.
Project | Release which Supports ANTLR 4.3 |
---|---|
ANTLRWorks 2 | |
IntelliJ Plugin | |
Eclipse Plugin | |
Visual Studio Extension | 1.2.1 |
Project | Release which Supports ANTLR 4.3 |
---|---|
ANTLR 4 "Optimized" fork | 4.3-opt |
C# Target | 4.3 |
Published by sharwell over 10 years ago
ANTLR 4.2.2 is a minor bugfix update to ANTLR 4. This update is source- and binary-compatible with ANTLR 4.2 for virtually all users (see the Breaking Changes section at the end). Users updating from earlier versions are encouraged to read the release notes for ANTLR 4.2.
You can view all issues closed for this release here, and all commits for this release here.
EOF
(#531, #534, #537, #539)The signature of the following methods changed to support the proper handling of grammars with multiple explicit references to EOF
. These methods are rarely, if ever, overridden in client applications.
LexerATNSimulator.closure
LexerATNSimulator.getEpsilonTarget
ParserATNSimulator.closure
ParserATNSimulator.closureCheckingStopState
ParserATNSimulator.closure_
ParserATNSimulator.getEpsilonTarget
The following tables list several related projects, along with the version number corresponding to this release. The tables will be updated as each of the projects release updates to support this release of ANTLR 4.
Project | Release which Supports ANTLR 4.2.2 |
---|---|
ANTLRWorks 2 | 2.2.2 |
IntelliJ Plugin | 1.1 |
Eclipse Plugin | 0.3.0 |
Visual Studio Extension | 1.2.1 |
Project | Release which Supports ANTLR 4.2.2 |
---|---|
ANTLR 4 "Optimized" fork | 4.2.2-opt |
C# Target | 4.2.2-alpha001 |
Published by sharwell over 10 years ago
ANTLR 4.2.1 is a minor bugfix update to ANTLR 4. This update is source- and binary-compatible with ANTLR 4.2. Users updating from earlier versions are encouraged to read the release notes for ANTLR 4.2.
Please see the latest release for links to the current documentation.
You can view all issues closed for this release here, and all commits for this release here.
ParserRuleContext
which is returned by the parser interpreter when parsing starts with a left-recursive rule (#461)Published by sharwell over 10 years ago
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.
You can view all issues closed for this release here, and all commits for this release here.
LexerInterpreter
and ParserInterpreter
are much more powerful and now part of the runtime library (details)
@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.
Published by sharwell over 10 years ago
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.
Download the pre-release jar for non-maven users.
The current prerelease build of ANTLR 4.2 is available through Sonatype's Maven snapshot repository. To enable your Maven builds to use the snapshot releases, include the following in your projects pom.xml
or in your system ~/.m2/settings.xml
.
<profiles>
<profile>
<id>allow-snapshots</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
With the snapshot repository enabled, you can reference the ANTLR 4 runtime with the following:
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
Please see the latest release for links to the current documentation.
You can view all issues closed for this release here, and all commits for this release here.
LexerInterpreter
and ParserInterpreter
are much more powerful and now part of the runtime library (details)
@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)Published by sharwell over 11 years ago
You can view all issues closed for this release here, and all commits for this release here.
This list may be incomplete, and does not include ordinary bug fixes.
\uFFFF
in lexers.This list may be incomplete
The following changes are likely to have a significant impact on user code.
The following changes are not likely to break user code (infrequently used features or code).
ParserRuleContext.altNum
field.\n
and/or \r
to include newline characters in a literal or set.Pair
and Triple
classes in the runtime are now immutable, and Triple
does not extend Pair
.ANTLRErrorStrategy
interface (or one of its derived classes), be aware of significant changes to those files.LexerATNSimulator
or ParserATNSimulator
, be aware of significant changes in those classes.ParserInterpreter.predictATN
.Old method (ANTLR 4.0)
Arrays.fill(parser.getInterpreter().decisionToDFA, null);
New method (ANTLR 4.1)
ATN atn = parser.getATN();
for (int i = 0; i < parser.getInterpreter().decisionToDFA.length; i++) {
parser.getInterpreter().decisionToDFA[i] = new DFA(atn.getDecisionState(i), i);
}