Which of the following correctly describes a feature of Simple LR (SLR) parsing?

2025

Which of the following correctly describes a feature of Simple LR (SLR) parsing?

  1. A.

    Parsing tables are not used in the SLR technique.

  2. B.

    SLR parsing uses reverse rightmost derivation steps.

  3. C.

    FOLLOW sets are used in constructing SLR parsing tables.

  4. D.

    SLR parsers rely on backtracking to analyse input strings.

Attempted by 33 students.

Show answer & explanation

Correct answer: C

SLR (Simple LR) parsing is a bottom-up parsing technique used in compiler design. Its key characteristics include:

Uses LR parsing tables (ACTION and GOTO)
Based on LR(0) items
Uses FOLLOW sets to resolve reduce actions
No backtracking (deterministic parsing)

FOLLOW sets are essential because they help decide when a reduction should occur during parsing.

Explore the full course: Niacl Ao It Specialist