You are on page 1of 3

Total No. of Questions : 8] [1] [Total No.

of Printed Pages : 3

Roll No ..................................
CS-603(C)-CBGS
B.Tech., VI Semester
Examination, December 2020
Choice Based Grading System (CBGS)
Compiler Design
Time : Three Hours
Maximum Marks : 70
Note: i) Attempt any five questions.
{H$Ýht nm±M àíZm| H$mo hb H$s{OE&
ii) All questions carry equal marks.
g^r àíZm| Ho$ g_mZ A§H$ h¢&
iii) In case of any doubt or dispute the English version
question should be treated as final.
{H$gr ^r àH$ma Ho$ g§Xoh AWdm {ddmX H$s pñW{V ‘| A§J«oOr ^mfm
Ho$ àíZ H$mo A§{V‘ ‘mZm Om¶oJm&
1. a) Describe the various data structures used in Compilers.
g§H$bH$ ‘| à¶w³V {d{^Þ S>oQ>m g§aMZmAm| H$m dU©Z H$a|&
b) What are Compiler construction tools? Write note on each
compiler construction tool.
g§H$bH$ {Z‘m©U CnH$aU ³¶m h¢? à˶oH$ g§H$bH$ {Z‘m©U CnH$aU
na ZmoQ> {bI|&
2. a) Explain in detail the various phases of compiler with an
example.
EH$ CXmhaU Ho$ gmW g§H$bH$ Ho$ {d{^Þ MaUm| Ho$ ~mao ‘| {dñVma
go ~VmBE&
CS-603(C)-CBGS PTO

https://www.rgpvonline.com
[2]

b) Define :
n[a^m{fV H$a| :
i) Tokens
ii) Input buffering
iii) LEX
3. a) Explain the various errors encountered in different phases
of Compiler.
g§H$bH$ Ho$ {d{^Þ MaUm§o ‘| AmB© {d{^Þ Ìw{Q>¶m| H$s ì¶m»¶m H$s{OE&
b) Differentiate :
A§Va H$amo :
i) Top down Vs Bottom up parsing
ii) Predictive Vs Operator precedence parsing
4. a) Construct a Syntax Directed Translation Scheme that
translates arithmetic expressions from infix into postfix
notation.
EH$ qgQ>o³g S>m¶ao³Q>oS> Q´>m§gboeZ ñH$s‘ H$m {Z‘m©U H$aZm Omo
BpÝ’$³g go A§H$J{UVr¶ A{^ì¶{³V¶m| H$mo nmoñQ>{’$³g ZmoQ>e
o Z ‘|
AZwdmX H$aVm h¡&
b) Explain the symbol table management system.
àVrH$ Vm{bH$m à~§YZ àUmbr H$s ì¶m»¶m H$a|&
5. a) Check whether the given grammar is LL(1) or not
Om±Mo {H$ {X¶m J¶m ì¶mH$aU Eb Eb (1) h¡ ¶m Zht
S → iEt SS' / a
S' → eS / E
E→b
b) Explain in detail different dynamic storage allocation
strategies.
{d{^Þ J{Verb ^§S>maU Amd§Q>Z aUZr{V¶m| Ho$ ~mao ‘| {dñVma go
~VmB¶o&
CS-603(C)-CBGS Contd...
PTO

https://www.rgpvonline.com
[3]

6. a) Construct DAG for the following expression :


{ZåZ{b{IV A{^ì¶{³V Ho$ {bE DAG H$m {Z‘m©U H$a| :
a + a * (b – c) + (b – c) * d
b) Discuss the issues in design of Code generator.
H$moS> OZaoQ>a Ho$ {S>μOmBZ ‘o§ ‘wÔm| na MMm© H$a|&
7. a) Explain the following with example.
CXmhaU Ho$ gmW {ZåZ{b{IV H$s ì¶m»¶m H$a|&
i) Strength reduction
ii) Variable propagation
iii) Common sub expression elimination
b) Describe Peephole optimization briefly. Also explain
Backpatching.
g§jon ‘| Peephole AZwHy$bZ H$m dU©Z H$a|? Backpatching ^r
g‘PmBE&
8. a) Explain the basic block and control flow graph.
Basic ãbm°H$ Am¡a {Z¶§ÌU àdmh J«m’$ H$s ì¶m»¶m H$a|&
b) Explain data flow analysis of structure flow graph.
g§aMZm àdmh J«m’$ Ho$ S>oQ>m àdmh {díbofU H$s ì¶m»¶m H$a|&
******

CS-603(C)-CBGS PTO

https://www.rgpvonline.com

You might also like