flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schmalle <apa...@teotigraphix.com>
Subject RE: [Falcon] Token stream recording
Date Wed, 06 Mar 2013 18:48:48 GMT

Quoting Gordon Smith <gosmith@adobe.com>:

> I don't think it would be hard to store the entire token stream that  
> produced a tree, but it sounds like you want to somehow keep track  
> of what tokens produced what node, which is more complicated and  
> probably overkill. We chose not to store tokens in order to minimize  
> memory.

I have another project that has to do with read-write AS AST, so I was  
asking if it's something I could add a flag, or something that code be  
turned on(the implementation) if a sub framework needed it.

> What information is missing in the tree that you need? The presence  
> of parens? If you need paren information in the tree, I would just  
> add a field like hasParens to BinaryOperatorNode. Or add  
> ParenthesizedExpressionNode.
> But why not just wrap parens around each binary operator expression  
> when you emit JS? Is that what FalconJS does?

I just did this today, I don't know how FalconJS does it since it uses  
the BURM I try to stay away. :)

There are some somethings like String concatenation that add extra  
logic and who knows what else will come up. I did fix it I feel 75%  
today though.


> - Gordon
> -----Original Message-----
> From: Michael Schmalle [mailto:apache@teotigraphix.com]
> Sent: Wednesday, March 06, 2013 7:43 AM
> To: dev@flex.apache.org
> Subject: [Falcon] Token stream recording
> Hi,
> Gordon this is aimed at you.
> Do you see any way or know of any way to allow the parser or some  
> type of strategy to record all tokens when parsing?
> Would you have any guidance on how to implement this if possible? Is  
> there any way to plug into the current repairing token stream to  
> save this out to a linked list like we talked about months ago?
> Mike
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com

Michael Schmalle - Teoti Graphix, LLC

View raw message