GATE CSE SDT, Intermediate Code, Optimization & Code Generation – Compiler Design | Set 1

Questions 6-10 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 6

MCQ · Single Correct 1 mark

Which evaluation order is suitable for evaluating L-attributed Syntax Directed Definitions during parsing?

Answers for question 6

Question 7

MCQ · Single Correct 1 mark

Consider the SDD:

CODE
E -> E1 + T { E.val = E1.val + T.val }
E -> T { E.val = T.val }
T -> num { T.val = num.lexval }
What type of attribute is 'val'?
Answers for question 7

Question 8

MCQ · Single Correct 1 mark

What is a Dependency Graph in the context of Syntax Directed Translation?

Answers for question 8

Question 9

MCQ · Single Correct 1 mark

If a Syntax Directed Definition (SDD) contains a cycle in its Dependency Graph for a given parse tree, what does it imply?

Answers for question 9

Question 10

MCQ · Single Correct 1 mark

Consider the grammar production A -> B C with semantic action { B.$i = A.i + 1$; C.$i = B.s + 1$; A.$s = C.s$; }. Assume 'i' denotes inherited and 's' denotes synthesized. Is this SDD L-attributed?

Answers for question 10
Scroll to Top