On Fri, 28 Jan 2005, Clifford Heath wrote: > Hugh Sasse Staff Elec Eng wrote: >> According to "Crafting a Compiler" ISBN 0-8053-3201-4 it seems that >> recursive descent implies LL(1)... > > No. LL(1) just means that the recursive descent parser may only consider > the current unprocessed token. If the lexer allows perusal of two > unprocessed tokens, your recursive descent parser is LL(2). Isn't that just re-framing the problem so that all token pairs are regarded as single entities? Then at the level of what the parser processes, it can only take one entity at a time? Tokenizing generally lumps things together anyway, so /(\d+)/ rather than /(?:(\d)+)/, therefore having the lexer peruse two tokens feels like a special case. > Anyway, I hope I haven't misrepresented what the book says. Hugh >