0% found this document useful (0 votes)
38 views

Compiler Design Feb 2022

The document is a past exam paper for the Compiler Design course. It contains 10 questions across 5 units on topics related to compilers: - The first question asks about phases of a compiler and the role of transition diagrams in lexical analysis. - The second question asks students to write a parser for a grammar and explain shift-reduce parsing. - Symbol tables, intermediate code representations, and code generation techniques like static/dynamic storage allocation are covered in the third section. - Memory organization, activation records, and code optimization are addressed in the last two units. - Students must answer 5 questions, selecting one from each unit, within the 3 hour exam timeframe.

Uploaded by

Rajiya Shaik
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)
38 views

Compiler Design Feb 2022

The document is a past exam paper for the Compiler Design course. It contains 10 questions across 5 units on topics related to compilers: - The first question asks about phases of a compiler and the role of transition diagrams in lexical analysis. - The second question asks students to write a parser for a grammar and explain shift-reduce parsing. - Symbol tables, intermediate code representations, and code generation techniques like static/dynamic storage allocation are covered in the third section. - Memory organization, activation records, and code optimization are addressed in the last two units. - Students must answer 5 questions, selecting one from each unit, within the 3 hour exam timeframe.

Uploaded by

Rajiya Shaik
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/ 2

Code No: R1931053 R19 SET - 1

III B. Tech I Semester Regular Examinations, February-2022


COMPILER DESIGN
(Computer Science and Engineering)
Time: 3 hours Max. Marks: 75
Answer any FIVE Questions ONE Question from Each unit
All Questions Carry Equal Marks
*****

UNIT-I
1. a) Explain different phases of a compiler with a neat diagram. [8M]
b) What is the role of transition diagrams in the construction of [7M]
lexical analyzer?
(OR)
2. a) Write a pseudo code to recognize the identifiers and keywords. [8M]
b) Explain how input buffering helps to speed up the reading of [7M]
source program.
UNIT-II
3. a) Explain the parsing techniques with a hierarchical diagram. [8M]
b) Write Recursive Decent parser for the grammar S→cAd, [7M]
A→ab|a.
(OR)
4. a) Differentiate Top Down parsing and Bottom Up Parsing. [8M]
b) Consider the grammar: [7M]
E→ E+E
E→ E*E
E→id
Perform shift reduce parsing of the input string “id1+id2+id3”.
UNIT-III
5. a) Explain various data structures used for implementing symbol [8M]
tables
b) Illustrate how the SDT scheme is used for assignment [7M]
statements to generate the intermediate code.
(OR)
6. a) Write the short note on: [8M]
(i) Abstract syntax tree
(ii) Polish notation
(iii) Three address code
(iv) Back patching

1 of 2

|'''|'|'|''||'''|''|
Code No: R1931053 R19 SET - 1

b) Write quadruples, triples and indirect triples for the [7M]


expression: -(a*b)+(c+d)-(a+b+c+d)
UNIT-IV
7. a) Illustrate the storage organization memory in the perspective of [8M]
compiler writer with neat diagram.
b) Distinguish between Static and Dynamic storage allocation. [7M]
(OR)
8. a) What is activation record? Write the various fields of Activation [8M]
Record.
b) Write the definition of symbol table and procedure to store the [7M]
names in symbol table.
UNIT-V
9. a) Write about all issues in code generation. Describe it. [8M]
b) Explain the peephole optimization Technique? [7M]
(OR)
10. What is code optimization? Compare machine dependent and [15M]
independent code optimization techniques.

*****

2 of 2

|'''|'|'|''||'''|''|

You might also like