Question: Consider the following parse tree: infir- S S S 1 1 E E (a) List out all the non-terminals and terminals from the above

Consider the following parse tree: infir- S S S 1 1 E E (a) List out all the non-terminals and terminals from the above parse tree. [2 marks] (b) Construct the context-free grammar defined by the above parse tree. [3 marks] (c) Show the rightmost derivation steps for the above parse tree. [2.5 marks] (d) Why this grammar generates two distinct parse trees for this sentence/string: (()) (). Explain and draw both parse trees. [2.5 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
