Download ANTLR

Looking for ANTLR v3?

The latest version of ANTLR is 4.8, released January 16, 2020. As of 4.8, we have these code generation targets:

All users should download the ANTLR tool itself and then choose a runtime target below, unless you are using Java which is built into the tool jar.

See Release Notes, README.md, Getting started, ANTLR 4 grammar repository, and How to build ANTLR itself.

Development Tools

There are plug-ins for Intellij, NetBeans, and Eclipse.





ANTLR tool and Java Target

Complete ANTLR 4.8 Java binaries jar. Complete ANTLR 4.8 tool, Java runtime and ST 4.0.8, which lets you run the tool and the generated code.

ANTLR 4.8 distribution (zip). Everything you need to build the tool and Java runtime from source.

ANTLR 4.8 Java runtime binaries jar. Only what's needed for building and executing parsers/lexers generated in Java.

The Java jars are OSGi compatible so you should be able to use them within Eclipse.

To use maven, refer to group ID org.antlr and artifact ID antlr4 for the tool itself and antlr4-runtime for the Java runtime library in your pom.xml file. The latest version is 4.8:

<dependency> <groupId>org.antlr</groupId> <artifactId>antlr4</artifactId> <version>4.8</version> </dependency>

See ANTLR 4 Maven plugin, ANTLR 4 Maven plug-in usage, and ANTLR 4 Maven Plugin API.

ANTLR v4 is written in ANTLR v3.5.2 and StringTemplate 4.3. In antlr-4.8-complete.jar, you'll find everything you need to run the ANTLR tool and make its generated parsers work.

C# Target

Via nuget, use Install-Package Antlr4.Runtime.Standard via Package Manager Console.

Python Targets

Sam Harwell, co-author of ANTLR 4, has an Alternative ANTLR 4 C# Target

Install with:

pip install antlr4-python2-runtime

pip install antlr4-python3-runtime

Or, you can download and untar the appropriate package from:

The runtimes are provided in the form of source code, so no additional installation is required.

See Python runtime targets for more information.

JavaScript Target

Install with:

npm install antlr4



Or, you can download antlr-javascript-runtime-4.8.zip.

The runtime is provided in the form of source code, so no additional installation is required. Simply refer to the JavaScript in that zip from your project, and eventually webpack it.

See JavaScript runtime target for more information.

C++ Target

Sorry but no prebuilt C++ binaries for 4.8 at this point, except for Mac.

Go Target

Install it on your GOPATH via: go get github.com/antlr/antlr4/runtime/Go/antlr

Swift Target

Antlr4.xcodeproj

Source Repository

Previous Versions

Due to unstable ABI of Swift language, there will not be a single "library" for the Swift ANTLR runtime for now. To get Swift ANTLR runtime, clone the ANTLR repository . Open it in finder. From the root directory of the repo, go to runtime/Swift folder. You will see the Xcode project manifest file:. Drag it into your project. See Swift target notes for more info.Everything's up at github Take your pick of binaries etc... from download directory or see the different versions at github