Quoting Alex Harui <aha...@adobe.com>:




On 1/18/13 4:21 AM, "Michael Schmalle" <apa...@teotigraphix.com> wrote:

No, the Falcon compiler turns MXML AST into straight ABC instructions.

This is why Alex had to do majic with the
MXMLClassDirectiveProccessor. So right now, there is no working
translation of MXML into a Class file.

Also this has been brought up between Alex and Gordon that doing a
straight conversion is not a good plan. There needs to be an
intermediate "model" that can hold the MXML data structure AFTER the
AST. (I guess)
I don't think that there needs to be an intermediate model.  The main reason
for going from MXML to ABC was speed.  One of the things Falcon will not
support is a true -keep-generated-actionscript option.  That's one of the
reasons I am trying to alter MXML output so it generates more data and less
code so your need to see the output as AS is greatly reduced.

Either do I, the way I see it is we traverse the MXML AST. I just have to look at what you have done to know what "state" needs to be saved as we are walking the MXML AST.

If you look at the MXMLFileNode, it has everything wee need and the MXMLTreeBuilder does all the work as far as I can see.

I think I was getting confused as to what you and Gordon were talking about.


This would mean using the model to traverse and emit, not the AST.
Again, I am a very opinionated person and when I start to think about
MXML and how to translate it, I will come up with what I think works
using whatever means that requires, whether it's traversing the AST or
creating and intermediate model.

I may be missing something, but I think the MXMLClassDirectiveProcessor is
walking the AST not some intermediate model.  What it does is a bit tricky
because it is trying to flatten the tree into the data array and use the
same APIs (of passing around Contexts).  I haven't looked at your walker
recently, but it might be simpler to implement in the walker/visitor
pattern.

I am almost certain the walker/visitor will work just fine, this is prompting me to test a prototype. It's bugging me not knowing the full story, I have to setup a test and see what you did and mimic it, then we will have the exact answer.

Looks like I know what I am doing for the next 5 hours today, I said I wouldn't but its bothering me to much. :)

Mike


-
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui



--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to