GATEverse
← GATE CSE 2019

Q19

NAT1 mark

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 \ be indexed as follows:$$\begin{array}{|l|l|l|l|} \hline a & b & d & \ \\ \hline 3 & 2 & 1 & 0 \\ \hline \end{array}$ComputetheFOLLOWsetofthenon−terminalBandwritetheindexvaluesforthesymbolsintheFOLLOWsetinthedescendingorder.(Forexample,iftheFOLLOWsetisCompute 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, \)) , then the answer should be 32103210)

Sign in to save attempts.

Loading…