At 09:29 1/12/2008, Terence Parr wrote: >not sure. I guess i left out as it's weird. When would you write: > >^(. ID). It's always the root that says what kind of thing it is, > >right?
This is a completely fabricated example, but your tree structure might dictate that at that position you know it's either a ^(ORDER1FN ID) or a ^(ORDER2FN ID) or a ^(ORDER3FN ID). In one tree grammar you care about the distinction, while in another you don't. Of course you could just write ^((ORDER1FN | ORDER2FN | ORDER3FN) ID), but if you know that there will never be any other possibilities then it's simpler to just write ^(. ID), especially as the number of variations increases. 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). They might be unusual cases, admittedly, but they seem reasonable. 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 -~----------~----~----~----~------~----~------~--~---
