[stringtemplate-interest] proposed "ignore newlines" template syntax
Terence Parr
parrt at cs.usfca.edu
Mon Apr 4 16:07:13 PDT 2011
interesting. hmm...antlr's lexers kinda suck at these complicated tokens...let me see what i can implement.
Ter
On Apr 4, 2011, at 12:24 PM, Jonathan Buhacoff wrote:
> You could take that idea even further and only escape "" if it's on a line by itself or followed only by whitespace.
>
> t() ::= ""
> System.out.println("no need to escape double quotes");
> No need to escape double-double quotes ("") either unless they are on a line by themselves:
> \""
> ""
>
> Jonathan
>
> On Apr 4, 2011, at 9:20 PM, Sam Harwell wrote:
>
>> That was my concern.
>>
>> Thinking about it more, it seems you shouldn’t need to escape the quotes unless there are two of them, in which case you could use "\" to produce two sequential quotes in the output.
>>
>> Sam
>>
>> From: stringtemplate-interest-bounces at antlr.org [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Collin Fagan
>> Sent: Monday, April 04, 2011 1:03 PM
>> To: Terence Parr
>> Cc: stringtemplate-interest List
>> Subject: Re: [stringtemplate-interest] proposed "ignore newlines" template syntax
>>
>> Will using "" require people to escape a single " in a template?
>>
>> t() ::= ""
>> System.out.println(\"hi\");
>> ""
>> Collin
>>
>>
>> _______________________________________________
>> 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
More information about the stringtemplate-interest
mailing list