Automated Perl to Python translation?

S

Stephen Ferg

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?
 
Y

yaipa h.

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?

don't know but there is a book out.
Perl to Python Migration
by Martin C. Brown

Cheers.
 
M

Michael Foord

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?

My goodness - sounds like quite a project. Now if you could make it
two way that would be really interesting...

Cool.

Fuzzy

http://www.voidspace.org.uk/atlantibots/pythonutils.html
 
M

Maurice LING

Stephen said:
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
 
G

gabriele renzi

Maurice LING ha scritto:

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

I think you'd be happy with parrot or .net ;)
 
J

John J. Lee

Stephen Ferg wrote:
[...]
Does anybody know of any tools to automate (or assist) Perl to Python
translation?

Perl has a notoriously hairy lexical structure. Maybe the parsing
isn't much fun either. The "only perl can parse Perl" quote (Larry
Wall?) springs to mind. Given that, and working on the assumption
you're sufficiently insane to go through with this project <wink>, I
guess you'd definitely want to do precisely that: use perl to parse
the Perl code.

Bon chance.

[...]
Maurice LING said:
If this can be worked out, Perl/Python/Java combination is too
powerful to imagine......

:-( I don't think that's a reason for wanting a translator. If you
just want to call Python from Perl, or call Perl from Python, I guess
you'd use pyperl (though I don't know if it's actively maintained).


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top