CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the productions APQ and AXY. Each of the five non-terminals A, P, Q, X and Y has two attributes: s is a synthesized attribute, and i is an inherited attribute. Consider the following rules.
Rule 1: P.i = A.i + 2, Q.i = P.i + A.i and A.s = P.s + Q.s
Rule 2: X.i = A.i + Y.s and Y.i = X.s + A.i

Which one of the following is TRUE?

A
Both Rule 1 and Rule 2 are L-attributed.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Only Rule 2 is L-attributed.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Neither Rule 1 nor Rule 2 is L-attributed.
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Only Rule 1 is L-attributed.
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Join BYJU'S Learning Program
CrossIcon