Hi gang,

Here's a question for you.  (Apologies if this is explained somewhere; I 
haven't found it yet.)  Suppose I have a language where I have procedures and 
functions (Oh! Pascal!), such as this:

    procedure a() { ... }
    function x() { ... }
    procedure b() { ... }
    
function y() { ... }
    
procedure c() { ... }
    
function z() { ... }


Now suppose, when I'm emitting the final representation, I want to group the 
procs and funcs together--I'm thinking I should somehow rewrite the tree to get 
it looking like this simplified version:

    ^( CODE ^( PROCS a b c ) ^( FUNCS x y z ) )

Is there a clever way, in tree-rewriting syntax, to attach a subtree as a child 
of a completely unrelated node?

Thanks,
Stephen


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

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

Reply via email to