Chapter 4: Syntax Analysis

Notes on LALR parse table.

. LALR parsers are not built by first making canonical LR parse tables

. There are direct, complicated but efficient algorithms to develop LALR parsers

. Relative power of various classes

- SLR(1) ≤ LALR(1) LR(1)

- SLR(k) LALR(k) LR(k)

- LL(k) LR(k)

In practice, we never first construct a LR parse table and then convert it into a LALR parser but there are different efficient algorithms which straight away give us the LALR parser. In fact, YACC and BISON generate LALR parser using these algorithms. Relative power of various classes:

SLR (1) <LALR (1) <LR (1)

SLR (K) <LALR (1) <LR (K)

LL (K) < LR (K)

But LL (K1) < LR (K2) IF K1>K2 for some large enough value of K1.