3,678 views
4 votes
4 votes

image

How to solve this question?

Attributes calculated from children are synthesized, while attributes calculated from parents and/or siblings is inherited. And S-attributed are purely synthesized, while L-attributed are synthesized+inherited, is this right?

2 Answers

Best answer
14 votes
14 votes
Answer is D.

In S-attribute grammar we can have only synthesized attributes.

In L-attribute grammar we can have both synthesized as well as inherited attributes, but the inherited attributes must come from left side (not from right side) only. Here, $R_i = T_i, F_i = R_i, E_i = F_i$ violate this making this not L-attributed grammar,
selected by

Related questions

0 votes
0 votes
1 answer
2
1 votes
1 votes
2 answers
3
1 votes
1 votes
1 answer
4