At 11:47 27/11/2008, Sam Harwell wrote: >Note that when w.ChildIndex == 0 and its next sibling is EOA, it
>means the . is the child of a closure such as .* , since the other >possibility ^(.) is not allowed in a tree parser. Why would "^(.)" not be allowed? That should simply match any node with no children. I don't think there's any other syntax that could express that particular condition (barring a semantic predicate of course), as the equivalent 3.0 construct (simply ".") now represents any node with any number of children. I'm not sure it's an especially *useful* construct, but it ought to be supported for consistency at least. In other words (in vaguely ANTLR-like syntax): wildtree : ANYNODE | ^(ANYNODE wildtree*) ; . => wild ^(.) => ANYNODE ^(. FOO) => ^(ANYNODE FOO) ^(FOO .) => ^(FOO wildtree) ^(FOO . .) => ^(FOO wildtree wildtree) ^(FOO .+) => ^(FOO wildtree+) ^(FOO .*) => ^(FOO wildtree*) To put it another way, given a single node FOO, all of the following should be able to match it: FOO ^(FOO) ^(FOO BAR?) ^(FOO xyz*) . ^(.) ^(. BAR?) ^(. xyz*) 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 -~----------~----~----~----~------~----~------~--~---
