1
GATE CSE 2007
MCQ (Single Correct Answer)
+1
-0.3
Which one of the following is a top-down parser?
A
Recursive descent parser.
B
Operator precedence parser.
C
An LR(k) parser.
D
An LALR(k) parser.
2
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
3
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
4
GATE CSE 2003
MCQ (Single Correct Answer)
+1
-0.3
Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states. The relationship between n1 and n2 is
A
n1 is necessarily less than n2
B
n1 is necessarily equal to n2
C
n1 is necessarily greater than n2
D
None of the above
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