------ Original Message (Wednesday, August 04, 2010 9:53:09 
AM) From: Junkman ------
Subject: Re: [antlr-interest] Tree parser eats up DOWN node when navigating
optional child node
>
>> parent: ^(parent_a B?) ;
>> parent_a: ^(PARENT A?) ;
>> --------------------------------------------
>

. . . is the same as

parent: ^( ^(PARENT A?) B? ) ;

which will not match ^(PARENT B), but will match ^( ^(PARENT) B).  BTW, 
a subtree match() will always properly consume the UP DOWN subtree 
delimiters.

You probably want

parent: ^(parent_a B?) ;
parent_a: PARENT A? ;

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 [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