• retagged by
4,582 views

1 Answer

Best answer
9 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
Position:
Show:

Related questions

5 5 votes
1 1 answer
4.4k
4.4k views
srestha asked Dec 28, 2017
4,390 views
Match the following1) L attributed definition 1)Top down parsing2) S attributed definition 2) Bottom up parsing ...
0 0 votes
1 1 answer
1.8k
1.8k views
srestha asked Dec 26, 2017
1,833 views
Which of the following is true?(A) Every L attributed definition is S attributed(B) Every S attributed definition is L attributed
4 4 votes
2 answers 2 answers
5.2k
5.2k views
Purple asked Jan 27, 2016
5,207 views
How to solve this question?Attributes calculated from children are synthesized, while attributes calculated from parents and/or siblings is inherited. And S-attributed ar...
1 1 vote
1 1 answer
1.6k
1.6k views
KISHALAY DAS asked Nov 14, 2016
1,556 views
Consider the following translation rules:\[\begin{array}{l}\mathrm{S} \rightarrow \mathrm{~A} \quad\{\mathrm{~A} . \text { val }=0\} \\\mathrm{A} \rightarrow \mathrm{~A}_...