antlr4

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

Downloads
2M
Stars
15.7K
Committers
398

Bot releases are visible (Hide)

antlr4 - 4.13.1 Latest Release

Published by parrt about 1 year ago

Pull requests grouped by target

csharp target

go target

java target

javascript target

swift target

dart target

Contributors

antlr4 - 4.13.0

Published by parrt over 1 year ago

This is primarily change to the Go target itself and its release location, which has moved to https://github.com/antlr4-go/antlr. The code still lives and this repository, but for release purposes we've created a new organization and repository so that Go users can pull versions down according to the repository and label rules

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

javascript target

python3 target

Contributors

antlr4 - 4.12.0

Published by parrt over 1 year ago

The 4.12.0 release is primarily about the new TypeScript target created by @ericvergnaud. There are also a number of fixes to the various targets, as you can see from the descriptions below.

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

swift target

php target

dart target

Contributors

antlr4 - 4.11.1 (just fixes 4.11.0 release issue)

Published by parrt about 2 years ago

Just fixes 4.11.0 release issue. I forgot to change runtime tool version so it didn't say SNAPSHOT.

antlr4 - 4.11.0

Published by parrt about 2 years ago

4.11.0 consist primarily:

  • a major rebuild of the Go target by Jim Idle. Please see Go target doc for more information, as it now requires the go module stuff.
  • huge internal refractoring of testing and various target speed improvements by Ivan Kochurkin
  • Getting all targets to run on all operating systems using github actions by HS.

The details by type and target follow.

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

swift target

php target

dart target

Contributors

antlr4 - 4.10.1

Published by parrt over 2 years ago

Tiny update to fix build issue where java requirement for runtime was 11 not 1.8.

What's Changed

Full Changelog: https://github.com/antlr/antlr4/compare/v4.10.0...4.10.1

antlr4 - 4.10 Major feature, code clean up, and bug fix release

Published by parrt over 2 years ago

ANTLR version 4.10

This is a very major release with a number of important changes. There have been many valuable contributions, but I welcome @KvanTTT and @jcking as recent "official" major ANTLR contributors. :)

WARNING: Generated 4.10 lexers and parsers are incompatible with code generated by previous versions of ANTLR. You must regenerate all of your code from grammars to use the new runtime. This is true of all targets (except probably javascript).

Repo branching structure

We have changed the branching structure of the repository. The default branch for this repo remains master and it is the latest stable release with tags for the various releases; e.g., see release tag 4.9.3. We now do development work in branch dev between releases and all pull requests should be derived from that branch. The dev branch is merged back into master to cut a release and the release state is tagged (e.g., with 4.10-rc.1 or 4.10.) Visually our process looks roughly like this:

Targets such as Go that pull directly from the repository can use the default master branch but can also pull from the active dev branch:

$ go get github.com/antlr/antlr4/runtime/Go/antlr@dev

Developers certificate of origin

In order to bring ANTLR more in line with current standard standards for contribution processes, as of 4.10, ANTLR uses the Linux Foundation's Developer Certificate of Origin, DCO, version 1.1. See file https://github.com/antlr/antlr4/raw/master/developer-cert-of-origin.txt . It is simpler than the original contributors license agreement, which required programmers to sign the contributors.txt file, which has now moved to file historical-contributors-agreement.txt .

Each commit in pull requests must have a "signature", which is simple as using -s (not -S) on the git commit command:

$ git commit -s -m 'This is my commit message'

Github's pull request process enforces the sig and gives instructions on how to fix any commits that lack the sig. See https://github.com/apps/dco for more info.

4.10-generated parsers incompatible with previous runtimes

ANTLR not only generates recursive-descent parsers; it generates a state machine called an augmented transition network (ATN) in serialized form as a bunch of integers stored in the generated parser and lexer files. This serialization format was changed for 4.10 to remove a size limit on the supported ATNs. See https://github.com/antlr/antlr4/pull/3591.

The key point here is that we changed the version number stored inside the serialization format and so, in order to use this new version of ANTLR, you must regenerate all of your lexers and parsers using the 4.10 tool and then use the new runtime. Parsers generated with 4.10 or not compatible with previous versions of the runtime.

Increasing minimum java version

Going forward, we are using Java 11 for the source code and the compiled .class files for the ANTLR tool. The Java runtime target, however, and the associated runtime tests use Java 8 (bumping up from Java 7).

JavaScript target

The JS target has been substantially reworked.

Miscellaneous improvements

  • Lexer rules can use the caseInsensitive option now.
  • Improved error messages
  • We rebuilt the runtime testing rig and made continuous integration improvements; part of this was done to support more recent versions of Java
  • We cleaned up the maven pom and brought it up to date (still has errors if somebody can make a suggestion.)

Changes report

The following report is generated by scripts/github_release_notes.py.

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

swift target

php target

dart target

Contributors

Full Changelog: https://github.com/antlr/antlr4/compare/4.9.3...4.10

antlr4 - 4.9.3 bug fix release

Published by parrt almost 3 years ago

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

python2 target

swift target

php target

dart target

Contributors

antlr4 - 4.9.2 bug fix release

Published by parrt over 3 years ago

Issues fixed

Improvements, features

Moved away from travis-ci.com.

Pull requests grouped by target

csharp target

cpp target

javascript target

python2 target

  • Update ll1 analyzer (target:csharp, target:javascript, target:python2, target:python3, type:bug)

python3 target

swift target

Contributors

antlr4 - 4.9.1 bug fix release

Published by parrt almost 4 years ago

Issues fixed

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

Contributors

antlr4 - 4.9 New dart target, bug fixes, small enhancements

Published by parrt almost 4 years ago

New DART target

Thanks to @lingyv-li, we have a DART target!

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

swift target

php target

dart target

Contributors

antlr4 - 4.8 new PHP target, bug fix release

Published by parrt over 4 years ago

Thanks to @marcospassos, ANTLR 4.8 introduces a PHP target! See PHP PRs

Issues fixed

Improvements, features

cpp target

go target

javascript target

swift target

Contributors

antlr4 - ANTLR 4.7.2

Published by parrt almost 6 years ago

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2 target

python3 target

swift target

Contributors

antlr4 - 4.7.1

Published by parrt almost 7 years ago

ANTLR version 4.7.1 is a minor release but with lots of little improvements and bug fixes. You can find the pull requests grouped by target language below. Also, please find below the contributor list (auto-generated from the issues and pull request).

Summary of new features and improvements

  • You can now import lexers with modes into other lexer grammars [...]
  • The -o and -lib commandline options didn't always do the obvious thing and in fact presented some problems. With clean that up but requires a new -Xexact-output-dir command line option to enable it to avoid breaking tools built on previous versions of ANTLR [...]
  • For languages that support case insensitive keywords such as SQL, ANTLR does not have a built-in mechanism. Programmers either specify case insensitive lexers rules directly or they can build a special input stream that presents characters as uppercase to the lexer. I have provided documentation that describes both approaches including sample streams in various targets. [...]
  • The Swift runtime was migrated to Swift 4. [...]
  • You can generate SVG now from parse trees in Java target. [...]
  • The NuGet package now includes the .NET Core DLL and supports both .NET 3.5 and up, as well as .NET Core. [...]

Issues fixed

Improvements, features

Pull requests grouped by target

csharp target

cpp target

go target

java target

javascript target

python2,3 targets

swift target

Contributors

antlr4 - 4.7

Published by parrt over 7 years ago

ANTLR version 4.7 is a major release with many improvements and bug fixes.

Summary of new features, improvements, fixes

Issues fixed

C++ target:

JavaScript target:

Python2/3:

C#:

Go:

Java:

Swift:

Tool or all-target-runtime related:

antlr4 - 4.6

Published by parrt almost 8 years ago

ANTLR version 4.6 is a major release with many features and bug fixes.

Summary of new features, improvements, fixes

Issues fixed

antlr4 - 4.5.3

Published by parrt over 8 years ago

Features / improvements

  • New grammar option: contextSuperClass. All parse tree internal nodes will derive from this. Default is ParserRuleContext. Should derive from ultimately RuleContext at minimum.
    Java target can use contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum for convenience. It adds a backing field for altNumber, the alt matched for the associated rule node.
  • Added getMaxTokenType() to Vocabulary interface

Complete list of pull requests for 4.5.3 but most of those are fixing bugs.

Issues

Complete list of issues closed/solved for 4.5.2.

antlr4 - 4.5.2

Published by parrt over 8 years ago

Features / improvements

  • removed final (hopefully!) dependency on Java AWT lib in runtime.
  • moved doc, faq from wiki to the repo.
  • added more tool error checks.
  • major Python speed improvement with better hash function (minutes to seconds)

Complete list of pull requests for 4.5.2 but most of those are fixing bugs.

Issues

Summary: some clean up in JavaScript and Python targets. Minor issues in Java/jar.

Complete list of issues closed/solved for 4.5.2.

antlr4 - 4.5.1

Published by parrt over 9 years ago

Bug fix and repo reorganization release

We fixed number of important bugs but also combined the various target repositories, such as antlr/antlr4-python2, into the main antlr/antlr4 repository.

For the Java target only, there is also a new feature: a parser interpreter that tracks which alternative or label was match for a particular parse tree node, which is often useful during debugging. It is used in the 1.7 release of the ANTLR Intellij Plugin.

Summary of Major Changes

  • Maven build was added back in, thanks to new contributor Jason van Zyl; you can just open the topmost pom.xml in your favorite IDE
  • We completely overhauled runtime test generation
  • We merged all existing target repositories such as antlr4-python2 into the main antlr4 repo so that everything is now included in a single spot.
  • We removed runtime jar dependency on Swing. Class org.antlr.v4.runtime.misc.TestRig has moved to org.antlr.v4.gui.TestRig but we left a proxy in so that org.antlr.v4.runtime.misc.TestRig still works. The org.antlr.v4.runtime.tree.gui package moved to org.antlr.v4.gui in the tool area from the runtime. A few classes from org.antlr.v4.runtime.misc had to move. Convenience methods for saving/viewing parse trees were moved from RuleContext (parse tree) and org.antlr.v4.runtime.tree.Trees to org.antlr.v4.gui.Trees.

You can view all Issues fixed in 4.5.1, all pull requests merged and all commits for this release.

Features

Bug Fixes

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
  • 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

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.

antlr4 - ANTLR 4.5.1 beta 1

Published by parrt over 9 years ago

Bug fix and repo reorganization release

We fixed number of important bugs but also combined the various target repositories, such as antlr/antlr4-python2, into the main antlr/antlr4 repository.

For the Java target only, there is also a new feature: a parser interpreter that tracks which alternative or label was match for a particular parse tree node, which is often useful during debugging. It is used in the 1.7 release of the ANTLR Intellij Plugin.

Summary of Major Changes

  • Maven build was added back in, thanks to new contributor Jason van Zyl; you can just open the topmost pom.xml in your favorite IDE
  • We completely overhauled runtime test generation
  • We merged all existing target repositories such as antlr4-python2 into the main antlr4 repo so that everything is now included in a single spot.

You can view all Issues fixed in 4.5.1, all pull requests merged and all commits for this release.

Features

Bug Fixes

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
  • 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

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.

Package Rankings
Top 0.86% on Repo1.maven.org
Top 0.4% on Npmjs.org
Top 0.18% on Proxy.golang.org
Top 1.48% on Pub.dev
Top 19.21% on Anaconda.org
Top 5.68% on Swiftpackageindex.com
Top 13.21% on Cocoapods.org
Top 4.68% on Conda-forge.org
Badges
Extracted from project README
Java 11+ License MacOSX, Windows, Linux