As best I understand your questions, the answers are no, no, and no . . .

Given an input "PAB", your given parser will construct an AST  ^( ^( 
PARENT A ) B ) and your given tree grammar will likewise match that.

If you somehow feed the tree grammar an AST ^( PARENT A B) or ^( PARENT 
B ), the rule will fail - both structure and content of the AST must 
match for the tree rule to match.

------ Original Message (Wednesday, August 04, 2010 3:41:21 
PM) From: Junkman ------
Subject: Re: [antlr-interest] Tree parser eats up DOWN node when navigating
optional child node
> Thanks for the replies, Jim&  Gerald.
>
> Your responses and some more testing suggests the following to me:
>
> 1. I cannot nest a tree parser rule ("inner rule") in another rule
> ("outer rule"), and try to have the outer rule match additional nodes in
> the subtree matched by the inner rule.
>
> 2. Consequently, the set of trees generated by rewrite expression does
> not necessarily match the set of trees matched by the same rewrite
> expression in the tree parser.
>
> Am I in the ballpark here?
>
> Jay
>

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