[pypy-dev] Leveraging PyPy to translate/compile into other scripting languages?

James Masters james.d.masters at gmail.com
Mon May 6 20:28:43 CEST 2013


I have a need to translate Python code into source code in other scripting
languages - some open and others proprietary.  The scope of the problem
space is very narrow... essentially the need is to define/lookup variables,
perform arithmetic operations, define/call functions, etc. but nothing
complex like regular expression handling or even opening a file.  Some of
the target languages are dynamically typed and others are statically typed,
so some level of type awareness is needed (preferably through inference).

I currently have a partial implementation which uses the Python AST module
and some string templating to express the AST nodes in the other
languages.  I am about to move on to building a symbol table capability and
tackle type inference.  Before I head too far down this road, I keep
thinking back to PyPy and RPython and wondering if I could use portions of
this work to help me accomplish what I'm trying to do.  Any comments?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130506/bd004589/attachment.html>

More information about the pypy-dev mailing list