GATE Computer Science (CS) 2019 Solved Papers

© examsiri.com
Question : 46 of 65
 
Marks: +1, -0
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let X1,X2,X3 X4,X5, and X6 be the placeholders for the non-terminals D,T,L or L1 in the following table:
Production rule Semantic action
D→TLX1. type =X2.type
T→ intT.type = int
T.type = intt.type = float
L→L1, idX3.type =X4.type and Type (id.type, X5.type)
L→idadd Type(id.entry, X6.type)
Which one of the following are the appropriate choices for X1,X2,X3 and X4 ?
Go to Question: