Compiler Design and Construction (Model Question) Course Title: Compiler Design and Construction Full Marks: 60 Course No: CSC365 Pass Marks: 24 Semester: VI Time: 3 Hrs.

                                                       **Section A**

Attempt any TWO questions. (2 × 10 = 20

  1. Differentiate between top-down and bottom-up parsing methods. Construct SLR parse table for the following grammar.

S->aETe E->Ebc E->b T->d

  1. What are static and dynamic type checking? Write SDD to carry out type checking for the following expression. E->id |E1 op E2 | E1 relop E2 | E1[E2] | E1↑
  1. What is the role of intermediate code generation in the entire compilation process? Convert the following into three address code. a+(b-c)*d

Attempt any EIGHT questions. (8 × 5 = 40)