This seems like a good goal for the new ANTLR tree rewrite mechanism.
Given the problem of converting a "whatever the java.g author thought
was reasonable" AST to a "exactly what javac needs" AST, if the
rewrite mechanism can make this easier than just "doing it by hand", then
it will be a "good" mechanism, and not just a toy.

Having said that, it looks to me like none of the tree rewrite software
(e.g. TXL) out there are "good". In other words, they don't look to me like they
are saving anybody any work, even for this typical use case.

I'm sure Terence could use ANTLR treewalkers to do this pretty quickly,
but I wonder if Jiang could, too.

Yang Jiang wrote:
> Yeah, that is the reason.
> The javac tree is more than just nodes, it also has info like position, 
> javadoc and line maps etc..
> It would be pretty easy to simply use the Antlr tree rewrite to build a 
> tree, but not that easy if
> the tree structure/specification has already been defined.

When is the tree structure that you need to produce NOT already defined?

> 
> Yang

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to