At 00:06 2/07/2009, jared.bunt...@peachjean.com wrote:
 >It's been awhile since I've written grammars, but what about:
 >
 >code: (proc | func)*
 >  -> ^(CODE ^(PROCS proc*) ^(FUNCS func*))
 >
 >I seem to recall that this works fairly well...

And if it doesn't, you can try the more explicit variant:

code : (p+=proc | f+=func)*
   -> ^(CODE ^(PROCS $p*) ^(FUNCS $f*))
   ;

(Or leave out the PROCS/FUNCS nodes if you just want to reorder 
the procedures/functions without actually grouping them in a 
subtree.)


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/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 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to