Skip to content

Commit 6b49b52

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into test/typescript-compiler-options
2 parents 560c4a0 + 0fd88ba commit 6b49b52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1356
-1074
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ You might also find the following pages useful, particularly if you want to mess
9696

9797
Programmers run into parsing problems all the time. Whether it’s a data format like JSON, a network protocol like SMTP, a server configuration file for Apache, a PostScript/PDF file, or a simple spreadsheet macro language—ANTLR v4 and this book will demystify the process. ANTLR v4 has been rewritten from scratch to make it easier than ever to build parsers and the language applications built on top. This completely rewritten new edition of the bestselling Definitive ANTLR Reference shows you how to take advantage of these new features.
9898

99-
You can buy the book [The Definitive ANTLR 4 Reference](http://amzn.com/1934356999) at amazon or an [electronic version at the publisher's site](https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference).
99+
You can buy the book [The Definitive ANTLR 4 Reference](http://amzn.com/dp/1934356999) at amazon or an [electronic version at the publisher's site](https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference).
100100

101101
You will find the [Book source code](http://pragprog.com/titles/tpantlr2/source_code) useful.
102102

antlr4-maven-plugin/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.antlr</groupId>
1010
<artifactId>antlr4-master</artifactId>
11-
<version>4.13.2-SNAPSHOT</version>
11+
<version>4.13.3-SNAPSHOT</version>
1212
</parent>
1313
<artifactId>antlr4-maven-plugin</artifactId>
1414
<packaging>maven-plugin</packaging>

doc/cpp-target.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# C++
22

3-
The C++ target supports all platforms that can either run MS Visual Studio 2013 (or newer), XCode 7 (or newer) or CMake (C++11 required). All build tools can either create static or dynamic libraries, both as 64bit or 32bit arch. Additionally, XCode can create an iOS library. Also see [Antlr4 for C++ with CMake: A practical example](http://blorente.me/beyond-the-loop/Antlr-cpp-cmake/).
3+
The C++ target supports all platforms that can either run MS Visual Studio 2017 (or newer), XCode 7 (or newer) or CMake (C++17 required). All build tools can either create static or dynamic libraries, both as 64bit or 32bit arch. Additionally, XCode can create an iOS library. Also see [Antlr4 for C++ with CMake: A practical example](http://blorente.me/beyond-the-loop/Antlr-cpp-cmake/).
44

55
## How to create a C++ lexer or parser?
66
This is pretty much the same as creating a Java lexer or parser, except you need to specify the language target, for example:

doc/getting-started.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ That command creates `antlr4` and `antlr4-parse` executables that, if necessary,
1414

1515
```bash
1616
$ antlr4
17-
Downloading antlr4-4.13.1-complete.jar
17+
Downloading antlr4-4.13.2-complete.jar
1818
ANTLR tool needs Java to run; install Java JRE 11 yes/no (default yes)? y
1919
Installed Java in /Users/parrt/.jre/jdk-11.0.15+10-jre; remove that dir to uninstall
20-
ANTLR Parser Generator Version 4.13.1
20+
ANTLR Parser Generator Version 4.13.2
2121
-o ___ specify output directory where all output is generated
2222
-lib ___ specify location of grammars, tokens files
2323
...
@@ -130,7 +130,7 @@ ExprBaseListener.h ExprLexer.h ExprListener.h ExprParser.h
130130

131131
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.
132132

133-
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.1-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
133+
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.2-complete.jar, which has the tool and the runtime and any other support libraries (e.g., ANTLR v4 is written in v3).
134134

135135
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).
136136

@@ -140,38 +140,38 @@ If you are going to integrate ANTLR into your existing build system using mvn, a
140140
1. Download
141141
```
142142
$ cd /usr/local/lib
143-
$ curl -O https://www.antlr.org/download/antlr-4.13.1-complete.jar
143+
$ curl -O https://www.antlr.org/download/antlr-4.13.2-complete.jar
144144
```
145145
Or just download in browser from website:
146146
[https://www.antlr.org/download.html](https://www.antlr.org/download.html)
147147
and put it somewhere rational like `/usr/local/lib`.
148148

149-
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.1 support jdk 1.8
149+
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.2 support jdk 1.8
150150

151-
2. Add `antlr-4.13.1-complete.jar` to your `CLASSPATH`:
151+
2. Add `antlr-4.13.2-complete.jar` to your `CLASSPATH`:
152152
```
153-
$ export CLASSPATH=".:/usr/local/lib/antlr-4.13.1-complete.jar:$CLASSPATH"
153+
$ export CLASSPATH=".:/usr/local/lib/antlr-4.13.2-complete.jar:$CLASSPATH"
154154
```
155155
It's also a good idea to put this in your `.bash_profile` or whatever your startup script is.
156156

157157
3. Create aliases for the ANTLR Tool, and `TestRig`.
158158
```
159-
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
160-
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
159+
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.2-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
160+
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.13.2-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
161161
```
162162

163163
### WINDOWS
164164

165165
(*Thanks to Graham Wideman*)
166166

167167
0. Install Java (version 1.7 or higher)
168-
1. Download antlr-4.13.1-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
168+
1. Download antlr-4.13.2-complete.jar (or whatever version) from [https://www.antlr.org/download.html](https://www.antlr.org/download.html)
169169
Save to your directory for 3rd party Java libraries, say `C:\Javalib`
170-
2. Add `antlr-4.13.1-complete.jar` to CLASSPATH, either:
170+
2. Add `antlr-4.13.2-complete.jar` to CLASSPATH, either:
171171
* Permanently: Using System Properties dialog > Environment variables > Create or append to `CLASSPATH` variable
172172
* Temporarily, at command line:
173173
```
174-
SET CLASSPATH=.;C:\Javalib\antlr-4.13.1-complete.jar;%CLASSPATH%
174+
SET CLASSPATH=.;C:\Javalib\antlr-4.13.2-complete.jar;%CLASSPATH%
175175
```
176176
3. Create short convenient commands for the ANTLR Tool, and TestRig, using batch files or doskey commands:
177177
* Batch files (in directory in system PATH) antlr4.bat and grun.bat
@@ -197,7 +197,7 @@ Either launch org.antlr.v4.Tool directly:
197197

198198
```
199199
$ java org.antlr.v4.Tool
200-
ANTLR Parser Generator Version 4.13.1
200+
ANTLR Parser Generator Version 4.13.2
201201
-o ___ specify output directory where all output is generated
202202
-lib ___ specify location of .tokens files
203203
...
@@ -206,8 +206,8 @@ ANTLR Parser Generator Version 4.13.1
206206
or use -jar option on java:
207207

208208
```
209-
$ java -jar /usr/local/lib/antlr-4.13.1-complete.jar
210-
ANTLR Parser Generator Version 4.13.1
209+
$ java -jar /usr/local/lib/antlr-4.13.2-complete.jar
210+
ANTLR Parser Generator Version 4.13.2
211211
-o ___ specify output directory where all output is generated
212212
-lib ___ specify location of .tokens files
213213
...

doc/go-target.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ golang.org/x/exp
9191
```
9292

9393
A complete list of releases can be found on [the release page](https://github.com/antlr/antlr4/releases). The Go
94-
runtime will be tagged using standard Go tags, so release 4.13.1 in the `antlr4-go/antlr` repo, will be tagged with
95-
`v4.13.1` and go get will pick that up from the ANTLR repo.
94+
runtime will be tagged using standard Go tags, so release 4.13.2 in the `antlr4-go/antlr` repo, will be tagged with
95+
`v4.13.2` and go get will pick that up from the ANTLR repo.
9696

9797
#### 3. Configuring `go generate` in your project
9898

@@ -108,7 +108,7 @@ place the ANTLR grammar files in their own package in your project structure. He
108108
├── myproject
109109
├── parser
110110
│ ├── mygrammar.g4
111-
│ ├── antlr-4.13.1-complete.jar
111+
│ ├── antlr-4.13.2-complete.jar
112112
│ ├── generate.go
113113
│ └── generate.sh
114114
├── parsing # Generated code goes here
@@ -133,7 +133,7 @@ And the `generate.sh` file will look similar to this:
133133
```shell
134134
#!/bin/sh
135135

136-
alias antlr4='java -Xmx500M -cp "./antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
136+
alias antlr4='java -Xmx500M -cp "./antlr-4.13.2-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
137137
antlr4 -Dlanguage=Go -no-visitor -package parsing *.g4
138138
```
139139

0 commit comments

Comments
 (0)