Skip to content

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

GateBrew
← GATE CSE 2024 Set 2
Questions

Q55

NAT2 marksCompiler design

Consider the following augmented grammar, which is to be parsed with a SLR\text{SLR} parser. The set of terminals is {a,b,c,d,#,@}\{a, b, c, d, \#, @\}

S′→SS→SS∣Aa∣bAc∣Bc∣bBaA→d#B→@\begin{array}{l} S^{\prime} \rightarrow S \\ S \rightarrow S S|A a| b A c|B c| b B a \\ A \rightarrow d \# \\ B \rightarrow @ \end{array}

Let I0=CLOSURE⁡({S′→∙S})I_{0}=\operatorname{CLOSURE}\left(\left\{S^{\prime} \rightarrow \bullet S\right\}\right). The number of items in the set GOTO⁡(I0,S)\operatorname{GOTO}\left(I_{0}, S\right) is __________.

Sign in to save attempts.

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