[antlr-interest] control of whitespace in generated code

Ric Klaren ric.klaren at gmail.com
Tue Jun 7 04:02:59 PDT 2005


On 6/7/05, Stefan Rank <e9725431 at student.tuwien.ac.at> wrote:
> is there a way to change antlr's generation of whitespace?

Change the codegenerator ;)

> - how does it decide what line ending character(s) to use in the
> generated files?

Not 100% sure but think it depends on java's behaviour for the
platform for that.

> - can it be told to use spaces for indentation instead of tabs?

Nope, not without code changes.

In antlr3 you could probably tinker with some of the codegeneration
templates to get something more to your liking. With antlr2 you'd
probably be better of sticking to a postprocessor.

Cheers,

Ric


More information about the antlr-interest mailing list