From: Michael Orlitzky <michael@orlitzky.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [OT] - Code translation tools?
Date: Tue, 25 Jan 2011 20:15:16 -0500 [thread overview]
Message-ID: <4D3F75A4.7070100@orlitzky.com> (raw)
In-Reply-To: <AANLkTikZWkqv4WjNKXESHufkS_MB7F3_UHPio5kETrP8@mail.gmail.com>
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.
next prev parent reply other threads:[~2011-01-26 1:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 22:34 [gentoo-user] [OT] - Code translation tools? Mark Knecht
2011-01-25 0:35 ` [gentoo-user] " walt
2011-01-25 1:15 ` Mark Knecht
2011-01-26 1:15 ` Michael Orlitzky [this message]
2011-01-26 17:56 ` [gentoo-user] " Mark Knecht
2011-01-26 18:47 ` Michael Orlitzky
2011-01-26 19:40 ` Mark Knecht
2011-01-26 20:32 ` Michael Orlitzky
2011-01-26 21:54 ` Mark Knecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D3F75A4.7070100@orlitzky.com \
--to=michael@orlitzky.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox