[stringtemplate-interest] Help with recursive template application
Terence Parr
parrt at cs.usfca.edu
Mon Aug 24 14:46:35 PDT 2009
On Aug 24, 2009, at 12:16 PM, Vincent Dupuis wrote:
> Ok, but why, if I reverse the parameters, the "iter.name" value
> passed is not good?
yeah, something is hosed.
Ter
>
> Like this:
>
> classDeclaration(iter, parent) ::= <<
> class <iter.name> : public <parent>
> {
> <iter.listOfSubClasses:classDeclaration(iter=it,
> parent=iter.name); separator="\n">
> }
> >>
>
> I think there is something special with the first parameter and this
> behavior is not compatible
> with recursive template application with more than one parameter.
>
> vi
>
>
> CC: stringtemplate-interest at antlr.org
> From: parrt at cs.usfca.edu
> To: vincedupuis at hotmail.com
> Subject: Re: [stringtemplate-interest] Help with recursive template
> application
> Date: Sun, 23 Aug 2009 13:01:37 -0700
>
>
> On Aug 21, 2009, at 6:40 AM, Vincent Dupuis wrote:
> classDeclaration(iter, parent) ::= <<
> class <iter.name> : public <parent>
> {
> <iter.listOfSubClasses:classDeclaration(parent=iter.name,
> iter=it); separator="\n">
> }
> >>
>
> I just remember. "it" is created in the ":" operation but is not yet
> available when the args are evaluated. so "it" in this case does not
> refer to the listOfSubClasses:classDeclaration iteration.
> Ter
>
> Attention à tous les Humains. Nous sommes vos photos. Libérez-nous
> de vos disques durs.
More information about the stringtemplate-interest
mailing list