0% found this document useful (0 votes)
180 views2 pages

CS8602 Compiler Design

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

www.binils.

com
Anna University | Polytechnic | Schools
Reg. No. :

Question Paper Code : 40399

B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2021.

Sixth Semester

Computer Science and Engineering

CS 8602 –– COMPILER DESIGN

(Regulations 2017)

Time : Three hours Maximum : 100 marks

Answer ALL questions.

PART A — (10  2 = 20 marks)

1. What do you mean by cross-compiler?

2.

3. www.binils.com
State the interactions between the lexical analyzer and the parser.

What are kernel and non-kernel items?

4. Define ambiguous Grammar.

5. Express the rule for checking the type of a function.

6. State the type expressions.

7. List the different storage allocation strategies.

8. Mention the fields in an Activation record.

9. What are the structure preserving transformations on basic blocks?

10. Point out the characteristics of peephole optimization.

PART B — (5  13 = 65 marks)

11. (a) Describe the various phases of compiler with suitable example. (13)

Or
(b) (i) How a finite automaton is used to represent tokens and perform
lexical analysis with examples. (7)
(ii) Compare and Contrast NFA and DFA. (6)

www.binils.com
Anna University, Polytechnic & Schools
www.binils.com
Anna University | Polytechnic | Schools
12. (a) (i) What is SLR (1) parser. Describe the Steps for the SLR parser. (7)

(ii) Give a rightmost derivation for (a, (a, a)) and show the handle of
each right- sentential form. (6)

Or
(b) Describe the LR parsing algorithm with an example. (13)

13. (a) Elucidate the variants of Syntax tree with suitable examples. (13)

Or
(b) (i) Write an algorithm for unification with its operation. (6)
(ii) Discuss in detail about Translation of array reference. (7)

14. (a) Discuss in detail about stack allocation space of memory and the usage of
stack in the memory allocation. (13)

Or
(b) Elaborate the various issues in code generation with examples. (13)

15. (a) (i) Formulate the steps for efficient Data Flow algorithm. (7)

(ii) Describe the representation of array using DAG with example. (6)

www.binils.com
Or
(b) Summarize in detail about the global dataflow analysis with example.(13)

PART C — (1  15 = 15 marks)

16. (a) Find transition diagrams for the following regular expression and regular
definition. (15)
• a(a|b)*a
• ((|a)b*)*
• All strings of digits with at most one repeated digit.
• All strings of a’s and b’s that do not contain the substring abb.
• All strings of a’s and b’s that do not contain the subsequence abb.

Or
(b) Apply code generation algorithm to generate a code sequence for the
three address statement for the following assignment statement. (15)
D : a  b * a  c   a  c  .

————––––——

2 40399

www.binils.com
Anna University, Polytechnic & Schools

You might also like