From: Bjarke Walling Date: 2006-11-29T22:15:05+09:00 Subject: Re: "yield" and "old-way iteration" Thank you for all your replies! The real problem is that I am not that skilled in writing a parser, I think. It might be the "inversion of control" problem I experience. The problem is that my FirstParse class push tokens using "yield" and in my SecondParse I want to pull tokens and decide upon them, and pull the next when I'm ready for it. I don't know how to write the SecondParse another way without the code becomming too complex, but I have a book on grammers and languages. I read the part on regular expressions and on Turing machines, but missed out the grammers part. I have to read at least some of it :-) But for now I solve it by loading the tokens directly into an array in the first parse. - Bjarke Walling