At 02:10 17/07/2009, Benoit Fouletier wrote:
>(VAR ID -> VAR ID)
>(
>ASSIGN INT
>->COLON TYPE["int"] ASSIGN INT
>|ASSIGN StringValue
>->COLON TYPE["string"] ASSIGN StringValue
>)
>
>Do I have the syntax wrong, or are partial rewrites simply not 
>possible?

A rewrite always sets the output of the entire rule.  You cannot 
use it for only part of the rule.  This is important for iterative 
rules which need to build up a nested chain of nodes.

(A workaround is to move the bit that you want to do a partial 
rewrite for into a subrule.)


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 il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to