Leveraging PyPy to translate/compile into other scripting languages?
Hi, 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? Thanks, James
participants (1)
-
James Masters