Correct option is C
1.
Understanding the Grammar:
· The non-terminal T produces Qx, where Q produces RS.
· The non-terminal R has productions y and ε.
· The non-terminal S has productions z and ε.
2.
Finding the FOLLOW Set for R:
· Since R is part of the production Q → RS, the FOLLOW(S) will contribute to FOLLOW(R).
· FOLLOW(S) includes {x, z} because S appears in Q → RS and Q is followed by x in T → Qx.
3. Conclusion:
· Thus, FOLLOW(R) includes both {z, x}, since x follows Q in T → Qx and z is part of S.
Information Booster:
FOLLOW Sets: Used in parsing to determine which symbols can follow a particular non-terminal in derivations.
Additional Knowledge:
· The terminal y does not appear in FOLLOW(R) because it’s part of R's own production and doesn’t follow R directly in any rule.
· Option (d) {ε} is incorrect because the FOLLOW set includes actual terminals, not empty strings.