Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2013
Questions

Q40

MCQ2 marks, −0.67Compiler designMedium

Consider the following two sets of LR(1)\textsf{LR(1)} items of an LR(1)\textsf{LR(1)} grammar.

X→c.X,c/dX→c.X,$X→.cX,c/dX→.cX,$X→.d,c/dX→.d,$\begin{array}{l|l} X \rightarrow c.X, c/d & X \rightarrow c.X, \$\\ X \rightarrow .cX, c/d & X \rightarrow .cX, \$\\ X \rightarrow .d, c/d & X \rightarrow .d, \$ \end{array}

Which of the following statements related to merging of the two sets in the corresponding LALR\textsf{LALR} parser is/are FALSE? 1. Cannot be merged since look aheads are different. 2. Can be merged but will result in S-R\textsf{S-R} conflict. 3. Can be merged but will result in R-R\textsf{R-R} conflict. 4. Cannot be merged since goto\textsf{goto} on cc will lead to two different sets.

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.