0
21kviews
Explain Handle Pruning

Mumbai University > Computer > Sem 6 > System Programming and Compiler Construction

Marks: 5

Year:May 16

1 Answer
3
774views

• Left to right bottom-up parsing constructs a rightmost derivation in reverse

• Handle = substring that matches the body of a production

• Handle reduction = a step in the reverse of rightmost derivation

Handles During a Parse id1 *id2

enter image description here

E->T , T is not a handle in T*id2

If we replace T by E ◦ we get E*id2 which can not be derived from E

leftmost substring that matches production body need not to be a handle

Please log in to add an answer.