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

Bernardo Elayda belayda at gmail.com
Sat Jan 22 12:45:26 PST 2011


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


More information about the antlr-interest mailing list