Consider the following two sets of LR(1) items of an LR(1) grammar. X → c.X,…
GATE · 2013 · CS · Computer Science & ITBARC · Computer Science · 2013
Consider the following two sets of LR(1) items of an LR(1) grammar.
X → c.X, c/d
X → .cX, c/d
X → .d, c/dX → c.X, $
X → .cX, $
X → .d, $Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE?
Cannot be merged since look aheads are different.
Can be merged but will result in S-R conflict.
Can be merged but will result in R-R conflict.
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
Attempted by 240 students.
Sign up free to check your answer
Sign up freeLoading lesson…