[stringtemplate-interest] "".."" won't work

Terence Parr parrt at cs.usfca.edu
Tue Apr 5 09:31:50 PDT 2011


yeah it was hassle flipping << >> to <% %> in Java.stg templates, though I'd need to insert [..] or whatever just the same.  still open for debate :)
T
On Apr 5, 2011, at 5:03 AM, Udo Borkowski wrote:

> Following this thread makes me think if extending the syntax through new template delimiters ("", """, <% or whatsoever) is really a good idea. 
> 
> I assume we run into less problems (conflict with old syntax, escape issues etc.) with just sticking to the old ones ("…"  and <<…>>) and just add the optional "[…]" template prefix, as already suggested earlier.
> 
> t() ::= […]<<
> .
> .
> .
> >>
> 
> Udo
> 
> 
> 
> On 05.04.2011, at 06:15, Terence Parr wrote:
> 
>> oh right.  might work.
>> Ter
>> On Apr 4, 2011, at 8:06 PM, Sam Harwell wrote:
>> 
>>> If you chose % as your delimiter, it would still be fine. The template starts at <% and ends at %>.
>>>  
>>> <%%x%%>
>>>  
>>> Sam
>>>  
>>> From: Collin Fagan [mailto:collin.fagan at gmail.com] 
>>> Sent: Monday, April 04, 2011 9:29 PM
>>> To: Sam Harwell
>>> Cc: Terence Parr; stringtemplate-interest List
>>> Subject: Re: [stringtemplate-interest] "".."" won't work
>>>  
>>> I have no problem with <%...%> but that eliminates one character available as a valid delimiters right?
>>> 
>>> I can't set the starting and ending delimiters to '%' and have %%...%% can I?
>>> 
>>> Collin
>>> 
>>> On Mon, Apr 4, 2011 at 8:39 PM, Sam Harwell <sharwell at pixelminegames.com> wrote:
>>> If you want to emit the literal %> in the output, you can write it as %\>,
>>> using the existing escape sequence without breaking anything.
>>> 
>>> Sam
>>> 
>>> -----Original Message-----
>>> From: stringtemplate-interest-bounces at antlr.org
>>> [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence Parr
>>> Sent: Monday, April 04, 2011 8:07 PM
>>> To: stringtemplate-interest List
>>> Subject: Re: [stringtemplate-interest] "".."" won't work
>>> 
>>> 
>>> On Apr 4, 2011, at 6:05 PM, Sam Harwell wrote:
>>> 
>>> > I guess with <%..%>, the escape character is still \>?
>>> >
>>> > This should work fine.
>>> 
>>> Well, shouldn't need any escape really...should be \%?
>>> Ter
>>> _______________________________________________
>>> stringtemplate-interest mailing list
>>> stringtemplate-interest at antlr.org
>>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>>> 
>>> _______________________________________________
>>> stringtemplate-interest mailing list
>>> stringtemplate-interest at antlr.org
>>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>>>  
>> 
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110405/6e44cd29/attachment.html 


More information about the stringtemplate-interest mailing list