The Gateway to Computer Science Excellence
+1 vote

Do L attributed SDT needs to have both synthesized attributes and inherited attributes?

What if we don't have synthesized attributes but inherited attributes (IN WHICH VALUE IS TAKEN FROM LEFT SIBLING ONLY) then is it L- attributed SDT?

in Compiler Design by Loyal (8.5k points) | 160 views

i think yes still it will be L- attributed SDT, it is not necessary that  L- attributed SDT should have both synthesized attributes and inherited attributes it could have either of them or can be both

1 Answer

+3 votes
Best answer
Its not compulsion that L attributed SDT should have both synthesis and inherited at the same time means.... both synthesis and inherited  allowed...... but its not STRICT condition that they must be at the same time.....

so SDT is called L-attributed if ....

1)it may have  synthesis attributes only ...

2) it may have inherited attributes only..

3)it may contain both synthesis and inherited attributes....

ALL above are L-attribute SDTS
by Boss (11k points)
selected by
@Sushant Yadav 1

if L-attributed may have  synthesis attributes only then I think it would become s-attributed.

So how to distinguish?
every S attributed is L attributed
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,689 answers
107,253 users