Re: [Vala] Rv: C to Vala
- From: "Gilzad Hamuni" <gilli4 gmx net>
- To: vala-list gnome org
- Subject: Re: [Vala] Rv: C to Vala
- Date: Fri, 21 Sep 2012 17:33:38 +0200
If I understand correctly, that approach requires an intermediate bytecode either from Java or from .NET to
finally create sourcecode.
Alas, in the OP's case the best we can get would be native machine code (being different for x64, i386, arm,
etc) so the parser wouldn't be able to stick to one static 'syntax', even if it would support Vala as an
output.
I'm guessing here, but: If it's possible to automatically generate vapi's out of g-object-based libraries,
then a similar tool might be able to create vala-code out of g-object-based sourcecode. But I'm really just
guessing here, not knowing anything about the effort behind it.
At least the need for such a tool (that turns C-code into Vala just before C-code is generated again) proves
that vala is a favourable language :)
Interesting though that XMLVM can create Objective-C-code.
Gilzad
-------- Original-Nachricht --------
Datum: Thu, 20 Sep 2012 12:09:39 -0700
Von: Eric Gregory <eric yorba org>
An: Mario Daniel Ruiz Saavedra <desiderantes rocketmail com>
CC: Vala List <vala-list gnome org>
Betreff: Re: [Vala] Rv: C to Vala
On Thu, Sep 20, 2012 at 12:01 PM, Mario Daniel Ruiz Saavedra <
desiderantes rocketmail com> wrote:
Unlikely. You are confusing translate with transform. Please argue
properly.
He's right though -- the relationship between C and Vala is not 1:1 unless
the C code was generated by valac. Converting arbitrary C code into Vala
is possible, but unwieldy.
A professor from my college days did a project that converts between
various languages. It's quite complex, but amazingly all the conversion
is
done in XSLT. I'd recommend checking it out to see what kind of territory
you're wading into here: http://xmlvm.org
- Eric
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]