[stringtemplate-interest] Wrapping and expression for fixed right edge

Scott Waye scott.waye at hubse.com
Mon Nov 16 12:50:53 PST 2009


Brain, Jim wrote:
> I'm new here as well, but I thought I saw something that is built-in:
>
> http://www.antlr.org/wiki/display/ST/Automatic+line+wrapping
>
> Maybe this will work?
>
> Jim
>   
 From what I understand on that page, and my experiments, it will not 
wrap _within_ an expression.
> --
> Jim Brain, AFP Architecture, 319-355-2070
> -----Original Message-----
> From: stringtemplate-interest-bounces at antlr.org [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Scott Waye
> Sent: Monday, November 16, 2009 2:36 PM
> To: stringtemplate-interest at antlr.org
> Subject: [stringtemplate-interest] Wrapping and expression for fixed right edge
>
> Hi,
>
> First post so I may be on the wrong track.  I want to create a template 
> which ultimately will output to telex, amazingly some industries still 
> use them.  Telexes have a fixed width, anything over that width may be 
> lost, so I need to wrap.  I have attributes which will be long, 100s of 
> words, so I want to wrap them.
>
> I'm thinking that an Output Filter is the way to go, probably something 
> based on the AutoIndentWriter.  I've subclassed this and I think I can 
> do something in the Write(string str, string wrap) method.  There will 
> not be any tabs so I don't have to worry about those.  I guess I can 
> reflect to get the current indents and _charPosition, but it would be 
> nice if they were protected not private. 
>
> Or am I mad and there is a more obvious way?
>
> --
> Scott
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>
>
>   



More information about the stringtemplate-interest mailing list