At 09:14 27/11/2008, Oliver Zeigermann wrote: >Too bad for me as I have this in a tree parser (rule is spelled >with 3xe on purpose): > >treee > : ^(. treee* ) > ; > >which will never come to see the "treee*" part as the first "." >matches the complete subtree making my analysis (code is left out >for clarity) defunct. > >Or am I missing something here (as usual).
I'm not sure how Ter ended up implementing it, but I don't think there should be any problem with what you have here. A wildcard in the 'root' position can only be a single node, because you can't have a subtree as a root. So the meaning of the above shouldn't have changed. Although incidentally, I would expect the above to fail to match if you have anything other than subtrees; ie. while it should match this: ^(FOO ^(BAR ^(BAZ)) ^(WIBBLE)) I would expect it to fail to match this: ^(FOO ^(BAR BAZ) WIBBLE) 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 il-antlr-interest@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---