Parsing & Syntax Analysis


Answer & solution
Answer: Option letters unresolved; LFOLLOW may differ, and RFOLLOW=FOLLOW under a productive-grammar convention (no official key was published)
Restricted derivations yield subsets of the ordinary FOLLOW set. For S→AB, A→a, B→b, ordinary and rightmost derivations expose Ab, so b belongs to FOLLOW(A) and RFOLLOW(A). Leftmost derivations must expand A before B, so LFOLLOW(A) is empty. This refutes the choices asserting all three always identical or all three always different. For productive grammars, rightmost derivations can realize the needed right context, giving RFOLLOW=FOLLOW. Without that convention, S→XB, X→Ab, B→B gives FOLLOW(A) containing b but no rightmost occurrence of A. Since A/B repeat the unqualified name FOLLOW in both copies, their intended exact comparisons and letters are not reconstructed silently.