Question:

A handle in a bottom-up parser is a substring that matches the right-hand side of a production and whose reduction represents:

Show Hint

In a deterministic LR parser, there is exactly one handle in every right-sentential form. Finding this handle is the core task of the parsing algorithm.
Updated On: Jul 4, 2026
  • The next step in a derivation.
  • One step in the reverse of a rightmost derivation.
  • The leftmost leaf of the parse tree.
  • A terminal symbol to be shifted.
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept: Bottom-up parsing starts with the input string and attempts to "reduce" it back to the start symbol.
Sentential Form: A sequence of symbols that can be derived from the start symbol.
Handle: The specific part of a sentential form that is selected for reduction in shift-reduce parsing.

Step 1:
The role of the handle.
A handle is a production $A \rightarrow \beta$ that exists within a sentential form $\alpha\beta\gamma$. Reducing $\beta$ to $A$ should eventually lead back to the start symbol.

Step 2:
Relating to Derivations.
Top-down parsers build Rightmost derivations in normal order. Bottom-up parsers identify handles to undo productions. This process is equivalent to a Rightmost derivation performed backwards.

Step 3:
Conclusion.
Therefore, each successful reduction at a handle represents a single step. Specifically, it is a step in the reverse of a rightmost derivation.
Was this answer helpful?
0
0