Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2K views6 pages

Compiler Construction Paper

This document contains 5 questions related to compiler design. Each question has two parts (a) and (b) with different topics related to compilers. The topics covered include regular expressions, phases of a compiler, SLR parsing, syntax directed translation, parameter passing methods, global optimization, intermediate code generation, register allocation, and symbol table organization. Students are required to answer all 5 questions, with each question carrying 12 marks.

Uploaded by

Lulu Tojeen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views6 pages

Compiler Construction Paper

This document contains 5 questions related to compiler design. Each question has two parts (a) and (b) with different topics related to compilers. The topics covered include regular expressions, phases of a compiler, SLR parsing, syntax directed translation, parameter passing methods, global optimization, intermediate code generation, register allocation, and symbol table organization. Students are required to answer all 5 questions, with each question carrying 12 marks.

Uploaded by

Lulu Tojeen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

(Improvement/Su

pplementary)

[2010 admissions]

Answer all questions.


Each question carries 3 marks.

Answer all questions.


Each question carries 5 marks.

if

(i < j)

switch (i)
{

case 1 : j

j +1;

Break;
case 2 : j

j +2;

case 3 : j = j + 3 ;
Break;
default:} = 0;
}

Answer all questions.


Each question carries 12 marks.
11. (a) For the following regular expression, draw the NFA and convert it into DFA:

Or

(b) Explain in detail the various phases of a compiler.


12. (a) Given the following already augmented grammar:
S'~S
S~ABIAAlbC
A~bCalb
B~BdIE
C~c
Construct a SLR (1) parser and show the moves of the parser for the input bdd.
Or
(b) Write the top-down parser for the followinggrammar after rewriting it in the required format.

13. (a) Write syntax directed translation to convert:


(i) Assignment statements.
(ii) Relational expressions.
(iii) For statements to three address code.
Or
(b) List the different parameter passing methods. Discuss each one of them.
14. (a) Write and explain the Global optimization techniques.
Or
(b) Explain how temporaries are manipulated in intermediate code generation.
15. (a) (i) Explain the concept of next use information and its significance in code generation.
(ii) Write an algorithm for the allocation of registers.
Or
(b) Explain the different data structures used for symbol table organization.
[5 x 12 = 60 marks]

(lm provement/Supplementary)
[2010 admissions]

Answer all questions.


Each question carries 3 marks.

Answer all questions.


Each question carries 5 marks.

if(i<j)
{

switch (i)
{

case 1 : j = j + 1 ;
Break;
case 2 : j = j + 2 ;
case 3 : j

j +~ ;

Break;
default:j

~ 0;

Answer all questions.


Each question carries 12 marks.

11. (a) For the following regular expression, draw the NFA and convert it into DFA:

Or

.(b) Explain in detail the various phases of a compiler.


12. (a) Given the following already augmented grammar:
S'~S
S~ABIAAlbC
A~bCalb
B~BdIE
C~c
Construct a SLR (1) parser and show the moves of the parser for the input bdd.
Or

(b) Write the top-down parser for the following grammar after rewriting it in the required format.

13. (a) Write syntax directed translation to convert:


(i) Assignment statements.
(ii) Relational expressions.
(iii) For statements to three address code.
Or
(b) List the different parameter passing methods. Discuss each one of them.
14. (a) Write and explain the Global optimization techniques.
Or
(b) Explain how temporaries are manipulated in intermediate code generation.
15. (a) (i) Explain the'concept of next use information and its significance in code generation.
(ii) Write an algorithm for the allocation of registers.
Or
(b) Explain the different data structures used for symbol table organization.
[5 x 12

= 60 marks]

You might also like