Trending ▼   ResFinder  

2003 Course Principles of Compiler Design

3 pages, 29 questions, 0 questions with responses, 0 total responses,    0    0
pune_eng
  
+Fave Message
 Home > pune_eng >

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

Total No. of Questions : 12] P952 [Total No. of Pages : 3 [3664]-337 B.E. (Computer Engg.) PRINCIPLES OF COMPILER DESIGN (2003 Course) (410444) Time : 3 Hours] [Max. Marks : 100 Instructions to the candidates : 1) Answers to the two sections should be written in separate answer books. 2) Neat diagrams must be drawn wherever necessary. 3) Figures to the right indicate full marks. 4) Your answers will be valued as a whole. 5) Assume suitable data, if necessary. SECTION - I Q1) a) b) Q2) a) b) c) Write a Lex specification to read a C program and calculate number of new line characters, tabs and white spaces in the program. [8] Whether lexical analysis detects any errors? Explain with example. [8] OR Explain with example various Compiler Construction tools. [9] Why compilation phases are divided into front-end and back-end? What are the advantages? [4] Explain the following: i) token. [3] ii) pattern. iii) lexeme. Q3) a) Show that the following grammar is LR(1) but not LALR(1). [10] S Aa | bAc | Bc | bBa A d b) Q4) a) B d Explain Recursive Descent parser with an example. OR Show that following grammar is LL(1) but not SLR(1). S AaAb | BbBa [8] [8] A B P.T.O. b) What is Shift-Reduce and Reduce-Reduce conflict? How these can be resolved? With examples explain in which condition S-R and R-R conflict can occur in SLR, canonical LR and LALR parsers. (Make use of LR(0), LR(1) items). [10] Q5) a) Write a translation scheme to generate three address code for assignment sentences with array and pointer references. [8] b) Explain concept of back-patching with example. [8] OR Q6) a) Translate executable sentences of the following C program. [8] main ( ) { int i = 1; int a[10]; while(i <= 10) { a[i]=0; i = i + 1; } } into a) b) postfix notation c) b) syntax tree three-address code. What are synthesized and inherited attributes? What are Marker Nonterminal symbols? Give example. [8] SECTION - II Q7) a) b) With example explain different parameter passing methods. [8] Explain Runtime support and Storage organization. [8] OR Q8) a) b) What are different storage allocation strategies? Explain anyone in detail. [8] What is "Display" mechanism? Explain it with example. [3664] - 337 2 [8] Q9) a) What is a basic block and flow graph? Generate three address code for the following program. Find the basic blocks in it and write flow graph for the same. begin prod : = 0; i : = 1; do begin prod : = prod + a [i] * b[i]; i : = i + 1; end while i <= 20 end b) Q10)a) [8] What is next use information explain in detail. [8] OR Explain peephole optimization in detail. [8] b) What is a DAG? Explain role of a DAG in code generation phase. [8] Q11)a) What is the need of code optimization? Discuss principal sources of code optimization. [10] b) Discuss algorithm for live variable analysis. [8] OR Q12)a) Enlist and explain with example various transformations on basic blocks. [8] b) With example explain what is Global Common Sub-expression? Write algorithm for Global Common Sub-expression Elimination. [10] Y [3664] - 337 3

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : Pune, Engineering, University of Pune, Engineering question papers, Pune University, previous year question papers, question papers, india, model question paper, pune university paper pattern, pune university syllabus, old question papers  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

pune_eng chat