1
GATE CSE 2013
+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.

A
1 only
B
2 only
C
1 and 4 only
D
1, 2, 3 and 4
2
GATE CSE 2010
+2
-0.6
The grammar $$S \to aSa\,|\,\,bS\,|\,\,c$$ is
A
LL(1) but not LR(1)
B
LR(1) but not LR(1)
C
Both LL(1) and LR(1)
D
Neither LL(1) nor LR(1)
3
GATE CSE 2008
+2
-0.6
An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
A
The SLR(1) parser for G has S - R conflicts
B
The LR(1) parser for G has S - R conflicts
C
The LR(0) parser for G has S - R conflicts
D
The LALR(1) parser for G has reduce-reduce conflicts
4
GATE CSE 2007
+2
-0.6
Consider the following two statements:

P: Every regular grammar is LL(1)
Q: Every regular set has a LR(1) grammar

Which of the following is TRUE?
A
Both P and Q are true
B
P is true and Q is false
C
P is false and Q is true
D
Both P and Q are false
GATE CSE Subjects
EXAM MAP
Medical
NEET