[antlr-interest] Can the Java Static.format be used in an Antlr 3.3 action?

Terence Parr parrt at cs.usfca.edu
Sat Jan 22 12:59:04 PST 2011

Try \%.I think that should work
On Jan 22, 2011, at 12:45 PM, Bernardo Elayda wrote:

> Hi,
> I have some Java code I need to place in actions in my Antlr 3.3 grammar.
> But, this Java code uses the Java String.format method which uses the
> '%' character.
> When I build my grammar, Antlr complains that it thinks '%' is in use
> with an incorrect usage of StringTemplate.  There is no use of
> StringTemplate in my grammar.
> Is my only workaround to replace all the String.format instances?
> tia,
> bernardo
> 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