[stringtemplate-interest] mapping templates
Terence Parr
parrt at cs.usfca.edu
Wed Oct 7 16:30:52 PDT 2009
yeah, that's what i'm thinking. f() really means invoke and we're not
invoking. In fact, even names:bold doesn't execute bold until later
when we write out the results.
Core of new version is working. Sooooo much simpler. one grammar, for
example, not multiple to parse templates. Bytecode compiler / interp
are simple.
I should probably cut this version out and use as a template DSL
example w/o complexity of full ST :)
Ter
On Oct 7, 2009, at 4:28 PM, Sam Harwell wrote:
> This is the general form:
>
> <{sequence}:{template taking one argument}>
>
> If the template is a template named "bold" declared elsewhere, then
> the
> form <names:bold> makes much more sense, especially since "bold()"
> would
> imply that the template takes no arguments.
>
> Sam
>
> -----Original Message-----
> From: stringtemplate-interest-bounces at antlr.org
> [mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of
> Terence
> Parr
> Sent: Wednesday, October 07, 2009 2:29 PM
> To: stringtemplate-interest Template
> Subject: [stringtemplate-interest] mapping templates
>
> Hi, there is a syntax bugaboo in ST v3.
>
> <names:bold()> means apply bold to each element of names but t=foo()
> in an arg list or wherever means invoke foo and put ST into t. Seems
> like foo should be a template name and foo() should be an invocation.
> That would imply we'd chnage to:
>
> <names:bold>
>
> Makes more sense if you ask me. Other thoughts?
>
> Ter
> _______________________________________________
> 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