forked from jasder/antlr
Merge pull request #2904 from Khalian/patch-1
Update getting started guide to use antlr4.8
This commit is contained in:
commit
1ab7a8688c
|
@ -261,6 +261,7 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/07/01, sha-N, Shan M Mathews, admin@bluestarqatar.com
|
||||
2020/08/22, stevenjohnstone, Steven Johnstone, steven.james.johnstone@gmail.com
|
||||
2020/09/06, ArthurSonzogni, Sonzogni Arthur, arthursonzogni@gmail.com
|
||||
2020/09/10, Khailian, Arunav Sanyal, arunav.sanyal91@gmail.com
|
||||
2020/09/12, Clcanny, Charles Ruan, a837940593@gmail.com
|
||||
2020/09/15, rmcgregor1990, Robert McGregor, rmcgregor1990@gmail.com
|
||||
2020/09/16, trenki2, Markus Trenkwalder, trenki2[at]gmx[dot]net
|
||||
|
@ -268,4 +269,4 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/10/16, adarshbhat, Adarsh Bhat, adarshbhat@users.noreply.github.com
|
||||
2020/10/20, adamwojs, Adam Wójs, adam[at]wojs.pl
|
||||
2020/10/24, cliid, Jiwu Jang, jiwujang@naver.com
|
||||
2020/11/05, MichelHartmann, Michel Hartmann, MichelHartmann@users.noreply.github.com
|
||||
2020/11/05, MichelHartmann, Michel Hartmann, MichelHartmann@users.noreply.github.com
|
|
@ -16,22 +16,22 @@ 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.7.1-complete.jar
|
||||
$ curl -O https://www.antlr.org/download/antlr-4.8-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`.
|
||||
|
||||
2. Add `antlr-4.7.1-complete.jar` to your `CLASSPATH`:
|
||||
2. Add `antlr-4.8-complete.jar` to your `CLASSPATH`:
|
||||
```
|
||||
$ export CLASSPATH=".:/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH"
|
||||
$ export CLASSPATH=".:/usr/local/lib/antlr-4.8-complete.jar.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.7.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
|
||||
$ alias antlr4='java -Xmx500M -cp "/usr/local/lib/antlr-4.8-complete.jar.jar:$CLASSPATH" org.antlr.v4.Tool'
|
||||
$ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.8-complete.jar.jar:$CLASSPATH" org.antlr.v4.gui.TestRig'
|
||||
```
|
||||
|
||||
### WINDOWS
|
||||
|
@ -39,13 +39,13 @@ $ alias grun='java -Xmx500M -cp "/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSP
|
|||
(*Thanks to Graham Wideman*)
|
||||
|
||||
0. Install Java (version 1.6 or higher)
|
||||
1. Download antlr-4.7.1-complete.jar (or whatever version) from [https://www.antlr.org/download/](https://www.antlr.org/download/)
|
||||
1. Download antlr-4.8-complete.jar (or whatever version) from [https://www.antlr.org/download/](https://www.antlr.org/download/)
|
||||
Save to your directory for 3rd party Java libraries, say `C:\Javalib`
|
||||
2. Add `antlr-4.7.1-complete.jar` to CLASSPATH, either:
|
||||
2. Add `antlr-4.8-complete.jar.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.7.1-complete.jar;%CLASSPATH%
|
||||
SET CLASSPATH=.;C:\Javalib\antlr-4.8-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
|
||||
|
@ -71,7 +71,7 @@ Either launch org.antlr.v4.Tool directly:
|
|||
|
||||
```
|
||||
$ java org.antlr.v4.Tool
|
||||
ANTLR Parser Generator Version 4.7.1
|
||||
ANTLR Parser Generator Version 4.8
|
||||
-o ___ specify output directory where all output is generated
|
||||
-lib ___ specify location of .tokens files
|
||||
...
|
||||
|
@ -80,8 +80,8 @@ ANTLR Parser Generator Version 4.7.1
|
|||
or use -jar option on java:
|
||||
|
||||
```
|
||||
$ java -jar /usr/local/lib/antlr-4.7.1-complete.jar
|
||||
ANTLR Parser Generator Version 4.7.1
|
||||
$ java -jar /usr/local/lib/antlr-4.8-complete.jar
|
||||
ANTLR Parser Generator Version 4.8
|
||||
-o ___ specify output directory where all output is generated
|
||||
-lib ___ specify location of .tokens files
|
||||
...
|
||||
|
|
Loading…
Reference in New Issue