Anna university Examination 2009 Question paper - PRINCIPLES OF COMPILER DESIGN

Started by ganeshbala, Jun 02, 2009, 02:54 AM

previous topic - next topic
Go Down


Anna university Examination 2009 Question paper - PRINCIPLES OF COMPILER DESIGN

Sixth semester
Computer Science and Engineering

(Regulation 2004)

Time:Three hours Maximum:100 marks

Answer All questions

Part A --(10*2=20 marks)

1. What are the issues to be considered in the design of lexical analyzer?

2. Define concrete and abstract syntax with example.

3. Derive the string and construct a syntax tree for the input string ceaedbe using
the grammar S->SaA|A,A->AbB|B,B->cSd|e

4. List the factors to be considered for top-down parsing.

5. Why is it necessary to generate intermediate code instead of generating target
program itself?

6. Define back patching.

7. List the issues in code generation.

8. Write the steps for constructing leaders in basic blocks.

9. What are the issues in static allocation?

10. What is meant by copy-restor?

PART B--(5*16=80)

11. (a) (i) Explain the need for dividing the compilation process into various phases
and explain its functions. (8)

(ii) Explain how abstract stack machine can be used as translators. (8)

(b) What is syntax directed translation? How it is used for translation of expresions?

12. (a) Given the following grammar S->AS|b,A->SA|a Construct a SLR parsing table for
the string baab (16)


(b) Consider the grammar E->E+T,T->T*F,F->(E)\id.Using predictive parsing the string
id+id*id. (16)

13. (a) Explain in detail how three address code are generated and implemented.

(b) Explain the role of declaration statements in intermediate code generation.

14. (a) Design a simple code generator and explain with example.


(b) Write short notes on:

1: Peep hole optimization

2: Issues in code generation

15. (a) Explain with an example how basic blocks are optimized.


(b) Explain the storage allocation strategies used in run time environments.

Go Up

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Please leave this box empty:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: alt+s submit/post or alt+p preview
Network of IT Acumens | GinGly :: SMS Backup | Acumen :: Discussion Board | AshokPillar :: Hosting | CineBuzz :: Latest Cinema News | My Kids Diary :: Capture your kids magical moment
Copyright 2005 - 2016 :: IT Acumens :: All Rights Reserved.
ITAcumens Forum with 2 lakhs post running for 10 years - Powered by HostGator Dedicated Server