[antlr-interest] Newbie Question - does antlr.py work?
open.zone at virgin.net
Thu Jun 30 19:54:37 PDT 2005
> I used a .msi file to install a binary on my system. In the
> lib directory
> is a file called antlr.py, which looks like it should be the
> program. But I
> cannot seem to use it. Can I create my parser files using:
> >>>python antlr.py test.g
> ...which should spit out the parser, lexer, etc.?
No. The ANTLR tool that generates lexers/parsers/treeparsers from a grammar
file is written in Java. AFAICT, it has not been re-implemented in Python
(nor does it need to be).
You will either need to install java or, obtain and use one of the many
binary versions of the ANTLR tool that run without java like cantlr (created
with gcj I believe) or the .NET version created with MS J#.
These should be available on the website somewhere.
> If this is not possible, then what exactly is the purpose of the file
I'm guessing it's part of the runtime support library needed for ANTLR
lexers/parsers/treeparser written in python.
More information about the antlr-interest