LALR parser

from Wikipedia, the free encyclopedia

In the compiler construction , the LALR parser ( lookahead LR parser) is a modified LR (1) parser . The so-called LR (1) sets, which are identical under the relation , are combined into one set.

The relation is defined as follows:

the LR (0) proportions of a and b match.

In simple terms, this means that the previously calculated LR (1) automaton brings together states whose core is identical. The core of two states is identical if the items of the two states are identical except for the follow sets (lookaheads).

See also

Web links

  • JS / CC - Interactive online implementation of a LALR (1) parser generator for illustration
  • Tutorial on handling algorithms used in generating LR and LALR parsers.