[antlr-interest] Newbie Question - does antlr.py work?

Gary Evans evansgr_99 at hotmail.com
Fri Jul 1 10:38:42 PDT 2005


Thanks for the response - I think I finally understand.

The antlr.py contains functions and classes that are used by the parser that 
the binaries generate.  I need the binaries to create the parser, lexer, 
etc. and then I still need antlr.py to use them.

That's a bummer... my goal was to translate antlr to Perl6 so it could be 
used to write parsers that will work on Parrot.  I am pretty good at dealing 
with scripting languages, but I haven't learned Java well enough to 
translate it to anything...

Thanks again for taking to time to answer.

Regards,
gevans

>From: "Micheal J" <open.zone at virgin.net>
>To: <antlr-interest at antlr.org>
>Subject: RE: [antlr-interest] Newbie Question  - does antlr.py work?
>Date: Fri, 1 Jul 2005 03:54:37 +0100
>
>Gary,
>
><SNIP>
>
> > 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.
>
><SNIP>
>
> > If this is not possible, then what exactly is the purpose of the file
> > antlr.py?
>
>I'm guessing it's part of the runtime support library needed for ANTLR
>lexers/parsers/treeparser written in python.
>
>
>Cheers,
>
>Micheal
>




More information about the antlr-interest mailing list