Save as PDF

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

Total No of Questions: 8 [Total No of Printed Pages: 3]
Roll No. ......................

CD-801 (GS)

B.Tech., VIII Semester

Examination, June 2025

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)

Show out the output generated by each phase for the following expression a = (x/y)*(y - x z).

7

निम्नलिखित अभिव्यक्ति a = (x/y)*(y - x z) के लिए प्रत्येक चरण द्वारा उत्पन्न आउटपुट दिखाएँ।

b)

Write a simple Lex program to recognize identifiers.

7

पहचानकर्ताओं को पहचानने के लिए एक सरल लेक्स प्रोग्राम लिखें।

2. a)

Explain how identifiers and keywords are recognized by lexical analysis with an example.

7

एक उदाहरण के साथ बताएँ कि कैसे पहचानकर्ताओं और कीवर्ड को शाब्दिक विश्लेषण द्वारा पहचाना जाता है।

3. a)

Construct the predictive parser for the following grammar:

7

निम्नलिखित व्याकरण के लिए पूर्वानुमानित पार्सर का निर्माण करें।

A → (B) | a

B → B, A | A

b)

Illustrate the differences among SLR, LALR and LR parser.

7

SLR, LALR और LR पार्सर के बीच अंतर स्पष्ट करें।

c)

Construct SLR parsing table for the following grammar:

7

निम्नलिखित व्याकरण के लिए SLR पार्सिंग तालिका का निर्माण करें।

S → S + A | A

A → AB | B

B → B* | a | b

4. a)

Discuss in detail about type conversion with a suitable example.

7

उपयुक्त उदाहरण सहित प्रकार रूपांतरण के बारे में विस्तार से चर्चा करें।

b)

Explain in detail about storage allocation strategies.

7

भंडारण आवंटन रणनीतियों के बारे में विस्तार से बताएँ।

5. a)

Discuss in brief about polymorphic functions.

7

बहुरूपी कार्यों के बारे में संक्षेप में चर्चा करें।

b)

Write a short note on procedure calls.

7

प्रक्रिया कॉल पर एक संक्षिप्��� टिप्पणी लिखें।

6. a)

Discuss in brief about backpatching using flow of control statements with suitable example.

7

उपयुक्त उदाहरण के साथ नियंत्रण कथनों के प्रवाह का उपयोग करके बैकपैचिंग के बारे में संक्षेप में चर्चा करें।

b)

Explain the procedure to convert the following expression in to a DAG:

7

निम्नलिखित अभिव्यक्ति को DAG में बदलने की प्रक्रिया समझाएँ।

a*b+c/(d/e)*d

7. a)

Give a detailed note on loop optimization techniques.

7

लूप अनुकूलन तकनीकों पर एक विस्तृत नोट दें।

b)

Discuss the various characteristics of basic blocks.

7

बुनियादी ब्लॉकों की विभिन्न विशेषताओं पर चर्चा करें।

8.

Explain in detail on any two of the following:

14

निम्नलिखित में से किन्हीं दो पर विस्तार से बताएँ।

a)

Input Buffering

अ) इनपुट बफरिंग

b)

L-attributed definition

ब) L-विशेषीकृत परिभाषा

c)

Overloading of functions

स) कार्यों का अधिभार

d)

Peephole optimization

द) पीपहोल अनुकूलन