Save as PDF

Opens your browser print dialog — select "Save as PDF" to download.

AD-604 (C) (GS)
[2]
B.Tech. VI Semester
Examination, May 2024
Grading System (GS)
Compiler Design
Time : Three Hours
Maximum Marks : 70

Note: i) Attempt any five questions.
किन्हीं पाँच प्रश्नों को हल कीजिए।

ii) All questions carry equal marks.
सभी प्रश्नों के समान अंक हैं।

iii) In case of any doubt or dispute the English version question should be treated as final.
किसी भी प्रकार के संदेह अथवा विवाद की स्थिति में अंग्रेजी भाषा के प्रश्न को अंतिम माना जायेगा।

1. a)
Explain input buffering with example. Discuss about lexical errors in detail. (8)
इनपुट बफरिंग को उदाहरण सहित समझाइए। लेक्सिकल एरर को समझाइए।
b)
What is Lexical Analyzer? Explain role of Lexical analyzer. (6)
लेक्सिकल एनालाइजर क्या है? लेक्सिकल एनालाइजर की भूमिका की व्याख्या कीजिए।
2.
Compute LR(0) items for the following grammar and construct SLR Parser table. (14)
निम्नलिखित व्याकरण के लिए LR(0) मदों की गणना करें और SLR पार्सर तालिका का निर्माण करें।
S→L=R | R
L→*R | id
R→L
3. a)
Explain different polymorphic functions with example. (8)
विभिन्न बहुरूपी कार्यों को उदाहरण सहित समझाइए।
b)
Explain different dynamic allocation strategies. (6)
विभिन्न गतिशील आवंटन रणनीतियों की व्याख्या करें।
4. a)
Describe what is DAG? Construct DAG for the following basic blocks: (8)
DAG क्या है ? निम्नलिखित बुनियादी ब्लॉकों के लिए DAG का निर्माण करें।
D:=B*C; E:=A+B; B:=B+C; A:=E-D;
b)
Explain about peephole optimization with example. (6)
पीपहोल ऑप्टिमाइजेशन के बारे में उदाहरण के साथ समझाइए।
5. a)
Explain different code improving transformation. (6)
रूपांतरण में सुधार करने वाले विभिन्न कोडो को समझाइए।
b)
Define code optimization. Explain function preserving code optimization. (8)
कोड ऑप्टिमाइजेशन को परिभाषित कीजिए। कोड ऑप्टिमाइजेशन को संरक्षित करने वाले फंक्शन को समझाइए।
6. a)
Define parsing. Explain types of Top down parsing. (6)
पार्सिंग को परिभाषित करें। टॉप डाउन पार्सिंग के प्रकारों की व्य���ख्या करें।
b)
Explain Recursive Descent parsing method with example. (8)
उदाहरण के साथ रिकर्सिव डिसेंट पार्सिंग विधि की व्याख्या करें।
7. a)
Explain L-attribute definition with suitable example. (8)
L-विशेषता की परिभाषा को उदाहरण सहित समझाइए।
b)
Explain Register allocation and assignment with suitable example. (6)
उदाहरण के साथ रजिस्टर आवंटन और असाइनमेंट की व्याख्या करें।
8.
Write a short note on following: (14)
निम्नलिखित पर संक्षिप्त टिप्पणी लिखिए।
  1. Symbol table
    अ) प्रतीक तालिका
  2. Type checking
    ब) टाइप चेकिंग
  3. Loop optimization
    स) लूप ऑप्टिमाइजेशन
  4. Constant folding
    द) निरंतर फोल्डिंग