Update version in many files to 4.13.0
This commit is contained in:
parent
a9639d06de
commit
c630cb6bce
|
@ -14,10 +14,10 @@ That command creates `antlr4` and `antlr4-parse` executables that, if necessary,
|
|||
|
||||
```bash
|
||||
$ antlr4
|
||||
Downloading antlr4-4.12.0-complete.jar
|
||||
Downloading antlr4-4.13.0-complete.jar
|
||||
ANTLR tool needs Java to run; install Java JRE 11 yes/no (default yes)? y
|
||||
Installed Java in /Users/parrt/.jre/jdk-11.0.15+10-jre; remove that dir to uninstall
|
||||
ANTLR Parser Generator Version 4.12.0
|
||||
ANTLR Parser Generator Version 4.13.0
|
||||
-o ___ specify output directory where all output is generated
|
||||
-lib ___ specify location of grammars, tokens files
|
||||
...
|
||||
|
@ -130,7 +130,7 @@ ExprBaseListener.h ExprLexer.h ExprListener.h ExprParser.h
|
|||
|
||||
ANTLR is really two things: a tool written in Java that translates your grammar to a parser/lexer in Java (or other target language) and the runtime library 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.
|
||||
|
||||
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.12.0-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
|
||||
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.13.0-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
|
||||
|
||||
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).
|
||||
|
||||
|
@ -140,24 +140,24 @@ If you are going to integrate ANTLR into your existing build system using mvn, a
|
|||
1. Download
|
||||
```
|
||||
$ cd /usr/local/lib
|
||||
$ curl -O https://www.antlr.org/download/antlr-4.12.0-complete.jar
|
||||
$ curl -O https://www.antlr.org/download/antlr-4.13.0-complete.jar
|
||||
```
|
||||
Or just download in browser from website:
|
||||
[https://www.antlr.org/download.html](https://www.antlr.org/download.html)
|
||||
and put it somewhere rational like `/usr/local/lib`.
|
||||
|
||||
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.12.0 support jdk 1.8
|
||||
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.13.0 support jdk 1.8
|
||||
|
||||
2. Add `antlr-4.12.0-complete.jar` to your `CLASSPATH`:
|
||||
2. Add `antlr-4.13.0-complete.jar` to your `CLASSPATH`:
|
||||
```
|
||||
$ export CLASSPATH=".:/usr/local/lib/antlr-4.12.0-complete.jar:$CLASSPATH"
|
||||
$ export CLASSPATH=".:/usr/local/lib/antlr-4.13.0-complete.jar:$CLASSPATH"
|
||||
```
|
||||
It's also a good idea to put this in your `.bash_profile` or whatever your startup script is.
|
||||
|
||||
3. Create aliases for the ANTLR Tool, and `TestRig`.
|
||||
```
|
||||
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.12.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.12.0-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
|
||||
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
|
||||
```
|
||||
|
||||
### WINDOWS
|
||||
|
@ -165,13 +165,13 @@ $ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.12.0-complete.jar:$CLASS
|
|||
(*Thanks to Graham Wideman*)
|
||||
|
||||
0. Install Java (version 1.7 or higher)
|
||||
1. Download antlr-4.12.0-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
|
||||
1. Download antlr-4.13.0-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
|
||||
Save to your directory for 3rd party Java libraries, say `C:\Javalib`
|
||||
2. Add `antlr-4.12.0-complete.jar` to CLASSPATH, either:
|
||||
2. Add `antlr-4.13.0-complete.jar` to CLASSPATH, either:
|
||||
* Permanently: Using System Properties dialog > Environment variables > Create or append to `CLASSPATH` variable
|
||||
* Temporarily, at command line:
|
||||
```
|
||||
SET CLASSPATH=.;C:\Javalib\antlr-4.12.0-complete.jar;%CLASSPATH%
|
||||
SET CLASSPATH=.;C:\Javalib\antlr-4.13.0-complete.jar;%CLASSPATH%
|
||||
```
|
||||
3. Create short convenient commands for the ANTLR Tool, and TestRig, using batch files or doskey commands:
|
||||
* Batch files (in directory in system PATH) antlr4.bat and grun.bat
|
||||
|
@ -197,7 +197,7 @@ Either launch org.antlr.v4.Tool directly:
|
|||
|
||||
```
|
||||
$ java org.antlr.v4.Tool
|
||||
ANTLR Parser Generator Version 4.12.0
|
||||
ANTLR Parser Generator Version 4.13.0
|
||||
-o ___ specify output directory where all output is generated
|
||||
-lib ___ specify location of .tokens files
|
||||
...
|
||||
|
@ -206,8 +206,8 @@ ANTLR Parser Generator Version 4.12.0
|
|||
or use -jar option on java:
|
||||
|
||||
```
|
||||
$ java -jar /usr/local/lib/antlr-4.12.0-complete.jar
|
||||
ANTLR Parser Generator Version 4.12.0
|
||||
$ java -jar /usr/local/lib/antlr-4.13.0-complete.jar
|
||||
ANTLR Parser Generator Version 4.13.0
|
||||
-o ___ specify output directory where all output is generated
|
||||
-lib ___ specify location of .tokens files
|
||||
...
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Changes to the Go Runtime over time
|
||||
|
||||
## v4.12.0 to v4.12.1
|
||||
## v4.12.0 to v4.13.0
|
||||
|
||||
Strictly speaking, if ANTLR was a go only project following [SemVer](https://semver.org/) release v4.12.1 would be
|
||||
Strictly speaking, if ANTLR was a go only project following [SemVer](https://semver.org/) release v4.13.0 would be
|
||||
at least a minor version change and arguably a bump to v5. However, we must follow the ANTLR conventions here or the
|
||||
release numbers would quickly become confusing. I apologize for being unable to follow the Go release rules absolutely
|
||||
to the letter.
|
||||
|
|
|
@ -91,8 +91,8 @@ golang.org/x/exp
|
|||
```
|
||||
|
||||
A complete list of releases can be found on [the release page](https://github.com/antlr/antlr4/releases). The Go
|
||||
runtime will be tagged using standard Go tags, so release 4.12.1 in the `antlr4-go/antlr` repo, will be tagged with
|
||||
`v4.12.1` and go get will pick that up from the ANTLR repo.
|
||||
runtime will be tagged using standard Go tags, so release 4.13.0 in the `antlr4-go/antlr` repo, will be tagged with
|
||||
`v4.13.0` and go get will pick that up from the ANTLR repo.
|
||||
|
||||
#### 3. Configuring `go generate` in your project
|
||||
|
||||
|
@ -108,7 +108,7 @@ place the ANTLR grammar files in their own package in your project structure. He
|
|||
├── myproject
|
||||
├── parser
|
||||
│ ├── mygrammar.g4
|
||||
│ ├── antlr-4.12.1-complete.jar
|
||||
│ ├── antlr-4.13.0-complete.jar
|
||||
│ ├── generate.go
|
||||
│ └── generate.sh
|
||||
├── parsing # Generated code goes here
|
||||
|
@ -133,7 +133,7 @@ And the `generate.sh` file will look similar to this:
|
|||
```shell
|
||||
#!/bin/sh
|
||||
|
||||
alias antlr4='java -Xmx500M -cp "./antlr-4.12.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
alias antlr4='java -Xmx500M -cp "./antlr-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
antlr4 -Dlanguage=Go -no-visitor -package parsing *.g4
|
||||
```
|
||||
|
||||
|
@ -172,10 +172,10 @@ So the command `go get github.com/antlr/antlr4/runtime/Go/antlr` would just brin
|
|||
whatever was the `HEAD` of the master branch. While this *kind of* worked, it is obviously subject to problems and does
|
||||
not fit properly with the idiomatic ways of Go.
|
||||
|
||||
As of v4.12.1 the runtime code exists in its own repo, `github.com/antlr4-go/antlr`, and is correctly tagged.
|
||||
As of v4.13.0 the runtime code exists in its own repo, `github.com/antlr4-go/antlr`, and is correctly tagged.
|
||||
However, this means you need to perform a few simple actions in order to upgrade to the `/v4` path.
|
||||
|
||||
- Firstly, make sure that you are using an ANTLR tool jar with a version number of 4.12.1 or greater.
|
||||
- Firstly, make sure that you are using an ANTLR tool jar with a version number of 4.13.0 or greater.
|
||||
- Next you replace any mention of the old (default) path to ANTLR in your go source files.
|
||||
- If using modules, remove any existing reference to the ANTLR Go runtime
|
||||
- Now regenerate your grammar files either manually or using `go generate ./...` (see above)
|
||||
|
@ -197,7 +197,7 @@ go mod tidy
|
|||
Should fix up your `go.mod` file to reference only the `v4` version of the ANTLR Go runtime:
|
||||
|
||||
```shell
|
||||
require github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.12.1
|
||||
require github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.13.0
|
||||
```
|
||||
|
||||
From this point on, your go mod commands will work correctly with the ANTLR repo and upgrades and downgrades will work
|
||||
|
|
|
@ -25,19 +25,21 @@ Make sure this feature is turned on for the `antlr4` repo upon release.
|
|||
Wack any existing tag as mvn will create one and it fails if already there.
|
||||
|
||||
```
|
||||
$ git tag -d 4.12.0
|
||||
$ git push origin :refs/tags/4.12.0
|
||||
$ git push upstream :refs/tags/4.12.0
|
||||
$ git tag -d 4.13.0
|
||||
$ git push origin :refs/tags/4.13.0
|
||||
$ git push upstream :refs/tags/4.13.0
|
||||
```
|
||||
|
||||
### Go release tags
|
||||
|
||||
It seems that [Go needs a `v` in the release git tag](https://go.dev/ref/mod#glos-version) so make sure that we double up with 4.12.0 and v4.12.0.
|
||||
*I don't think this is necessary anymore as we have moved it release branch to https://github.com/antlr4-go/antlr*
|
||||
|
||||
It seems that [Go needs a `v` in the release git tag](https://go.dev/ref/mod#glos-version) so make sure that we double up with 4.13.0 and v4.13.0.
|
||||
|
||||
```
|
||||
$ git tag -a runtime/Go/antlr/v4/v4.12.0 -m "Go runtime module only"
|
||||
$ git push upstream runtime/Go/antlr/v4/v4.12.0
|
||||
$ git push origin runtime/Go/antlr/v4/v4.12.0
|
||||
$ git tag -a runtime/Go/antlr/v4/v4.13.0 -m "Go runtime module only"
|
||||
$ git push upstream runtime/Go/antlr/v4/v4.13.0
|
||||
$ git push origin runtime/Go/antlr/v4/v4.13.0
|
||||
```
|
||||
|
||||
|
||||
|
@ -75,7 +77,7 @@ Commit to repository.
|
|||
|
||||
### PHP runtime
|
||||
|
||||
We only have to copy the PHP runtime into the ANTLR repository to run the unittests. But, we still need to bump the version to 4.12.0 in `~/antlr/code/antlr-php-runtime/src/RuntimeMetaData.php` in the separate repository, commit, and push.
|
||||
We only have to copy the PHP runtime into the ANTLR repository to run the unittests. But, we still need to bump the version to 4.13.0 in `~/antlr/code/antlr-php-runtime/src/RuntimeMetaData.php` in the separate repository, commit, and push.
|
||||
|
||||
```
|
||||
cd ~/antlr/code/antlr-php-runtime/src
|
||||
|
@ -92,7 +94,7 @@ git push origin master
|
|||
|
||||
## Build XPath parsers
|
||||
|
||||
This section addresses a [circular dependency regarding XPath](https://github.com/antlr/antlr4/issues/3600). In the java target I avoided a circular dependency (gen 4.12.0 parser for XPath using 4.12.0 which needs it to build) by hand building the parser: runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java. Probably we won't have to rerun this for the patch releases, just major ones that alter the ATN serialization.
|
||||
This section addresses a [circular dependency regarding XPath](https://github.com/antlr/antlr4/issues/3600). In the java target I avoided a circular dependency (gen 4.13.0 parser for XPath using 4.13.0 which needs it to build) by hand building the parser: runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java. Probably we won't have to rerun this for the patch releases, just major ones that alter the ATN serialization.
|
||||
|
||||
```bash
|
||||
cd ~/antlr/code/antlr4/runtime/Cpp/runtime/src/tree/xpath
|
||||
|
@ -157,7 +159,7 @@ Here is the file template
|
|||
|
||||
## Maven deploy snapshot
|
||||
|
||||
The goal is to get a snapshot, such as `4.12.0-SNAPSHOT`, to the staging server: [antlr4 tool](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4/4.12.0-SNAPSHOT/) and [antlr4 java runtime](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4-runtime/4.12.0-SNAPSHOT/).
|
||||
The goal is to get a snapshot, such as `4.13.0-SNAPSHOT`, to the staging server: [antlr4 tool](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4/4.13.0-SNAPSHOT/) and [antlr4 java runtime](https://oss.sonatype.org/content/repositories/snapshots/org/antlr/antlr4-runtime/4.13.0-SNAPSHOT/).
|
||||
|
||||
Do this:
|
||||
|
||||
|
@ -228,18 +230,18 @@ It will start out by asking you the version number:
|
|||
|
||||
```
|
||||
...
|
||||
What is the release version for "ANTLR 4"? (org.antlr:antlr4-master) 4.12.0: : 4.12.0
|
||||
What is the release version for "ANTLR 4 Runtime"? (org.antlr:antlr4-runtime) 4.12.0: :
|
||||
What is the release version for "ANTLR 4 Tool"? (org.antlr:antlr4) 4.12.0: :
|
||||
What is the release version for "ANTLR 4 Maven plugin"? (org.antlr:antlr4-maven-plugin) 4.12.0: :
|
||||
What is the release version for "ANTLR 4 Runtime Test Generator"? (org.antlr:antlr4-runtime-testsuite) 4.12.0: :
|
||||
What is the release version for "ANTLR 4 Tool Tests"? (org.antlr:antlr4-tool-testsuite) 4.12.0: :
|
||||
What is SCM release tag or label for "ANTLR 4"? (org.antlr:antlr4-master) antlr4-master-4.12.0: : 4.12.0
|
||||
What is the new development version for "ANTLR 4"? (org.antlr:antlr4-master) 4.12.1-SNAPSHOT:
|
||||
What is the release version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.0: : 4.13.0
|
||||
What is the release version for "ANTLR 4 Runtime"? (org.antlr:antlr4-runtime) 4.13.0: :
|
||||
What is the release version for "ANTLR 4 Tool"? (org.antlr:antlr4) 4.13.0: :
|
||||
What is the release version for "ANTLR 4 Maven plugin"? (org.antlr:antlr4-maven-plugin) 4.13.0: :
|
||||
What is the release version for "ANTLR 4 Runtime Test Generator"? (org.antlr:antlr4-runtime-testsuite) 4.13.0: :
|
||||
What is the release version for "ANTLR 4 Tool Tests"? (org.antlr:antlr4-tool-testsuite) 4.13.0: :
|
||||
What is SCM release tag or label for "ANTLR 4"? (org.antlr:antlr4-master) antlr4-master-4.13.0: : 4.13.0
|
||||
What is the new development version for "ANTLR 4"? (org.antlr:antlr4-master) 4.13.1-SNAPSHOT:
|
||||
...
|
||||
```
|
||||
|
||||
Maven will go through your pom.xml files to update versions from 4.12.0-SNAPSHOT to 4.12.0 for release and then to 4.12.1-SNAPSHOT after release, which is done with:
|
||||
Maven will go through your pom.xml files to update versions from 4.13.0-SNAPSHOT to 4.13.0 for release and then to 4.13.1-SNAPSHOT after release, which is done with:
|
||||
|
||||
```bash
|
||||
mvn release:perform -Darguments="-DskipTests"
|
||||
|
@ -253,7 +255,7 @@ Now, go here:
|
|||
|
||||
and on the left click "Staging Repositories". You click the staging repo and close it, then you refresh, click it and release it. It's done when you see it here:
|
||||
|
||||
[https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0.jar](https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0.jar)
|
||||
[https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar](https://oss.sonatype.org/service/local/repositories/releases/content/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar)
|
||||
|
||||
All releases should be here: [https://repo1.maven.org/maven2/org/antlr/antlr4-runtime](https://repo1.maven.org/maven2/org/antlr/antlr4-runtime).
|
||||
|
||||
|
@ -277,7 +279,7 @@ Move (and zip) target to website:
|
|||
|
||||
```bash
|
||||
cd src
|
||||
zip -r ~/antlr/sites/website-antlr4/download/antlr-javascript-runtime-4.12.0.zip .
|
||||
zip -r ~/antlr/sites/website-antlr4/download/antlr-javascript-runtime-4.13.0.zip .
|
||||
```
|
||||
|
||||
### CSharp
|
||||
|
@ -345,7 +347,7 @@ Then run the python build and upload:
|
|||
cd ~/antlr/code/antlr4/runtime/Python2
|
||||
# assume you have ~/.pypirc set up
|
||||
pip install build twine
|
||||
twine upload dist/antlr4-python2-runtime-4.12.0.tar.gz
|
||||
twine upload dist/antlr4-python2-runtime-4.13.0.tar.gz
|
||||
```
|
||||
|
||||
For Python 3 target, do
|
||||
|
@ -377,7 +379,7 @@ On a Mac (with XCode 7+ installed):
|
|||
```bash
|
||||
cd ~/antlr/code/antlr4/runtime/Cpp
|
||||
./deploy-macos.sh
|
||||
cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.12.0-macos.zip
|
||||
cp antlr4-cpp-runtime-macos.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-macos.zip
|
||||
```
|
||||
|
||||
On any Mac or Linux machine:
|
||||
|
@ -385,7 +387,7 @@ On any Mac or Linux machine:
|
|||
```bash
|
||||
cd ~/antlr/code/antlr4/runtime/Cpp
|
||||
./deploy-source.sh
|
||||
cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.12.0-source.zip
|
||||
cp antlr4-cpp-runtime-source.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-source.zip
|
||||
```
|
||||
|
||||
On a Windows machine the build scripts checks if VS 2017 and/or VS 2019 are installed and builds binaries for each, if found. This script requires 7z to be installed (http://7-zip.org then do `set PATH=%PATH%;C:\Program Files\7-Zip\` from DOS not powershell).
|
||||
|
@ -393,16 +395,16 @@ On a Windows machine the build scripts checks if VS 2017 and/or VS 2019 are inst
|
|||
```bash
|
||||
cd ~/antlr/code/antlr4/runtime/Cpp
|
||||
deploy-windows.cmd Community
|
||||
cp antlr4-cpp-runtime-vs2019.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.12.0-vs2019.zip
|
||||
cp antlr4-cpp-runtime-vs2019.zip ~/antlr/sites/website-antlr4/download/antlr4-cpp-runtime-4.13.0-vs2019.zip
|
||||
```
|
||||
|
||||
Move target to website (**_rename to a specific ANTLR version first if needed_**):
|
||||
|
||||
```bash
|
||||
pushd ~/antlr/sites/website-antlr4/download
|
||||
git add antlr4-cpp-runtime-4.12.0-macos.zip
|
||||
git add antlr4-cpp-runtime-4.12.0-windows.zip
|
||||
git add antlr4-cpp-runtime-4.12.0-source.zip
|
||||
git add antlr4-cpp-runtime-4.13.0-macos.zip
|
||||
git add antlr4-cpp-runtime-4.13.0-windows.zip
|
||||
git add antlr4-cpp-runtime-4.13.0-source.zip
|
||||
git commit -a -m 'update C++ runtime'
|
||||
git push origin gh-pages
|
||||
popd
|
||||
|
@ -429,7 +431,7 @@ Otherwise enter `N` to ignore the warning.
|
|||
Jars are in:
|
||||
|
||||
```
|
||||
~/.m2/repository/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0
|
||||
~/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0
|
||||
```
|
||||
|
||||
### Update version and copy jars / api
|
||||
|
@ -438,36 +440,36 @@ Copy javadoc and java jars to website using this script:
|
|||
|
||||
```bash
|
||||
cd ~/antlr/code/antlr4
|
||||
python scripts/deploy_to_website.py 4.11.1 4.12.0
|
||||
python scripts/deploy_to_website.py 4.12.0 4.13.0
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```bash
|
||||
Updating ANTLR version from 4.11.1 to 4.12.0
|
||||
Updating ANTLR version from 4.12.0 to 4.13.0
|
||||
Set ANTLR website root (default /Users/parrt/antlr/sites/website-antlr4):
|
||||
Version string updated. Please commit/push:
|
||||
Javadoc copied:
|
||||
api/Java updated from antlr4-runtime-4.12.0-javadoc.jar
|
||||
api/JavaTool updated from antlr4-4.12.0-javadoc.jar
|
||||
api/Java updated from antlr4-runtime-4.13.0-javadoc.jar
|
||||
api/JavaTool updated from antlr4-4.13.0-javadoc.jar
|
||||
Jars copied:
|
||||
antlr-4.12.0-complete.jar
|
||||
antlr-runtime-4.12.0.jar
|
||||
antlr-4.13.0-complete.jar
|
||||
antlr-runtime-4.13.0.jar
|
||||
|
||||
Please look for and add new api files!!
|
||||
Then MANUALLY commit/push:
|
||||
|
||||
git commit -a -m 'Update website, javadoc, jars to 4.12.0'
|
||||
git commit -a -m 'Update website, javadoc, jars to 4.13.0'
|
||||
git push origin gh-pages
|
||||
```
|
||||
|
||||
<!--
|
||||
```bash
|
||||
cp ~/.m2/repository/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0.jar ~/antlr/sites/website-antlr4/download/antlr-runtime-4.12.0.jar
|
||||
cp ~/.m2/repository/org/antlr/antlr4/4.12.0/antlr4-4.12.0-complete.jar ~/antlr/sites/website-antlr4/download/antlr-4.12.0-complete.jar
|
||||
cp ~/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0.jar ~/antlr/sites/website-antlr4/download/antlr-runtime-4.13.0.jar
|
||||
cp ~/.m2/repository/org/antlr/antlr4/4.13.0/antlr4-4.13.0-complete.jar ~/antlr/sites/website-antlr4/download/antlr-4.13.0-complete.jar
|
||||
cd ~/antlr/sites/website-antlr4/download
|
||||
git add antlr-4.12.0-complete.jar
|
||||
git add antlr-runtime-4.12.0.jar
|
||||
git add antlr-4.13.0-complete.jar
|
||||
git add antlr-runtime-4.13.0.jar
|
||||
```
|
||||
-->
|
||||
|
||||
|
@ -475,7 +477,7 @@ Once it's done, you must do the following manually:
|
|||
|
||||
```
|
||||
cd ~/antlr/sites/website-antlr4
|
||||
git commit -a -m 'Update website, javadoc, jars to 4.12.0'
|
||||
git commit -a -m 'Update website, javadoc, jars to 4.13.0'
|
||||
git push origin gh-pages
|
||||
```
|
||||
|
||||
|
@ -487,9 +489,9 @@ cd ~/antlr/sites/website-antlr4/api
|
|||
git checkout gh-pages
|
||||
git pull origin gh-pages
|
||||
cd Java
|
||||
jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0-javadoc.jar
|
||||
jar xvf ~/.m2/repository/org/antlr/antlr4-runtime/4.13.0/antlr4-runtime-4.13.0-javadoc.jar
|
||||
cd ../JavaTool
|
||||
jar xvf ~/.m2/repository/org/antlr/antlr4/4.12.0/antlr4-4.12.0-javadoc.jar
|
||||
jar xvf ~/.m2/repository/org/antlr/antlr4/4.13.0/antlr4-4.13.0-javadoc.jar
|
||||
git commit -a -m 'freshen api doc'
|
||||
git push origin gh-pages
|
||||
```
|
||||
|
|
|
@ -131,7 +131,7 @@ Add Antlr4 as a dependency to your `Package.swift` file. For more information, p
|
|||
|
||||
|
||||
```swift
|
||||
.package(url: "https://github.com/antlr/antlr4", from: "4.12.0")
|
||||
.package(url: "https://github.com/antlr/antlr4", from: "4.13.0")
|
||||
```
|
||||
|
||||
## Swift access levels
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM eclipse-temurin:11 AS builder
|
|||
|
||||
WORKDIR /opt/antlr4
|
||||
|
||||
ARG ANTLR_VERSION="4.12.0"
|
||||
ARG ANTLR_VERSION="4.13.0"
|
||||
ARG MAVEN_OPTS="-Xmx1G"
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"@types/node": "^18.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"antlr4": "^4.12.0"
|
||||
"antlr4": "^4.13.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Company>The ANTLR Organization</Company>
|
||||
<Version>4.12.0</Version>
|
||||
<Version>4.13.0</Version>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
<TargetFramework Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net45;netstandard2.0</TargetFrameworks>
|
||||
|
|
|
@ -6,4 +6,4 @@ using System;
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: AssemblyVersion("4.12.0")]
|
||||
[assembly: AssemblyVersion("4.13.0")]
|
||||
|
|
|
@ -41,7 +41,7 @@ See the docs and the book to learn about writing lexer and parser grammars.
|
|||
### Step 4: Generate the C# code
|
||||
|
||||
This can be done either from the cmd line, or by adding a custom pre-build command in your project.
|
||||
At minimal, the cmd line should look as follows: ``java -jar antlr4-4.12.0.jar -Dlanguage=CSharp grammar.g4``
|
||||
At minimal, the cmd line should look as follows: ``java -jar antlr4-4.13.0.jar -Dlanguage=CSharp grammar.g4``
|
||||
This will generate the files, which you can then integrate in your project.
|
||||
This is just a quick start. The tool has many useful options to control generation, please refer to its documentation.
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// ANTLR Version: 4.12.0
|
||||
// ANTLR Version: 4.11.2-SNAPSHOT
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.12.0
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.11.2-SNAPSHOT
|
||||
|
||||
// Unreachable code detected
|
||||
#pragma warning disable 0162
|
||||
|
@ -27,7 +27,7 @@ using Antlr4.Runtime.Atn;
|
|||
using Antlr4.Runtime.Misc;
|
||||
using DFA = Antlr4.Runtime.Dfa.DFA;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.12.0")]
|
||||
[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.11.2-SNAPSHOT")]
|
||||
[System.CLSCompliant(false)]
|
||||
public partial class XPathLexer : Lexer {
|
||||
protected static DFA[] decisionToDFA;
|
||||
|
|
|
@ -1 +1 @@
|
|||
4.12.0
|
||||
4.13.0
|
||||
|
|
|
@ -96,7 +96,7 @@ target_link_libraries( Parsertest PRIVATE
|
|||
find_package(antlr4-generator REQUIRED)
|
||||
|
||||
# Set path to generator
|
||||
set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.12.0-complete.jar)
|
||||
set(ANTLR4_JAR_LOCATION ${PROJECT_SOURCE_DIR}/thirdparty/antlr/antlr-4.13.0-complete.jar)
|
||||
|
||||
# generate lexer
|
||||
antlr4_generate(
|
||||
|
|
|
@ -46,7 +46,7 @@ else()
|
|||
set(ANTLR4_SHARED_LIBRARIES
|
||||
${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dll.a)
|
||||
set(ANTLR4_RUNTIME_LIBRARIES
|
||||
${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.12.0.dll)
|
||||
${ANTLR4_OUTPUT_DIR}/cygantlr4-runtime-4.13.0.dll)
|
||||
elseif(APPLE)
|
||||
set(ANTLR4_RUNTIME_LIBRARIES
|
||||
${ANTLR4_OUTPUT_DIR}/libantlr4-runtime.dylib)
|
||||
|
|
|
@ -2,7 +2,7 @@ find_package(Java QUIET COMPONENTS Runtime)
|
|||
|
||||
if(NOT ANTLR_EXECUTABLE)
|
||||
find_program(ANTLR_EXECUTABLE
|
||||
NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.12.0-complete.jar)
|
||||
NAMES antlr.jar antlr4.jar antlr-4.jar antlr-4.13.0-complete.jar)
|
||||
endif()
|
||||
|
||||
if(ANTLR_EXECUTABLE AND Java_JAVA_EXECUTABLE)
|
||||
|
|
|
@ -29,8 +29,8 @@ set(ANTLR4_WITH_STATIC_CRT OFF)
|
|||
# By default the latest version of antlr4 will be used. You can specify a
|
||||
# specific, stable version by setting a repository tag value or a link
|
||||
# to a zip file containing the libary source.
|
||||
# set(ANTLR4_TAG 4.12.0)
|
||||
# set(ANTLR4_ZIP_REPOSITORY https://github.com/antlr/antlr4/archive/refs/tags/4.12.0.zip)
|
||||
# set(ANTLR4_TAG 4.13.0)
|
||||
# set(ANTLR4_ZIP_REPOSITORY https://github.com/antlr/antlr4/archive/refs/tags/4.13.0.zip)
|
||||
|
||||
# add external build for antlrcpp
|
||||
include(ExternalAntlr4Cpp)
|
||||
|
@ -39,7 +39,7 @@ include_directories(${ANTLR4_INCLUDE_DIRS})
|
|||
|
||||
# set variable pointing to the antlr tool that supports C++
|
||||
# this is not required if the jar file can be found under PATH environment
|
||||
set(ANTLR_EXECUTABLE /home/user/antlr-4.12.0-complete.jar)
|
||||
set(ANTLR_EXECUTABLE /home/user/antlr-4.13.0-complete.jar)
|
||||
# add macros to generate ANTLR Cpp code from grammar
|
||||
find_package(ANTLR REQUIRED)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
:: Download the ANLTR jar and place it in the same folder as this script (or adjust the LOCATION var accordingly).
|
||||
|
||||
set LOCATION=antlr-4.12.0-complete.jar
|
||||
set LOCATION=antlr-4.13.0-complete.jar
|
||||
java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4
|
||||
::java -jar %LOCATION% -Dlanguage=Cpp -listener -visitor -o generated/ -package antlrcpptest -XdbgST TLexer.g4 TParser.g4
|
||||
::java -jar %LOCATION% -Dlanguage=Java -listener -visitor -o generated/ -package antlrcpptest TLexer.g4 TParser.g4
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "antlr4-common.h"
|
||||
|
||||
#define ANTLRCPP_VERSION_MAJOR 4
|
||||
#define ANTLRCPP_VERSION_MINOR 12
|
||||
#define ANTLRCPP_VERSION_MINOR 13
|
||||
#define ANTLRCPP_VERSION_PATCH 0
|
||||
|
||||
#define ANTLRCPP_MAKE_VERSION(major, minor, patch) ((major) * 100000 + (minor) * 1000 + (patch))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.12.0
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.13.0
|
||||
|
||||
|
||||
#include "XPathLexer.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.12.0
|
||||
// Generated from XPathLexer.g4 by ANTLR 4.13.0
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class RuntimeMetaData {
|
|||
/// omitted, the {@code -} (hyphen-minus) appearing before it is also
|
||||
/// omitted.</li>
|
||||
/// </ul>
|
||||
static final String VERSION = '4.12.0';
|
||||
static final String VERSION = '4.13.0';
|
||||
|
||||
/// Gets the currently executing version of the ANTLR 4 runtime library.
|
||||
///
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: "antlr4"
|
||||
version: "4.12.0"
|
||||
version: "4.13.0"
|
||||
description: "New Dart runtime for ANTLR4."
|
||||
homepage: "https://github.com/antlr/antlr4"
|
||||
license: "BSD-3-Clause"
|
||||
|
|
|
@ -17,9 +17,9 @@ ANTLR4 that it is compatible with (I.E. uses the /v4 path).
|
|||
However, this was found to be problematic, as it meant that with the runtime embedded so far underneath the root
|
||||
of the repo, the `go get` and related commands could not properly resolve the location of the go runtime source code.
|
||||
This meant that the reference to the runtime in your `go.mod` file would refer to the correct source code, but would not
|
||||
list the release tag such as @4.12.0 - this was confusing, to say the least.
|
||||
list the release tag such as @4.13.0 - this was confusing, to say the least.
|
||||
|
||||
As of 4.12.1, the runtime is now available as a go module in its own repo, and can be imported as `github.com/antlr4-go/antlr`
|
||||
As of 4.13.0, the runtime is now available as a go module in its own repo, and can be imported as `github.com/antlr4-go/antlr`
|
||||
(the go get command should also be used with this path). See the main documentation for the ANTLR4 project for more information,
|
||||
which is available at [ANTLR docs]. The documentation for using the Go runtime is available at [Go runtime docs].
|
||||
|
||||
|
@ -49,7 +49,7 @@ Here is a general/recommended template for an ANTLR based recognizer in Go:
|
|||
.
|
||||
├── parser
|
||||
│ ├── mygrammar.g4
|
||||
│ ├── antlr-4.12.1-complete.jar
|
||||
│ ├── antlr-4.13.0-complete.jar
|
||||
│ ├── generate.go
|
||||
│ └── generate.sh
|
||||
├── parsing - generated code goes here
|
||||
|
@ -71,7 +71,7 @@ And the generate.sh file will look similar to this:
|
|||
|
||||
#!/bin/sh
|
||||
|
||||
alias antlr4='java -Xmx500M -cp "./antlr4-4.12.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
alias antlr4='java -Xmx500M -cp "./antlr4-4.13.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
antlr4 -Dlanguage=Go -no-visitor -package parsing *.g4
|
||||
|
||||
depending on whether you want visitors or listeners or any other ANTLR options. Not that another option here
|
||||
|
|
|
@ -56,7 +56,7 @@ var tokenTypeMapCache = make(map[string]int)
|
|||
var ruleIndexMapCache = make(map[string]int)
|
||||
|
||||
func (b *BaseRecognizer) checkVersion(toolVersion string) {
|
||||
runtimeVersion := "4.12.0"
|
||||
runtimeVersion := "4.13.0"
|
||||
if runtimeVersion != toolVersion {
|
||||
fmt.Println("ANTLR runtime and generated code versions disagree: " + runtimeVersion + "!=" + toolVersion)
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class RuntimeMetaData {
|
|||
* omitted.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public static final String VERSION = "4.12.0";
|
||||
public static final String VERSION = "4.13.0";
|
||||
|
||||
/**
|
||||
* Gets the currently executing version of the ANTLR 4 runtime library.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "antlr4",
|
||||
"version": "4.12.0",
|
||||
"version": "4.13.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "antlr4",
|
||||
"version": "4.12.0",
|
||||
"version": "4.13.0",
|
||||
"license": "BSD-3-Clause",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.19.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "antlr4",
|
||||
"version": "4.12.0",
|
||||
"version": "4.13.0",
|
||||
"type": "module",
|
||||
"description": "JavaScript runtime for ANTLR4",
|
||||
"browser": "dist/antlr4.web.js",
|
||||
|
|
|
@ -15,7 +15,7 @@ export default class Recognizer {
|
|||
}
|
||||
|
||||
checkVersion(toolVersion) {
|
||||
const runtimeVersion = "4.12.0";
|
||||
const runtimeVersion = "4.13.0";
|
||||
if (runtimeVersion!==toolVersion) {
|
||||
console.log("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from setuptools import setup
|
||||
|
||||
v = '4.12.0'
|
||||
v = '4.13.0'
|
||||
setup(
|
||||
name='antlr4-python2-runtime',
|
||||
version=v,
|
||||
|
|
|
@ -30,7 +30,7 @@ class Recognizer(object):
|
|||
return major, minor
|
||||
|
||||
def checkVersion(self, toolVersion):
|
||||
runtimeVersion = "4.12.0"
|
||||
runtimeVersion = "4.13.0"
|
||||
rvmajor, rvminor = self.extractVersion(runtimeVersion)
|
||||
tvmajor, tvminor = self.extractVersion(toolVersion)
|
||||
if rvmajor!=tvmajor or rvminor!=tvminor:
|
||||
|
|
|
@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "antlr4-python3-runtime"
|
||||
version = "4.12.0"
|
||||
version = "4.13.0"
|
||||
authors = [{name = "Eric Vergnaud", email = "eric.vergnaud@wanadoo.fr"}, {name = "Terence Parr"}, {name = "Sam Harwell"}]
|
||||
license = {text = "BSD"}
|
||||
description = "ANTLR 4.12.0 runtime for Python 3"
|
||||
description = "ANTLR 4.13.0 runtime for Python 3"
|
||||
urls = {Homepage = "http://www.antlr.org"}
|
||||
dependencies = ["typing ; python_version<'3.5'"]
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class Recognizer(object):
|
|||
return major, minor
|
||||
|
||||
def checkVersion(self, toolVersion):
|
||||
runtimeVersion = "4.12.0"
|
||||
runtimeVersion = "4.13.0"
|
||||
rvmajor, rvminor = self.extractVersion(runtimeVersion)
|
||||
tvmajor, tvminor = self.extractVersion(toolVersion)
|
||||
if rvmajor!=tvmajor or rvminor!=tvminor:
|
||||
|
|
|
@ -63,7 +63,7 @@ public class RuntimeMetaData {
|
|||
/// omitted, the `-` (hyphen-minus) appearing before it is also
|
||||
/// omitted.
|
||||
///
|
||||
public static let VERSION: String = "4.12.0"
|
||||
public static let VERSION: String = "4.13.0"
|
||||
|
||||
///
|
||||
/// Gets the currently executing version of the ANTLR 4 runtime library.
|
||||
|
|
|
@ -36,6 +36,8 @@ class RuntimeMetaDataTests: XCTestCase {
|
|||
doGetMajorMinorVersionTest("4.11.1-SNAPSHOT", "4.11")
|
||||
doGetMajorMinorVersionTest("4.12.0-SNAPSHOT", "4.12")
|
||||
doGetMajorMinorVersionTest("4.12.0", "4.12")
|
||||
doGetMajorMinorVersionTest("4.13.0-SNAPSHOT", "4.13")
|
||||
doGetMajorMinorVersionTest("4.13.0", "4.13")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,8 @@
|
|||
# Lines starting with '*' allow multiple changes in single file
|
||||
|
||||
docker/Dockerfile
|
||||
runtime/Go/antlr/recognizer.go
|
||||
runtime/Go/antlr/v4/recognizer.go
|
||||
runtime/Go/antlr/v4/antlrdoc.go
|
||||
runtime/Go/antlr/antlrdoc.go
|
||||
runtime/Python3/pyproject.toml
|
||||
runtime/Python3/src/antlr4/Recognizer.py
|
||||
runtime/Python2/setup.py
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#
|
||||
# traceatn.sh /tmp/JSON.g4 json /tmp/foo.json
|
||||
|
||||
export ANTLRJAR=~/.m2/repository/org/antlr/antlr4/4.12.1-SNAPSHOT/antlr4-4.12.1-SNAPSHOT-complete.jar
|
||||
export TESTJAR=~/.m2/repository/org/antlr/antlr4-runtime-testsuite/4.12.1-SNAPSHOT/antlr4-runtime-testsuite-4.12.1-SNAPSHOT-tests.jar
|
||||
export ANTLRJAR=~/.m2/repository/org/antlr/antlr4/4.13.0-SNAPSHOT/antlr4-4.13.0-SNAPSHOT-complete.jar
|
||||
export TESTJAR=~/.m2/repository/org/antlr/antlr4-runtime-testsuite/4.13.0-SNAPSHOT/antlr4-runtime-testsuite-4.13.0-SNAPSHOT-tests.jar
|
||||
export JUPITER=~/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.9.0/junit-jupiter-api-5.9.0.jar
|
||||
export OPENTEST=~/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar
|
||||
java -classpath $ANTLRJAR:$TESTJAR:$JUPITER:$OPENTEST org.antlr.v4.test.runtime.TraceATN $@
|
||||
|
|
Loading…
Reference in New Issue