GATEverse
← GATE CSE 2025 Set 2

Q41

MSQ2 marks

Consider two grammars G1G_{1} and G2G_{2} with the production rules given below: G1:S→G_{1} : S \rightarrow ifif EE thenthen SS ∣| ifif EE thenthen SS elseelse SS ∣| aa E→bE \rightarrow b G2:S→G_{2} :S \rightarrow ifif EE thenthen SS ∣| MM M→M \rightarrow ifif EE thenthen MM elseelse SS ∣| cc E→bE \rightarrow b where if,then,else,a,b,cif, then, else, a, b, c are the terminals. Which of the following option(s) is/are CORRECT?

Sign in to save attempts.

Loading…