Consider the following translation scheme:
$S \rightarrow R + E\{S.val = R.val + E.val\}$
$R \rightarrow R * E\{R.val = R.val + E.val\}$
$E \rightarrow F \{E.val + F.val\}$
$F \rightarrow id\{F.val = id.val\}$
The above SDT is___________.
(A) S-attributed grammar but not L-attributed
(B) L-attributed grammar but not S-attributed
(C) Both S-attributed and L-attributed grammar
(D) None of the above