Time Left - 10:00 mins

GATE CS 2018 - Compiler Design Quiz- 2 (Parsing)

Attempt now to get your rank among 497 students!

Question 1

Consider the following grammar for arithmetic expressions
X X+Z|Z
Z Z*Y|Y
Y (X)|id
Then after eliminating the immediate left recursions we get

Question 2

The idea of automation with a stack as auxiliary storage is supported by?

Question 3

Let G be the following grammar.

Find the total number of reductions using LR(1) parser for the string a*a+ac using grammar G.

Question 4

Consider the following CFG
SaAb|aBc|bAd|bBe
Ag
Bg
How many states are exist in DFA using LALR (1) constructions for the above grammar?

Question 5

Consider the following expression grammar G:

Which of the following grammars is not left recursive, but is equivalent to G?
  • 497 attempts
  • 3 upvotes
  • 2 comments
Aug 18GATE & PSU CS