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?
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
is not suitable for predictive-parsing because the grammar is
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?
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
GATE CSE Subjects
Browse all chapters by subject
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages