[stringtemplate-interest] Iteration over multi-valued attribute using implied counter $i$ and first() rest()

Terence Parr parrt at cs.usfca.edu
Thu Jan 8 16:46:33 PST 2009


On Jan 8, 2009, at 4:44 PM, Michael Albanese (malbanes) wrote:

>
>
>> -----Original Message-----
>> From: Terence Parr [mailto:parrt at cs.usfca.edu]
>> Sent: Thursday, January 08, 2009 4:33 PM
>> To: Michael Albanese (malbanes)
>> Cc: stringtemplate-interest at antlr.org
>> Subject: Re: [stringtemplate-interest] Iteration over
>> multi-valued attribute using implied counter $i$ and first() rest()
>>
>> Hi. I believe all you need is:
>>
>> make_keys_comparison(keys) ::= <<
>> $keys:{record[$i$] == $it$)}; separator=" and "$  >>
>>
>> Ter
>
> Thank you, yes this did it.
>
> I had started down a similar path but struggled with the
> correct syntax concerning of the semi colon.
>
> As with all good answers it looks obvious now :{

Yep ;)  Syntax is basically $expression; options$

Ter



More information about the stringtemplate-interest mailing list