Concepts Of Programming Languages
Concepts Of Programming Languages
12th Edition
ISBN: 9780134997186
Author: Sebesta, Robert W.
Publisher: Pearson,
Expert Solution & Answer
Book Icon
Chapter 4, Problem 21RQ

Explanation of Solution

Handle of a sentential form:

A bottom up parser attempts for a reduction from right hand side of right sentential form (γ) by replacing the right most sub-string (assume it be β) of terminals and non-terminals. From the grammar rule the most appropriate rule with β on RHS is to be selected. The correct RHS is called handle.

  • A handle of a sentential form is a substring β such that, β matches with a rule A β in the grammar and replacing β with A is a step in the reverse of the right most derivation of a string.
  • The formal definition of a handle can be given as: For a right sentential form γ=αβw, β is the handle if and only if ⇒</

Blurred answer
Students have asked these similar questions
Why is it that most languages do not specify the order in which the parameters to an operator or function are evaluated?
What is the difference between a function and a special form in Scheme?
What does it mean for an expression to be referentially transparent?