[antlr-interest] [V3] '%' in java code obtains unexpected StringTemplate error

Kay Roepke kroepke at classdump.org
Fri Aug 11 19:37:04 PDT 2006


Hi John!

On 12. Aug 2006, at 4:31 Uhr, John B. Brodie wrote:

> Workaround: Replacing each occurrence of '%' above with '\%' fixes the
> problem. No messages from the tool and javac 1.5 compiles/runs no
> problem.

NOTABUG ;)

The %'s are inside of actions and ANTLR doesn't interpret custom  
actions.
It cannot know that the '%' is in a string and should be left alone.  
This is
expected behavior, special characters must be escaped properly.

cheers,

-k
-- 
Kay Röpke <kroepke at classdump.org>
classdump Software




More information about the antlr-interest mailing list