[antlr-interest] Can I get automatic line wrapping when using ST from ANTLR?
siemsen at ucar.edu
siemsen at ucar.edu
Thu Apr 17 12:27:44 PDT 2008
I have a grammar that outputs Java, including javadoc. I output
javadoc-style paragraphs by breaking strings into lines and handing
the resulting ArrayList to StringTemplate via rewrite rules. In the
ST template, I use separator="\n * ". This works fine.
Today I stumbled across the description of automatic line wrapping
built into ST at
http://www.antlr.org/wiki/display/ST/Automatic+line+wrapping
It looks good, but to use it you feed the line width to toString().
I'm using ANTLR's neat interface to ST with rewrite rules, hence I
don't have access to the toString() method.
Is there a way to use access ST's automatic line wrapping via ANTLR's
interface to ST?
-- Pete
More information about the antlr-interest
mailing list