Warning |
---|
Parsers generated for Python require the same version of the runtime as the ANTLR tool used. Right now the Python target is only functional up to v3.1.3, so you'll have to use that version of ANTLR and the runtime. The |
...
- Download the "Complete ANTLR 3.x Java binaries jar" from the ANTLR download page, extract it, and run the Python installer.
- On a Linux shell for version 3.3:
No Format wget http://www.antlr.org/download/antlr-3.1.3.tar.gz tar xzf antlr-3.1.3.tar.gz cd antlr-3.1.3/runtime/Python sudo python setup.py install
- On a Linux shell for version 3.3:
- Check your installation by using the Python shell:
No Format $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import antlr3 >>>
...