[antlr-interest] error with modulo operator in tree grammar action
Robert Soule
robert.soule at gmail.com
Thu Jan 29 19:52:55 PST 2009
You need to escape the percent sign: \%
-Robert
On Thu, Jan 29, 2009 at 9:10 PM, Michael Bedward
<michael.bedward at gmail.com> wrote:
> Hello all,
>
> I search the list for this but only found a related bug report - no solution.
>
> I have a rule and associated action (java) in my tree grammar...
>
> expr: ^(MOD a=expr b=expr) {$value = a % b;}
>
> This provokes get an invalid string template error. I imagine there
> must be some simple option or similar that I'm missing (?)
>
> Michael
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list