[antlr-interest] Python3 target

Benjamin Niemann pink at odahoda.de
Tue May 19 10:51:51 PDT 2009


Hi Murat,

On Tue, May 19, 2009 at 6:00 PM, Murat Knecht
<murat.knecht at student.hpi.uni-potsdam.de> wrote:
> I just tried the native Python target with ANTLR3 and stumbled upon
> problems using the generated parser in Python v3.
> The documentation says that the current version supports v2.4 and 2.5.
> Are there any plans to produce a Python3 compatible target or is one
> already being made?
>
> So far, it seems the problems are rather minor, e.g. using old unicode
> u'blub' strings, which are not allowed in Python anymore. I could
> probably just hack the python target, but then an in-house solution
> clearly is nicer and better maintainable.

I thought about it, but no action taken yet. To keep the
maintainability high, this probably needs some tweaks in the codegen
code (e.g. allow 'subclassing' of targets, if implemented as a
separate target).

Have you tried using the 2to3 tool on the generated code/runtime module?

-Ben

> Sorry, if this has been asked before. Googling python3 and antlr usually
> results in something about antlr3 (Google is trying just too hard.)
>
> Best regards,
> Murat
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list