On 01/24/2011 05:34 PM, Mark Knecht wrote:
> Hello,
>    I'm wondering if there are any generic sorts of code translation
> tools in portage wherein I could translate from an 'uncommon' language
> no one here is likely to use (EasyLanguage) into C?
> 
>    As an example I've attached a little EL function that takes
> buy/sell command data an puts it away in an array for safe keeping.
> What tools are out there, if any, that might allow me to describe how
> EL works and then the tool does the conversion?

Since no one else has given you the bad news, this is basically
impossible if you care that the two programs behave the same.

For any particular program, the best you can do is rewrite it by hand
after creating a battery of unit tests. The alternative is to compile
your source language to a common low-level language, and then decompile
back to your target language.

Unfortunately, unless your common low-level language is some sort of
bytecode with additional metadata (you can translate between .NET
languages for example), the output from the decompiler is going to look
like garbage.

Reply via email to