[stringtemplate-interest] leading/trailing whitespace trimmed
Terence Parr
parrt at cs.usfca.edu
Wed Apr 16 10:23:40 PDT 2008
On Apr 16, 2008, at 7:07 AM, brian wrote:
> On Wed, Apr 9, 2008 at 2:01 AM, Terence Parr <parrt at cs.usfca.edu>
> wrote:
>>
>> On Apr 8, 2008, at 2:58 AM, brian wrote:
>>
>>> I think org.antlr.stringtemplate.StringTemplate(java.lang.String
>>> template) is trimming leading and trailing whitespace. Is it? Should
>>> it? I see a note about ST doing that for file input, but why to
>>> Strings?
>>>
>>
>> Hi. It does it for all templates even those specified with "...".
>> Easier
>> to add whitespace later than to get rid of whitespace.
>
> OK. But it'd be nice if there were a "I really mean for you to use
> this exact template, don't mess with it" flag. In fact, I really think
> producing what I told it to produce should be the default, and
> automatic whitespace removal should be an option. Thanks.
unix tends to force text files to end in \n as far as I can
remember...makes it hard to deal with it. Lots of tools add
whitespace you don't want.
Ter
More information about the stringtemplate-interest
mailing list