AW: AW: [stringtemplate-interest] Problems with List and Hashesrevisited

Terence Parr parrt at cs.usfca.edu
Thu Jun 1 10:30:11 PDT 2006


On Jun 1, 2006, at 12:16 AM, Dreyer Ulf (CR/APA3) wrote:

> Hi!
>
>>> RecursiveOut(Daten) ::= << $Daten:RecursiveOut();separator=","$ >>
>>> As both classes in my data-structure (AttributeHash and
>> AttributeList)
>>> are IEnumerable it should strip away one layer at a time,
>> shouldn't
>>> it?
>>
>> You are saying
>>
>> f(x) { f(x); }
>>
>> here.
>
> Of course this does not have any output but
> I assumed because of attribute application and the fact
> that Daten is always IEnumerable it would "shave off"
> one layer per call. (as it is essentially
> a  foreach( foreach (foreach))) construct)

Normally it will, *if* you let it iterate.

Imagine one value in Daten, x.  You are passing the start of x again  
to the same template.  At the start of the template, it will always  
have that value, hence, infinitely.
Ter


More information about the stringtemplate-interest mailing list