Site icon i2tutorials

Compiler Design-LALR (1) Parser

LALR (1) Parser

 

In this type of parser, the look-ahead symbol is generated for each set of items.

The table obtained by this method is smaller in size than LR(K). In fact, the status of the SLR & LALR parser is always the same.

Most of the programming languages use LALR parser.

 

The following are the steps for implementing the LALR parser:-

  1. Construction of a canonical set of items along with a look-ahead symbol.
  2. Building LALR (1) parsing table
  3. Parsing I/P string using LALR (1) parsing table

 

Reference Link

LALR (1) Parser

Exit mobile version