retagged by
514 views
2 votes
2 votes

retagged by

2 Answers

Best answer
0 votes
0 votes

For the first production x,y are attributes, Such that, x ∈  E and y∈ E'.

Now if you look into the translation closely, E'.y =E.x   ( y attribute is taking value from its parent attribute )

E.x =E'.y (x attribute is taking value from one of its child attributes).


For the second production same story goes on and in addition, y is taking values from its parent as well as sibling which left to it (it is L- attributed as well).


So, y follows inherited attribute definition while x follows synthesized attribute definition.

 

Read more attribute grammar

edited by
0 votes
0 votes
When the parent takes value from its child it is known as a synthesized variable.

When Child takes value from its parents or its left siblings it is called inherited variable.
Answer:

Related questions

2 votes
2 votes
2 answers
1
0 votes
0 votes
0 answers
2