1
GATE CSE 2013
MCQ (Single Correct Answer)
+2
-0.6
Consider the following two sets of LR(1) items of an LR(1) grammar.
$$\eqalign{ & X \to c.X,\,c/d\,\,\,\,\,\,\,\,X \to c.X,\$ \cr & X \to .cX,c/d\,\,\,\,\,\,\,\,X \to .cX,\$ \cr & X \to .d,c/d\,\,\,\,\,\,\,\,\,\,\,X \to .d,\$ \cr} $$Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE?
1. Cannot be merged since look aheads are different.
2. Can be merged but will result in S-R conflict.
3. Can be merged but will result in R-R conflict.
4. Cannot be merged since goto on c will lead to two different sets.
2
GATE CSE 2010
MCQ (Single Correct Answer)
+2
-0.6
The grammar $$S \to aSa\,|\,\,bS\,|\,\,c$$ is
3
GATE CSE 2008
MCQ (Single Correct Answer)
+2
-0.6
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
4
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Consider the CFG with { S, A, B } as the non-terminal alphabet, { a, b } as the terminal alphabet, S as the start symbol and the following set of production rules:
$$\eqalign{ & S \to bA\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,S \to aB \cr & A \to a\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,B \to b \cr & A \to aS\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,B \to bS \cr & S \to bAA\,\,\,\,\,\,\,\,\,\,\,B \to aBB \cr} $$Which of the following strings is generated by the grammar?
Questions Asked from Parsing (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2024 Set 2 (2)
GATE CSE 2024 Set 1 (1)
GATE CSE 2021 Set 2 (1)
GATE CSE 2021 Set 1 (1)
GATE CSE 2020 (1)
GATE CSE 2019 (1)
GATE CSE 2018 (1)
GATE CSE 2016 Set 2 (1)
GATE CSE 2016 Set 1 (1)
GATE CSE 2015 Set 3 (1)
GATE CSE 2014 Set 1 (1)
GATE CSE 2013 (1)
GATE CSE 2010 (1)
GATE CSE 2008 (1)
GATE CSE 2007 (4)
GATE CSE 2006 (3)
GATE CSE 2005 (4)
GATE CSE 2004 (2)
GATE CSE 2003 (3)
GATE CSE 1995 (1)
GATE CSE 1992 (1)
GATE CSE Subjects
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