Question Paper Code : 20873
B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2023.
Fifth Semester
Computer Science and Engineering
CS 3501 — COMPILER DESIGN
(Common to : )
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
Define compiler.
- 2.
What is finite automata?
- 3.
What are the goals of error handler in a parser?
- 4.
Define a parse tree.
- 5.
What is meant by Back patching?
- 6.
What is meant by Type Checking?
- 7.
Define symbol table.
- 8.
What is a flow graph? Give example.
- 9.
What is DAG? Give example.
- 10.
What is basic block?
PART B — (5 × 13 = 65 marks)
- 11.(a)
What are the phases of the compiler? Explain each phase in detail.
- Or
- (b)
Briefly discuss about Role of Lexical Analyzer.
- 12.(a)
Briefly discuss about Design of a syntax Analyzer for a sample language.
- Or
- (b)
Explain the LR parsing algorithm with an example.
- 13.(a)
Explain in detail about Design of predictive translator.
- Or
- (b)
Discuss the address code and its implementation, with example.
- 14.(a)
Discuss about the run time storage management of a code generator in detail.
- Or
- (b)
What are the issues in the design of the code generator? Explain in detail.
- 15.(a)
Explain the principle sources of code optimization in detail.
- Or
- (b)
Discuss the DAG representation of the basic block with an example.
PART C — (1 × 15 = 15 marks)
- 16.(a)
How the context free grammar will work and compare various parser techniques performance using various code blocks?
- Or
- (b)
How the data flow optimization can be done and compare the features?