B
B
baalmor2013-07-02 12:37:54
C++ / C#
baalmor, 2013-07-02 12:37:54

Translation from AS3 to C/C++?

Hello everyone,
I have a code base written in AS3.
There was a need to translate this code into C/C++.
My reasoning is that both languages ​​are strongly typed and have a roughly similar set of base types. They have relatively similar syntax.
Is there a script, application, something else to translate as3 code to C/C++ code? I mean only syntactic transfer and I perfectly understand that the code obtained in this way will not work without editing it by hand. But it would make things a lot easier for me.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AxisPod, 2013-07-02
@AxisPod

I don't think it would make things much easier. With a high degree of probability, you will get something that will work with elusive bugs, you will spend a lot of time catching these bugs. In general, I do not believe in the profit from such a script.

C
COOL_ALMANAH, 2013-07-02
@COOL_ALMANAH

Tell me, what is it for? (I myself am a Flash developer with quite a lot of experience, now I'm trying to master C #)
It's just that Flash code in about 80% of cases will be tied to the AS3 API (well, or AS2, if you write on it). The visualization methods on different platforms are different (it’s not even a matter of the language), and the specific classes are also different (let’s say AS3 has ByteArray, I’m not sure if there are analogues in other languages ​​​​that will fully support the API of this class).
I see the point in such things, only for very small, highly specialized developments (for example, working with strings, numbers, angles, geometry, etc.) Most likely, these things will be approximately the same almost everywhere (maximum, Number will need to be converted to double/float).

R
rwx64, 2013-07-02
@rwx64

I don't think there are parsers capable of presenting the code in a readable way. Most likely you will have to parse the unformatted code, and this is already much more difficult than rewriting it again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question