[antlr-interest] control of whitespace in generated code
Andy Tripp
atripp at comcast.net
Thu Jun 9 11:12:04 PDT 2005
>
>
>hi
>
>is there a way to change antlr's generation of whitespace?
>
>- how does it decide what line ending character(s) to use in the
>generated files?
>
>- can it be told to use spaces for indentation instead of tabs?
>
>of course that's easy to do by post-processing, but it would be nice to
>have these simple 'personal-taste' options.
>
>
My JavaEmitter class takes a Java AST and prints it as normal-looking,
properly-indented code.
It includes a IndentingPrintStream class, where you can call
setIndentString(String s) to specify
whatever indenting string you want (one tab, four spaces, or whatever).
It's under the File Sharing section of antlr.org
>thanks for a great tool
>
More information about the antlr-interest
mailing list