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

Gary Evans evansgr_99 at hotmail.com
Fri Jul 1 13:22:43 PDT 2005


Chris,

I see what you mean.  There are files in the java source for the "main" 
program called CSharpCodeGenerator.java, PythonCodeGenerator.java, etc.  I 
need to modify one of those to create PerlCodeGenerator and then with a few 
modifications elsewhere in the program, it should spit out a Perl parser.

Then, I would have to translate antlr.py into a Perl module so the runtime 
would be used with the parser.

Hmm... I guess I will have to study up on Java for a while.  But thank you 
very much for your advice - you have given me hope again!

gevans

>From: Chris Black <chris at lotuscat.com>
>To: Gary Evans <evansgr_99 at hotmail.com>
>CC: open.zone at virgin.net, antlr-interest at antlr.org
>Subject: Re: [antlr-interest] Newbie Question - does antlr.py work?
>Date: Fri, 01 Jul 2005 12:43:35 -0500
>
>Gary Evans wrote:
>
>>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
>
>I think the idea here is that the core language of ANTLR (the part that 
>reads .g files and generates code) does not need to be ported to the target 
>language. If you wanted to get antlr to create parsers that work on parrot, 
>I believe you would just write a new code generator (in Java) that output 
>Parrot/Perl6 code. There would also need to be a support library written in 
>Parrot/Perl6 to use those generated parsers.
>
>Chris




More information about the antlr-interest mailing list