On Sun, 2013-09-08 at 14:22 +0800, Tal Liron wrote: > After some thinking, I want to make this suggestion: Jamie, or anyone > else, would it be possible to write a tool to translate Genie files to > Vala? I imagine this would not be too hard with the current Genie parser > code. This would allow those of us who invested a lot in Genie an easy > transition into the mainline. We would just say that Genie was a brave, > terrific experiment that ultimately failed.
It wouldn't be extremely difficult to generate working Vala code. The existing valac --dump-tree=foo.vala functionality is not very far away. However, even if that was fixed to produce working Vala code, the generated code wouldn't be ideal: everything in a single source file, no code comments, lower level looping constructs and conditionals, extra temporary variables, and maybe more. I agree with Luca that it would be easier to improve the Genie parser. It's written in Vala but it's not very difficult to make changes as it's a handwritten parser. Copying a syntactic element from Vala may sometimes be as simple as copying a method from valaparser.vala to valagenieparser.vala. The Vala parser is not being modified frequently these days (two commits this year so far), so it wouldn't require a big effort to stay in sync. If you'd like to continue using Genie, I'd suggest to consider working a bit on the Genie parser yourself. Regards, Jürg _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list