Similar questions 7 more →
Parsing & Syntax Analysis

Answer & solution
Official answer: A
Step through it (2 parts)
FIRST(R)={c,ε}, so FIRST(Rf)={c, f}; both numbered S-row cells contain S→Rf. From R→caTR, c belongs to FOLLOW(T), and nullable R carries FOLLOW(R)={f} into FOLLOW(T). From S→daT and T→aS, the start marker $ also reaches FOLLOW(T). Thus FOLLOW(T)={c, f,$}, and the numbered T-row cells at c and $ contain T→ε. Therefore A.
The FIRST rule puts A→α in every terminal column of FIRST(α) except ε. When α is nullable, put it in all FOLLOW(A) columns. For S→Rf, R can start with c or disappear, exposing f. For T→ε, the c column comes from T followed by R in R→caTR; the f column comes from the following nullable R and S→Rf; the end marker flows from start S through S→daT. No guessed table entry is needed once these sets are computed.