Question 5556 – Compiler-Design
May 17, 2024Question 5642 – Compiler-Design
May 17, 2024Question 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.
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.
SaS
bc
Sbc
aSb
Subscribe
Login
0 Comments