From: "Mauricio Fernández" Date: 2002-09-28T02:46:33+09:00 Subject: Re: Is Ruby's grammar LL(k)? On Fri, Sep 27, 2002 at 10:09:49PM +0900, Mark Probert wrote: > > Hi, Nobu. > > >Perhaps, it really wants LALR(k) or possibly LL(k), where k is > >3 or more. > > Is this due to the use of yield and blocks? Or do you think > that there are other parts that won't be accessible to LL(1)? > Why should yield and blocks be any harder to parse? I was rather thinking of STMT := .... | STMT if EXPR | STMT while EXPR | STMT unless EXPR | STMT until EXPR I'm not sure whether it can be left-factored or not... but I feel it cannot. Gotta think about it a little more. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Linux is addictive, I'm hooked! -- MaDsen Wikholm's .sig