Skip to content

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

GateBrew
← GATE CSE 2019
Questions

Q19

NAT1 markCompiler design

Consider the grammar given below: S→AaS \rightarrow Aa A→BDA \rightarrow BD B→b∣ϵB \rightarrow b \mid \epsilon D→d∣ϵD \rightarrow d \mid \epsilon Let a,b,da,b,d and $\text{\textdollar} be indexed as follows:

abd$3210\begin{array}{|l|l|l|l|} \hline a & b & d & \$ \\ \hline 3 & 2 & 1 & 0 \\ \hline \end{array}

Compute the FOLLOW set of the non-terminal B and write the index values for the symbols in the FOLLOW set in the descending order.(For example, if the FOLLOW set is (a,b,d,$)(a,b,d, \text{\textdollar}) , then the answer should be 32103210)

Sign in to save attempts.

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