|Iterator firstname.lastname@example.org (2002-05-23)|
|Re: Iterator email@example.com (2002-05-27)|
|Re: Iterator firstname.lastname@example.org (Randall Hyde) (2002-05-27)|
|Re: Iterator email@example.com (Joachim Durchholz) (2002-05-27)|
|Re: Iterator firstname.lastname@example.org (Hans Aberg) (2002-05-27)|
|Re: Iterator bobduff@shell01.TheWorld.com (Robert A Duff) (2002-05-31)|
|From:||email@example.com (Neelakantan Krishnaswami)|
|Date:||27 May 2002 01:15:43 -0400|
|Posted-Date:||27 May 2002 01:15:43 EDT|
Takuya Murata <firstname.lastname@example.org> wrote:
> Now, I'm making a compiler. I want to support a loop feature as
> iterators like Sather.
> The problem is as if two stacks exists concurrently. I couldn't find
> a compiler construction book about how to implement iterator
> mechanism. Anyone suggestion?
Sure. At the conceptual level you want to understand what
continuations are, and how you can use them to implement coroutines.
Then to use them to implement Sather-style iterators you can look at:
Featherweight Concurrency in a Portable Assembly Language. Ramsey and
"Concurrency" in this paper refers to coroutine-style user threads,
which are basically the same as Sather/CLU-style iterators.
Return to the
Search the comp.compilers archives again.