antlr/antlr3 — pull request #23 by Zannick (2012-06-27 06:48:31+00:00)
Title: ANTLR3 Python3.2 target

This is mostly a careful 2to3 of the current Python target, but with some additional code cleanup (mostly style-related). I've also added the option (but not the requirement) for the setTest rule in the grammar to take additional arguments, so that instead of a sequence of "LA1_0 == FOO or LA1_0 == BAR..." expressions, we can take advantage of Python3's set literals to do "LA1_0 in {FOO, BAR, ...}". This required a small change to CodeGenerator.java

I've also removed the dottreegen-related files since they required stringtemplate3 which required old antlr and I determined those were way beyond the scope of what a Python3 target actually needs.

The first commit in this sequence copies the files from the Python target with no changes, so you can consider all commits after that as changes to the Python target that result in a Python3 target.

Tested with the unittests and tests, and against my own ANTLR/Python project.