Consider the following attributed grammar
S → A + B { S.val = A.val + B.val }
A → id { A.val = id.val }
B → id { B.val = id.val }
1
SDT is L-attributed only
2
SDT is S-attributed only
3
SDT is L-attributed and S-attributed
4
None of these
Consider the following attributed grammar
S → A + B { S.val = A.val + B.val }
A → id { A.val = id.val }
B → id { B.val = id.val }