[Home]LALR parser/Talk

HomePage | LALR parser | Recent Changes | Preferences

Talk moved; was originally on head page.

((This is rubbish, I will try to write something at the weekend (2001-08-18). --drj. Immediate issues: LALR is an algorithm for generating tables for a table driven LR shift reduce parser. It is not a parser (ooh except maybe the Natural Language community think it is). pretty sure the derivation of each of the letters is wrong.))

Hmmm. Looking at an old copy of the Dragon Book (which I've heard is pretty well respected in the field, but I may be wrong):

"These parsers are called LR parsers because they scan the input from left-to-right and construct a rightmost derivation in reverse ... The third method, called lookahead LR (LALR for short) ... the LALR parser of Fig. 6.13 ..." -- Principles of Compiler Design, Aho and Ullman

So there's some precedent for calling something an "LALR parser" since they did it throughout the book and there are five citations, some of them multi-page, in the index for that phrase. I didn't create the initial entry, but I was kinda irked at the tone of the comment --loh

Okay. I am intending to use my Dragon Book when I write the article so no doubt I would've found all this out anyway. "Recursing on the rightmost non-terminal in any grammar rule" is not really a good definition of producins a rightmost derivation BTW. --drj

Well, I guess my definition was not TOTAL RUBBISH, as drj seemed to imply. I agree recursing isn't the best way to describe it. Hm.. maybe I should go look at the stuff I said was rubbish and make sure I wasn't wrong.

OK, I looked at my Dragon Book (2nd ed, BTW) and wrote the articles LR parser (which was longish) and LALR parser (which was short). But my email at home is busted so I can't put it here yet. *sigh*. LALR stands for Lookahead LR and is a method for producing LR parsers. LR stands for Left-to-right scan, Rightmost derivation. 2nd ed Dragon does not use the term LALR parser, and neither do I so I'm not sure what one is; I assume it is an LR parser produced by the LALR method? Sorry I used the term "rubbish" because the original entry certainly is not. --drj


HomePage | LALR parser | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited August 22, 2001 5:14 pm by Drj (diff)
Search: