Skip to content

Commit d5dd253

Browse files
committed
update to 4.11.1
Signed-off-by: Terence Parr <[email protected]>
1 parent 7229933 commit d5dd253

31 files changed

+56
-47
lines changed

doc/getting-started.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Hi and welcome to the version 4 release of ANTLR! It's named after the fearless
66

77
ANTLR is really two things: a tool that translates your grammar to a parser/lexer in Java (or other target language) and the runtime needed by the generated parsers/lexers. Even if you are using the ANTLR Intellij plug-in or ANTLRWorks to run the ANTLR tool, the generated code will still need the runtime library.
88

9-
The first thing you should do is probably download and install a development tool plug-in. Even if you only use such tools for editing, they are great. Then, follow the instructions below to get the runtime environment available to your system to run generated parsers/lexers. In what follows, I talk about antlr-4.11.0-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
9+
The first thing you should do is probably download and install a development tool plug-in. Even if you only use such tools for editing, they are great. Then, follow the instructions below to get the runtime environment available to your system to run generated parsers/lexers. In what follows, I talk about antlr-4.11.1-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
1010

1111
If you are going to integrate ANTLR into your existing build system using mvn, ant, or want to get ANTLR into your IDE such as eclipse or intellij, see [Integrating ANTLR into Development Systems](https://github.com/antlr/antlr4/blob/master/doc/IDEs.md).
1212

@@ -16,38 +16,38 @@ If you are going to integrate ANTLR into your existing build system using mvn, a
1616
1. Download
1717
```
1818
$ cd /usr/local/lib
19-
$ curl -O https://www.antlr.org/download/antlr-4.11.0-complete.jar
19+
$ curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar
2020
```
2121
Or just download in browser from website:
2222
[https://www.antlr.org/download.html](https://www.antlr.org/download.html)
2323
and put it somewhere rational like `/usr/local/lib`.
2424

25-
if you are using lower version jdk, just download from [website download](https://github.com/antlr/website-antlr4/tree/gh-pages/download) for previous version, and antlr version before 4.11.0 support jdk 1.8
25+
if you are using lower version jdk, just download from [website download](https://github.com/antlr/website-antlr4/tree/gh-pages/download) for previous version, and antlr version before 4.11.1 support jdk 1.8
2626

27-
2. Add `antlr-4.11.0-complete.jar` to your `CLASSPATH`:
27+
2. Add `antlr-4.11.1-complete.jar` to your `CLASSPATH`:
2828
```
29-
$ export CLASSPATH=".:/usr/local/lib/antlr-4.11.0-complete.jar:$CLASSPATH"
29+
$ export CLASSPATH=".:/usr/local/lib/antlr-4.11.1-complete.jar:$CLASSPATH"
3030
```
3131
It's also a good idea to put this in your `.bash_profile` or whatever your startup script is.
3232

3333
3. Create aliases for the ANTLR Tool, and `TestRig`.
3434
```
35-
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.11.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
36-
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.11.0-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
35+
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
36+
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
3737
```
3838

3939
### WINDOWS
4040

4141
(*Thanks to Graham Wideman*)
4242

4343
0. Install Java (version 1.7 or higher)
44-
1. Download antlr-4.11.0-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
44+
1. Download antlr-4.11.1-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
4545
Save to your directory for 3rd party Java libraries, say `C:\Javalib`
46-
2. Add `antlr-4.11.0-complete.jar` to CLASSPATH, either:
46+
2. Add `antlr-4.11.1-complete.jar` to CLASSPATH, either:
4747
* Permanently: Using System Properties dialog > Environment variables > Create or append to `CLASSPATH` variable
4848
* Temporarily, at command line:
4949
```
50-
SET CLASSPATH=.;C:\Javalib\antlr-4.11.0-complete.jar;%CLASSPATH%
50+
SET CLASSPATH=.;C:\Javalib\antlr-4.11.1-complete.jar;%CLASSPATH%
5151
```
5252
3. Create short convenient commands for the ANTLR Tool, and TestRig, using batch files or doskey commands:
5353
* Batch files (in directory in system PATH) antlr4.bat and grun.bat
@@ -73,7 +73,7 @@ Either launch org.antlr.v4.Tool directly:
7373

7474
```
7575
$ java org.antlr.v4.Tool
76-
ANTLR Parser Generator Version 4.11.0
76+
ANTLR Parser Generator Version 4.11.1
7777
-o ___ specify output directory where all output is generated
7878
-lib ___ specify location of .tokens files
7979
...
@@ -82,8 +82,8 @@ ANTLR Parser Generator Version 4.11.0
8282
or use -jar option on java:
8383

8484
```
85-
$ java -jar /usr/local/lib/antlr-4.11.0-complete.jar
86-
ANTLR Parser Generator Version 4.11.0
85+
$ java -jar /usr/local/lib/antlr-4.11.1-complete.jar
86+
ANTLR Parser Generator Version 4.11.1
8787
-o ___ specify output directory where all output is generated
8888
-lib ___ specify location of .tokens files
8989
...

doc/releasing-antlr.md

+6
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ We only have to copy the PHP runtime into the ANTLR repository to run the unitte
8080
```
8181
cd ~/antlr/code/antlr-php-runtime/src
8282
git checkout dev # Should be the default
83+
git pull origin dev
8384
... vi RuntimeMetaData.php ...
8485
git commit -a -m "Update PHP Runtime to latest version"
86+
git push origin dev
87+
git checkout master
88+
git pull origin master
89+
git merge dev
90+
git push origin master
8591
```
8692

8793
## Build XPath parsers

doc/swift-target.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Add Antlr4 as a dependency to your `Package.swift` file. For more information, p
131131

132132

133133
```swift
134-
.package(name: "Antlr4", url: "https://github.com/antlr/antlr4", from: "4.11.0"
134+
.package(name: "Antlr4", url: "https://github.com/antlr/antlr4", from: "4.11.1"
135135
```
136136
## Swift access levels
137137

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM adoptopenjdk/openjdk11:alpine AS builder
22

33
WORKDIR /opt/antlr4
44

5-
ARG ANTLR_VERSION="4.11.0"
5+
ARG ANTLR_VERSION="4.11.1"
66
ARG MAVEN_OPTS="-Xmx1G"
77

88

runtime/CSharp/src/Antlr4.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Company>The ANTLR Organization</Company>
4-
<Version>4.11.0</Version>
4+
<Version>4.11.1</Version>
55
<NeutralLanguage>en-US</NeutralLanguage>
66
<TargetFramework Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFramework>
77
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net45;netstandard2.0</TargetFrameworks>

runtime/CSharp/src/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
using System.Reflection;
77

88
[assembly: CLSCompliant(true)]
9-
[assembly: AssemblyVersion("4.11.0")]
9+
[assembly: AssemblyVersion("4.11.1")]

runtime/CSharp/src/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ See the docs and the book to learn about writing lexer and parser grammars.
4141
### Step 4: Generate the C# code
4242

4343
This can be done either from the cmd line, or by adding a custom pre-build command in your project.
44-
At minimal, the cmd line should look as follows: ``java -jar antlr4-4.11.0.jar -Dlanguage=CSharp grammar.g4``
44+
At minimal, the cmd line should look as follows: ``java -jar antlr4-4.11.1.jar -Dlanguage=CSharp grammar.g4``
4545
This will generate the files, which you can then integrate in your project.
4646
This is just a quick start. The tool has many useful options to control generation, please refer to its documentation.
4747

runtime/Cpp/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.11.0
1+
4.11.1

runtime/Cpp/cmake/Antlr4Package.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ target_link_libraries( Parsertest PRIVATE
9696
find_package(antlr4-generator REQUIRED)
9797
9898
# Set path to generator
99-
set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.11.0-complete.jar)
99+
set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.11.1-complete.jar)
100100
101101
# generate lexer
102102
antlr4_generate(

runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ else()
4646
set(ANTLR4_SHARED_LIBRARIES
4747
${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dll.a)
4848
set(ANTLR4_RUNTIME_LIBRARIES
49-
${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.11.0.dll)
49+
${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.11.1.dll)
5050
elseif(APPLE)
5151
set(ANTLR4_RUNTIME_LIBRARIES
5252
${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dylib)

runtime/Cpp/cmake/FindANTLR.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ find_package(Java QUIET COMPONENTS Runtime)
22

33
if(NOT ANTLR_EXECUTABLE)
44
find_program(ANTLR_EXECUTABLE
5-
NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.11.0-complete.jar)
5+
NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.11.1-complete.jar)
66
endif()
77

88
if(ANTLR_EXECUTABLE AND Java_JAVA_EXECUTABLE)

runtime/Cpp/cmake/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ set(ANTLR4_WITH_STATIC_CRT OFF)
2929
# By default the latest version of antlr4 will be used. You can specify a
3030
# specific, stable version by setting a repository tag value or a link
3131
# to a zip file containing the libary source.
32-
# set(ANTLR4_TAG 4.11.0)
33-
# set(ANTLR4_ZIP_REPOSITORY https://github.com/antlr/antlr4/archive/refs/tags/4.11.0.zip)
32+
# set(ANTLR4_TAG 4.11.1)
33+
# set(ANTLR4_ZIP_REPOSITORY https://github.com/antlr/antlr4/archive/refs/tags/4.11.1.zip)
3434
3535
# add external build for antlrcpp
3636
include(ExternalAntlr4Cpp)
@@ -39,7 +39,7 @@ include_directories(${ANTLR4_INCLUDE_DIRS})
3939
4040
# set variable pointing to the antlr tool that supports C++
4141
# this is not required if the jar file can be found under PATH environment
42-
set(ANTLR_EXECUTABLE /home/user/antlr-4.11.0-complete.jar)
42+
set(ANTLR_EXECUTABLE /home/user/antlr-4.11.1-complete.jar)
4343
# add macros to generate ANTLR Cpp code from grammar
4444
find_package(ANTLR REQUIRED)
4545

runtime/Cpp/demo/generate.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
:: Download the ANLTR jar and place it in the same folder as this script (or adjust the LOCATION var accordingly).
88

9-
set LOCATION=antlr-4.11.0-complete.jar
9+
set LOCATION=antlr-4.11.1-complete.jar
1010
java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4
1111
::java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest -XdbgST TLexer.g4 TParser.g4
1212
::java -jar %LOCATION% -Dlanguage=Java -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4

runtime/Cpp/runtime/src/Version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#define ANTLRCPP_VERSION_MAJOR 4
3131
#define ANTLRCPP_VERSION_MINOR 11
32-
#define ANTLRCPP_VERSION_PATCH 0
32+
#define ANTLRCPP_VERSION_PATCH 1
3333

3434
#define ANTLRCPP_MAKE_VERSION(major, minor, patch) ((major) * 100000 + (minor) * 1000 + (patch))
3535

runtime/Dart/lib/src/runtime_meta_data.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class RuntimeMetaData {
6666
/// omitted, the {@code -} (hyphen-minus) appearing before it is also
6767
/// omitted.</li>
6868
/// </ul>
69-
static final String VERSION = '4.11.0';
69+
static final String VERSION = '4.11.1';
7070

7171
/// Gets the currently executing version of the ANTLR 4 runtime library.
7272
///

runtime/Dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "antlr4"
2-
version: "4.11.0"
2+
version: "4.11.1"
33
description: "New Dart runtime for ANTLR4."
44
homepage: "https://github.com/antlr/antlr4"
55
license: "BSD-3-Clause"

runtime/Go/antlr/antlrdoc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Here is a general template for an ANTLR based recognizer in Go:
2727
├── myproject
2828
├── parser
2929
│ ├── mygrammar.g4
30-
│ ├── antlr-4.11.0-complete.jar
30+
│ ├── antlr-4.11.1-complete.jar
3131
│ ├── error_listeners.go
3232
│ ├── generate.go
3333
│ ├── generate.sh
@@ -47,7 +47,7 @@ And the generate.sh file will look similar to this:
4747
4848
#!/bin/sh
4949
50-
alias antlr4='java -Xmx500M -cp "./antlr4-4.11.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
50+
alias antlr4='java -Xmx500M -cp "./antlr4-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
5151
antlr4 -Dlanguage=Go -no-visitor -package tgram *.g4
5252
5353
depending on whether you want visitors or listeners or any other ANTLR options.

runtime/Go/antlr/recognizer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var tokenTypeMapCache = make(map[string]int)
4949
var ruleIndexMapCache = make(map[string]int)
5050

5151
func (b *BaseRecognizer) checkVersion(toolVersion string) {
52-
runtimeVersion := "4.11.0"
52+
runtimeVersion := "4.11.1"
5353
if runtimeVersion != toolVersion {
5454
fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion)
5555
}

runtime/Go/antlr/v4/antlrdoc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Here is a general template for an ANTLR based recognizer in Go:
2727
├── myproject
2828
├── parser
2929
│ ├── mygrammar.g4
30-
│ ├── antlr-4.11.0-complete.jar
30+
│ ├── antlr-4.11.1-complete.jar
3131
│ ├── error_listeners.go
3232
│ ├── generate.go
3333
│ ├── generate.sh
@@ -47,7 +47,7 @@ And the generate.sh file will look similar to this:
4747
4848
#!/bin/sh
4949
50-
alias antlr4='java -Xmx500M -cp "./antlr4-4.11.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
50+
alias antlr4='java -Xmx500M -cp "./antlr4-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
5151
antlr4 -Dlanguage=Go -no-visitor -package parser *.g4
5252
5353
depending on whether you want visitors or listeners or any other ANTLR options.

runtime/Go/antlr/v4/recognizer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var tokenTypeMapCache = make(map[string]int)
4949
var ruleIndexMapCache = make(map[string]int)
5050

5151
func (b *BaseRecognizer) checkVersion(toolVersion string) {
52-
runtimeVersion := "4.11.0"
52+
runtimeVersion := "4.11.1"
5353
if runtimeVersion != toolVersion {
5454
fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion)
5555
}

runtime/Java/src/org/antlr/v4/runtime/RuntimeMetaData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class RuntimeMetaData {
6767
* omitted.</li>
6868
* </ul>
6969
*/
70-
public static final String VERSION = "4.11.1-SNAPSHOT";
70+
public static final String VERSION = "4.11.1";
7171

7272
/**
7373
* Gets the currently executing version of the ANTLR 4 runtime library.

runtime/JavaScript/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/JavaScript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "antlr4",
3-
"version": "4.11.0",
3+
"version": "4.11.1",
44
"type": "module",
55
"description": "JavaScript runtime for ANTLR4",
66
"main": "src/antlr4/index.js",

runtime/JavaScript/src/antlr4/Recognizer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class Recognizer {
1515
}
1616

1717
checkVersion(toolVersion) {
18-
const runtimeVersion = "4.11.0";
18+
const runtimeVersion = "4.11.1";
1919
if (runtimeVersion!==toolVersion) {
2020
console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion);
2121
}

runtime/Python2/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup
22

3-
v = '4.11.0'
3+
v = '4.11.1'
44
setup(
55
name='antlr4-python2-runtime',
66
version=v,

runtime/Python2/src/antlr4/Recognizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def extractVersion(self, version):
3030
return major, minor
3131

3232
def checkVersion(self, toolVersion):
33-
runtimeVersion = "4.11.0"
33+
runtimeVersion = "4.11.1"
3434
rvmajor, rvminor = self.extractVersion(runtimeVersion)
3535
tvmajor, tvminor = self.extractVersion(toolVersion)
3636
if rvmajor!=tvmajor or rvminor!=tvminor:

runtime/Python3/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup
22

3-
v = '4.11.0'
3+
v = '4.11.1'
44

55
setup(
66
name='antlr4-python3-runtime',

runtime/Python3/src/antlr4/Recognizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def extractVersion(self, version):
3434
return major, minor
3535

3636
def checkVersion(self, toolVersion):
37-
runtimeVersion = "4.11.0"
37+
runtimeVersion = "4.11.1"
3838
rvmajor, rvminor = self.extractVersion(runtimeVersion)
3939
tvmajor, tvminor = self.extractVersion(toolVersion)
4040
if rvmajor!=tvmajor or rvminor!=tvminor:

runtime/Swift/Sources/Antlr4/RuntimeMetaData.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class RuntimeMetaData {
6363
/// omitted, the `-` (hyphen-minus) appearing before it is also
6464
/// omitted.
6565
///
66-
public static let VERSION: String = "4.11.0"
66+
public static let VERSION: String = "4.11.1"
6767

6868
///
6969
/// Gets the currently executing version of the ANTLR 4 runtime library.

runtime/Swift/Tests/Antlr4Tests/RuntimeMetaDataTests.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class RuntimeMetaDataTests: XCTestCase {
3131
doGetMajorMinorVersionTest("4.10-SNAPSHOT", "4.10")
3232
doGetMajorMinorVersionTest("4.10.1", "4.10")
3333
doGetMajorMinorVersionTest("4.11.0", "4.11")
34-
doGetMajorMinorVersionTest("4.11-SNAPSHOT", "4.11")
34+
doGetMajorMinorVersionTest("4.11.1", "4.11")
35+
doGetMajorMinorVersionTest("4.11.0-SNAPSHOT", "4.11")
36+
doGetMajorMinorVersionTest("4.11.1-SNAPSHOT", "4.11")
3537
}
3638
}
3739

scripts/files-to-update.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
docker/Dockerfile
99
runtime/Go/antlr/recognizer.go
1010
runtime/Go/antlr/v4/recognizer.go
11+
runtime/Go/antlr/v4/antlrdoc.go
12+
runtime/Go/antlr/antlrdoc.go
1113
runtime/Python3/setup.py
1214
runtime/Python3/src/antlr4/Recognizer.py
1315
runtime/Python2/setup.py
@@ -32,7 +34,6 @@ runtime/JavaScript/src/antlr4/Recognizer.js
3234

3335
# Allow doc files to have multiple values updated
3436
* doc/swift-target.md
35-
* doc/dart-target.md
3637
# doc/releasing-antlr.md
3738
* doc/getting-started.md
3839
* doc/swift-target.md

0 commit comments

Comments
 (0)