Automated Perl to Python translation?

Maurice LING mauriceling at acm.org
Tue Sep 7 05:43:52 EDT 2004


Stephen Ferg wrote:
> I need to translate some Perl scripts into Python.
> 
> When I went looking for a tool that would help automate the
> translation, I was rather surprised that I couldn't find anything. 
> BridgeKeeper, the only real candidate that I could find, is no longer
> available.  There are of course general-purpose parsing packages, but
> I'm looking for something target specifically to Perl-to-Python
> translation.
> 
> Since I couldn't find anything, I've started to write my own. 
> Preliminary results are good, but before I spend any more time on it I
> want to be really sure that I'm not re-inventing the wheel.
> 
> Does anybody know of any tools to automate (or assist) Perl to Python
> translation?

This is a great feat of worth I'll say. I remembered reading somewhere 
that Jython uses JavaCC, so perhaps looking in that direction can be of 
some help.

PLY is one of the pure python lex/yacc system I can find. There is also 
SPARK, but John Aycock had left the university. PLY is partially based 
on SPARK.

If this can be worked out, Perl/Python/Java combination is too powerful 
to imagine......

Maurice



More information about the Python-list mailing list