Btech Cs It 5 Sem Compiler Design 510402 2022

You might also like

Download as pdf
Download as pdf
You are on page 1of 3
Roll Ne Totat No. of Pages: |3 510402/510902 B. Tech. V - Sem, (Main/Back) Exam., (Academic Session 2021- 2022) Computer Science & Engineering 5CS4 ~ 02/51T4-02 Compiler Design Common With CSE & IT 510402/510902 Maximum Marks: 120 Min. Passing Marks: Time: 3 Hours Instructions to Candidates: Part - A: Short answer questions (up to 25 words) 10 x 2 marks = 20 marks. All ten questions are compulsory. Part ~ B: Analytical/Problem solving questions 5 x 8 marks = 40 marks. Candidates have to answer five questions out of seven. Part — C: Descriptive/Analytical/Problem Sot ving questions 4 x15 marks = 60 marks. Candidates have to answer four questions out of five. Schematic diagrams must be shown wherever necessary. Any data you feel missing may suitably be assumed and stated clearly. Units of quantities used/calculated must be stated clearly. Use of following supporting material is permitted during examination. (Mentioned in form No. 205) 1. NIL 2. NIL PART-A Q.1 What is the difference between compiler and interpreter? Q.2. Define annotated parse tree. 2) Q.3. What is dangling reference? RI Q.4 Define the “Scope” of a binding (of an identifier to an entity). 12] Q5_ Give one example of a typical synthesized attribute. [2] [510402/510902] Page 1 of 3 https://www.btubikaner.com Q6 Q7 Qs Define the following terms and give suitable example for it - : (2) QQ) Handle (2) Handle pruning Define S-R conflict. [2] Define the following terms and give suitable example for it - (2] (1) Augmented Grammar 2) LR (0) Item Q9 Draw DAG for the statement x =(a+b)* (a+b +c)*(a+b4c4d). 2] Q.10 Describe stack allocation strategy. 2] PART -B QI What do you mean by ambiguous gramntar? Show that following is an ambiguous grammar - (8) Q2 Q3 Q5 E E+E |E*E| E-E| E/E! (B) lid Generate LL (1) parsing table for given Grammar - S > iEtS |iEtSeSla E~b o Is Grammar LL(1) or not? (8] What is left recursion? Eliminate the left recursion from the following grammar - E>E+TIT TOT*FIF F3(@)lid [8] Compute the operator precedence relation table and precedence relation graph for given grammar - aa (8) GroE EOE+T TOT*F Foid Find FIRST and FOLLOW set for given grammar - S— ACBICbB Ba, A > dal BC, Bx> gle,Cohle [8] [510402/510902] Page 2 of 3 https://www.btubikaner.com Q6 Convert the following statement to three address code and prepare the Quadruples and Triples for the obtained three address code. (8) doi=i+1; while (a

You might also like