...
Question 5556 – Compiler-Design
May 17, 2024
Question 5642 – Compiler-Design
May 17, 2024
Question 5556 – Compiler-Design
May 17, 2024
Question 5642 – Compiler-Design
May 17, 2024

Question 5640 – Compiler-Design

Given a grammar : S1 → Sc, S → SA | A, A → aSb | ab, there is a rightmost derivation
     S1 ⇒ Sc ⇒ SAC ⇒ SaSbc
Thus, SaSbc is a right sentential form, and its handle is

Correct Answer: D

Question 270 Explanation: 
A “handle” of a string is a substring that matches the RHS of a production and whose reduction to the non-terminal (on the LHS of the production) represents one step along the reverse of a rightmost derivation toward reducing to the start symbol.
And in above question aSb is a handle because it’s reduction to the LHS of production A → aSb represents one step along the reverse of a rightmost derivation toward reducing to the start symbol.
A
SaS
B
bc
C
Sbc
D
aSb
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!