2008/12/1 Terence Parr <[EMAIL PROTECTED]>:
>
> On Nov 30, 2008, at 11:15 PM, Gavin Lambert wrote:
>>
>> And then of course there's Oliver's example, where he just wanted to
>> traverse the (sub)tree regardless of structure (presumably to pretty-print
>> it or something).
>
> If you don't care about structure, one could argue why you're using a
> grammar to do that ;)

Maybe you care about structure, but only in certain sections of the
tree and still want to touch every single node of the tree (which
makes this different from the new cool partial tree matching in 3.2)

treee
       : ^(ID treee*)  { do something very different with $ID here and
maybe also something with the children}
       | ^(a=. treee* ) { do something meaningful with $a here }
       ;

Does that make sense?

Oliver

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