1
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3

Consider the following grammar.

$$\eqalign{ & S \to S*E \cr & S \to E \cr & E \to F + E \cr & E \to F \cr & F \to id \cr} $$

Consider the following LR(0) items corresponding to the grammar above.

$$\eqalign{ & (i)\,S \to S*.E \cr & (ii)\,E \to F. + E \cr & (iii)\,E \to F + .E \cr} $$

Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?

A
(i) and (ii)
B
(ii) and (iii)
C
(i) and (iii)
D
None of the above
2
GATE CSE 2005
MCQ (Single Correct Answer)
+1
-0.3
The grammar $$A \to AA\,|\,\left( A \right)\,|\,\varepsilon $$
is not suitable for predictive-parsing because the grammar is
A
ambiguous
B
left-recursive
C
right-recursive
D
an operator-grammar
3
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
A
Removing left recursion alone
B
Factoring the grammar alone
C
Removing left recursion and factoring the grammar
D
None of the above
4
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
In a bottom-up evaluation of a syntax directed definition, inherited attributes can
A
always be evaluated
B
be evaluated only if the definition is L- attributed
C
be evaluated only if the definition has synthesized attributes
D
never be evaluated
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12