Re: zip: stop when and where?

2005-10-04 Thread Greg Woodhouse
I see your point. Option b does suggest that you can read ahead in a "blocked" list and get undef's. If I had to choose just one, I think I'd opt for d, but having two zip's one acting like c and one like d might be useful. Then, of course, my first thought was wrong. This one may well be, too. --

Re: zip: stop when and where?

2005-10-04 Thread Greg Woodhouse
That (b) certainly seems like the sensible option to me. My second choice would be d. A nice thing about c is that it leaves open the possibility of lazy evaluation (zip as much of the lists as you can, leaving open the possibility of picking up the process later). But I still prefer b. Maybe ther

Re: Parsing indent-sensitive languages

2005-09-08 Thread Greg Woodhouse
Come to think of it...I had in mind a sequence of "skip" statements, that would back out of a level one at a time, until you finally reached the desired level. But, I think maybe these "skip" statements essentially play the role of what you called "positive unindent tokens" (I like that term). I a

Re: Parsing indent-sensitive languages

2005-09-08 Thread Greg Woodhouse
but you still need a stack for global correctness. --- Larry Wall <[EMAIL PROTECTED]> wrote: > On Thu, Sep 08, 2005 at 02:16:33PM -0700, Greg Woodhouse wrote: > : In the case of the > : "indentation grammar", then the (one) stack in a push-down > automaton is > :

Re: Parsing indent-sensitive languages

2005-09-08 Thread Greg Woodhouse
That's something I've been thinking about, too. There are a lot of "interesting" languages that cannot be described by context free grammars (such as {empty, 012, 001122, 000111222, ...} but very simple enhancements do make them easy to recognize. In the case of the "indentation grammar", then the