retagged by
3,926 views

1 Answer

Best answer
9 votes
9 votes

Ans C)

If a attribute taking valuefrom it's children, then it is called Synthesized Attribute. S attribute contains Synthesized Attribute.

Now, $E.val=E_{1}.val+T.val$

Here E is taking value from it's children.

$E.val=T.val$

Here E taking value from T, i.e. from it's children.

$T.val=id$

Same case here too.

So, this grammar is S attributed. If a grammar is S attributed, then it must be L attri buted. But if a grammar is L attributed, then it may or maynot be S attributed

selected by

Related questions

5 votes
5 votes
1 answer
1
srestha asked Dec 28, 2017
3,373 views
Match the following1) L attributed definition 1)Top down parsing2) S attributed definition 2) Bottom up parsing ...
0 votes
0 votes
1 answer
2
srestha asked Dec 26, 2017
1,425 views
Which of the following is true?(A) Every L attributed definition is S attributed(B) Every S attributed definition is L attributed
4 votes
4 votes
2 answers
3
1 votes
1 votes
1 answer
4