[stringtemplate-interest] [ST4] Introduce Boolean literals (e.g. true/false)?

Terence Parr parrt at cs.usfca.edu
Sat Feb 5 12:02:30 PST 2011


* 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



More information about the stringtemplate-interest mailing list