At 09:26 AM 9/28/2002 +0900, you wrote:

>"Yukihiro Matsumoto" <matz / ruby-lang.org> wrote in message
>news:1033171762.477103.17040.nullmailer / picachu.netlab.jp...
> > Hi,
> >
> > In message "Re: Is Ruby's grammar LL(k)?"
> >     on 02/09/27, nobu.nokada / softhome.net <nobu.nokada / softhome.net>
>writes:
> >
> > |Perhaps, it really wants LALR(k) or possibly LL(k), where k is
> > |3 or more.
> >
> > I think the current implementation requires two look ahead for the
> > pattern like "<digit>..".  So it should be LALR(2), and possibly LL(2).
>
>Can't this be written with
>
>value ::= token_integer | token_integer token_dotdot

I agree with that.  LL(1) has more of a issue, I think,
with not knowing the context of a statement.  There are
quite a few ruby-isms that are context dependant.


For example:

while gets
         next if /^#/          # Skip comments
         parseLine unless /^$/ # Don't parse empty lines end
end

may be tricky in LL(1).  I have to think about that...



-mark.