[stringtemplate-interest] [ST4] Introduce Boolean literals (e.g. true/false)?
Terence Parr
parrt at cs.usfca.edu
Sat Feb 5 17:14:03 PST 2011
ah. crap. ok, fixed.
tre
On Feb 5, 2011, at 5:04 PM, Sam Harwell wrote:
> Still have one left in Group.g, rule keyValue ;)
>
> Sam
>
> -----Original Message-----
> From: stringtemplate-interest-bounces at antlr.org
> [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence Parr
> Sent: Saturday, February 05, 2011 6:44 PM
> To: stringtemplate-interest List
> Subject: Re: [stringtemplate-interest] [ST4] Introduce Boolean literals
> (e.g. true/false)?
>
> cool, but Oops. fixed remaining part:
>
> * true/false were only allowed as default args; now allowed as template
> arg expressions in templates.
>
> pushed.
>
> Ter
> On Feb 5, 2011, at 4:26 PM, Sam Harwell wrote:
>
>> I just opened outlook to send this very question. :)
>>
>> Thanks, very much needed! :)
>>
>> Sam
>>
>> -----Original Message-----
>> From: stringtemplate-interest-bounces at antlr.org
>> [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of
>> Terence Parr
>> Sent: Saturday, February 05, 2011 2:03 PM
>> To: stringtemplate-interest List
>> Subject: Re: [stringtemplate-interest] [ST4] Introduce Boolean
>> literals (e.g. true/false)?
>>
>> * added two literals "true" and "false" to the template argument
>> syntax; e.g.,
>> stat(name,x=true,y=false) ::= "..."
>>
>> Wow. thanks for all the help, Udo! I really appreciate you catching
>> all of this stuff.
>>
>> Ter
>> On Feb 3, 2011, at 10:28 AM, Udo Borkowski wrote:
>>
>>> How about adding two literals "true" and "false" to the grammar of
>>> ST4,
>> refering to the Boolean.TRUE and FALSE?
>>>
>>> I would like to use these as default values.
>>>
>>> E.g.
>>>
>>> myTemplate(withPrefix=true, withLog=false) ::= .
>>>
>>>
>>> I found no nice way to express something like this. How do others
>>> work
>> around this?
>>>
>>>
>>> Udo
>>>
>>> _______________________________________________
>>> 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
>
More information about the stringtemplate-interest
mailing list