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
: basically used up keeping track of the indentation level. But you don't
: need a whole stack to keep track of indntation level, just a register
: that can be used to track the current level.
It seems to me you need a stack of levels so you know how many
indentation levels to pop off. Otherwise you can't parse this:
if foo1
bar1
if foo2
bar2
if foo3
bar3
else
baz2
Larry