Similar questions 3 more →
Parsing & Syntax Analysis

Your answer
Answer & solution
Official answer: C
Step through it (13 steps)
1. FOLLOW(Q) contains terminal symbols that can occur immediately after a derivation of Q, not the next nonterminal’s name. Its only occurrence is in P→xQRS.
2. R can produce w, placing w immediately after Q. It can also disappear through ε, exposing S, which produces y.
3. S is not nullable, so Q never reaches the end of this production and no end marker is inherited. FOLLOW(Q)={w,y}, C.