Compiler-Design
May 17, 2024Question 5768 – Compiler-Design
May 17, 2024Question 5642 – Compiler-Design
The equivalent production rules corresponding to the production rules
S → Sα1 | Sα2 | β1 | β2 is
Correct Answer: D
Question 271 Explanation:
Given grammar can generate { β1, β2 , β2α2, , β2 α1, , β1α2, , β1α1 , β1 α1α2………………}
Option A can generate only {β1, β2} so it is not a correct option.
Option B is not correct because it have no terminating point strings containing {α1 , α2}
Option C is not correct because it can generate only {β1, β2}
Option D is correct answer because it can generate all the strings generated by given grammar.
Option A can generate only {β1, β2} so it is not a correct option.
Option B is not correct because it have no terminating point strings containing {α1 , α2}
Option C is not correct because it can generate only {β1, β2}
Option D is correct answer because it can generate all the strings generated by given grammar.
S → β1 | β2, A → α1A | α2A | λ
S → β1| β2 | β1A | β2A, A → α1A | α2A
S → β1 | β2, A → α1A | α2A
S → β1 | β2 | β1A | β2A, A → α1A | α2A | λ
Subscribe
Login
0 Comments