[antlr-interest] python-lang parser to python target

Benjamin Niemann pink at odahoda.de
Sun Jul 20 01:33:32 PDT 2008


Hi Aaron,

there is a Python grammar in examples package. It's the 2.3 grammar,
but you may use parts of both to get a working Python2.5 grammar.
Please note that I haven't tested, if the python target of beta 2 is
fully operational, you may have to use b1 (which is tested and IIRC
there were no bugs reported for it), if you run into problems.

Ter: The download page says "ANTLR v3 sample grammars (C, C#, Java
targets). " Can you add ActionScript and Python? Thanks.

-Ben

On Sat, Jul 19, 2008 at 5:21 PM, Aaron Maxwell <amax at redsymbol.net> wrote:
> Hey all,
>
> Please disregard my question.  I realize I mainly need to have read to manuals
> more.  For the record, the mentioned python grammar is tailored to the Java
> target.  I'll work at converting it to the python target, which I believe is
> the right approach (someone please correct me if I'm mistaken).
>
> Aaron
>
> On Friday 18 July 2008 02:55:52 pm Aaron Maxwell wrote:
>> Hi all,
>>
>> I'm using antlr 3.1b2 to generate a python-language parser, using Frank
>> Wierzbicki's python 2.5 grammar [0].  I'm generating it to the Python
>> target. The lexer has some java code interspersed - for example, the
>> PythonLexer constructor sports this at the end:
>
>
>
> --
> Aaron Maxwell
> http://redsymbol.net
>


More information about the antlr-interest mailing list