NAT · 1 mark · Parsing

GATE CS 2019 CS — Q19

Consider the grammar given below:
S→AaS \to Aa
A→BDA \to BD
B→b∣ϵB \to b \mid \epsilon
D→d∣ϵD \to d \mid \epsilon

Let a,b,d,a, b, d, and $\$ be indexed as follows:
abd$\$
3210
Compute the FOLLOW set of the non-terminal BB 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, \$\}, then the answer should be 3210)
Answer: __________.