Hans Aberg writes: 

> At 10:58 -0500 2002/01/20, Anthony DeRobertis wrote:
>>I'm beginning to agree with Scott that LALR(1) isn't enough.
> 
> First note that languages are often not themselves LL(1) or LALR(1) even
> though  such parsers may be used: One can tweak the lexer by say a lookup
> table deciding which token to return. Or one can decide that some data is
> semantic, and let it be handled via the actions. This data can the be fed
> back to alter the lexer.

I'm going to be depending on those facts quite a bit. 

> 
> So if you say that the original parser used a recursive decent parser
> (probably LL(1) then),

I doubt LL(1). 

> Thus, it may look as though a larger lookahead is needed in a simplistic
> analysis.

Yes, that's quite true. And I think I unfortunately aided simplistic 
analysis by my poor choice of examples! 

> passes Bison. So your example is parsable with one token lookahead LALR.

I think it's about time I posted what I have of the grammar. It's 480 lines, 
so I'll just give a URL:
  <http://freecard.sourceforge.net/InterpreterExpirement/parser.y>
You'll need to find a nice 132-character display to make it readable --- 
sorry about that. Also, I use 4-character tabs... 

The parts I was giving examples from are "chunk", "part_descr". "expr" and 
"factor" are quite important, too. 

Attachment: msg00852/pgp00000.pgp
Description: PGP signature

Reply via email to