Using synopsis to translate python source code to C/C++ or Java

"Tom Malcolmson" <[email protected]> Fri, 27 Mar 2009 10:35:50 -0400
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
Hi.

It appears to me that synopsis is able to parse Python and C++.  I see
formatters for producing documentation from the AST trees but I don't
see formatters for producing source code.  Do they exist?

I do understand that the ability to correctly interpret the Python types
is limited.  That's OK - I'm not expecting a runnable program as output,
just a starting point.

I saw that someone wrote a tool for translating Java to Python:
http://blog.melhase.net/articles/2007/02/15/automated-translation-of-java-to-python
but there is nothing for translating in the other direction.

I know that there is a tool for translating from Python to C++, but that
is focussed on producing an executable from a Python program.  It only
supports the limited subset of Python that it is able to perfectly
translate into a working C++ program.  What I'm imagining is a tool that
makes a rough pass at translating any Python source code into Java or
C++ source code.