At 22:57 25/10/2008, Simon wrote:
 >Is it so obvious? Or is it simply not possible to achieve
the same thing using rewrite rules?

It is possible, and it's not quite so obvious (though it has been 
mentioned a few times in the archives).  But messages sometimes 
slip through the cracks :)

 >> ^('.' ^('.' 'a' 'b') 'c')
[...]
 >> expr
 >>     :       primary ('.'^ ID )*
 >>     ;
[...]
 >> However, I can't get the same tree using tree rewrite
 >> rules. Is it possible at all? If so, could somebody
 >> please show me how?

expr
   :  (primary -> primary)
      ('.' ID -> ^('.' $expr ID))*
   ;


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

Reply via email to