All,

I've noticed that when I write a Java action in an ANTLR grammar that 
contains a modulus operator ('%'), I have to escape that operator.  It 
appears to have to do with StringTemplate and the like, but this is the 
case even when I don't have output=template.

So does StringTemplate have some additional behavior in ANTLR?  Is it 
possible for me to use StringTemplate as a sort of macro language over 
the ANTLR grammar in order to template rules I create on a regular 
basis?  More importantly, could I do this without writing any extra 
tooling or having escapes scattered all over my grammar?  I read through 
The Definitive ANTLR Reference, but it simply discusses using ANTLR to 
produce string templates.  If this is not possible, then why does ANTLR 
process my grammar actions in such a way that I have to escape the %?

Thanks,

Zachary Palmer

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