![]() | Antlr 3 and 4 |
|
08 Nov 2012, 14:42
Mads Nielsen (1 post) |
I’m quite eager to get started on this topic. However, I’m a bit confused regarding version 3 vs 4. I can’t find any information about version 4 on antlr.org. When is there a chance this will be released? I surely want to be able to experiment as I learn, so a book on a yet unreleased version is not too useful. On the other hand, there is no point in learning stuff about version 3 that has been made irrelevant by version 4. So, what should I really do in this case? |
|
11 Nov 2012, 10:54
Bernard Kaiflin (8 posts) |
As per November 10th 2012, v4 beta 3 is available. You can download antlr-4.0b3-complete.jar here : http://www.antlr.org/download or, at least on OS X, the installation is very easy : 1) download
The book says : On UNIX, /usr/local/lib is a good directory to store jars like ANTLR’s. On Windows, there doesn’t seem to be a standard directory so you can simply store it in our project directory. 2) define the CLASSPATH environment variable
3) check the installation You should see : ANTLR Parser Generator Version 4.0b3 4) define aliases
5) write a grammar, file extension .g4 (this is code/install/Hello.g4 from the book’s code)
6) “compile” the grammar
7) compile the generated lexer and parser
8) execute
You should see :
HTH |
|
10 Nov 2012, 21:07
Terence Parr (33 posts) |
4.0 will be out certainly by Christmas. |
| You must be logged in to comment |

