Consider the productions and . Each of the five non-terminals A, P, Q, X and Y has two attributes: is a synthesized attribute, and is an inherited attribute. Consider the following rules.
Rule 1: , and
Rule 2: and
Which one of the following is TRUE?
- ABoth Rule 1 and Rule 2 are L-attributed.
- BOnly Rule 1 is L-attributed.
- COnly Rule 2 is L-attributed.
- DNeither Rule 1 nor Rule 2 is L-attributed.

