0
21kviews
Explain Handle Pruning
written 7.5 years ago by | • modified 7.5 years ago |
Mumbai University > Computer > Sem 6 > System Programming and Compiler Construction
Marks: 5
Year:May 16
ADD COMMENT
EDIT
1 Answer
written 7.5 years ago by | • modified 7.5 years ago |
Mumbai University > Computer > Sem 6 > System Programming and Compiler Construction
Marks: 5
Year:May 16
written 7.5 years ago by |
• 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
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