SLR(1) parser

Basic idea

Simple LR(1): an LR(0) automaton augmented with FOLLOW-set lookahead — reduce by AαA \to \alpha only when the next token is in FOLLOW(A)\mathrm{FOLLOW}(A). Stronger than LR(0), weaker than LALR(1), cheap to construct.

Key formulas

Siblings