edited by
354 views
2 votes
2 votes

Came across this question on SDT in one of the ME mock paper.

Option:

A. Syntax directed definition are L-attributed.

B. Syntax directed definition is not L-attributed because of 2nd rule.

C.Syntax directed definition is not L-attributed because of 1st rule.

D.Syntax directed definition is not L-attributed because of both rule.

Answer given is C that SDT is not L-attributed because of 1st Rule.

I am not sure why it should not be Option D.

My understanding is since A.s is synthesized attribute and it can only be evaluated during the reduction so R.in value cannot be obtained.

I am aware that L - attribute can have inherited attribute which can be evaluated based on its parent and/or left sibling only.

Need your help to correct my approach for this question. Thanks in adance.

edited by

Please log in or register to answer this question.

Related questions

3 votes
3 votes
2 answers
4
Nymeria asked Jan 27, 2018
814 views
A) SDD is L attributed.B) SDD is not L attributed because of Rule 1.C) SDD is L attributed because of Rule 2.D) SDD is L attributed because of both Rule1 and Rule2.