0% found this document useful (0 votes)
15 views2 pages

It302 CD 2018 End May

Uploaded by

Manisha Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

It302 CD 2018 End May

Uploaded by

Manisha Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Roll No ...... .

Total No. of Pages _02 _

_Six th_ SEMESTER


8.Tech I IT J

END SEM EST ER EXAMINATION Ma y-2 018

IT-3 02 COMPILER DESIGN

Time: 3:00 Hours Max . Mar ks: 40

Not e : Que stio n 1 is man dato ry


Ans wer any three questions from Q. 2 to Q. 6
Ass ume suitable missing data, if any.

Q. l Answer the following withjustification for your choice


error is-
a) For the C statement "wilhe (n> 10) ...... . ", the type · of
(lexical/syntactic or both?)
b) The grammar is not suitable for ·LL( l)
parsers because ...... .
only if the
c} (True/False) The inherited attributes will be computed
SDD has synthesize~ attributes [Explain Using an example)
d) The grainmar is ·ambiguous or
unambiguous? And why? .
{a[O+i],
e) The ith array element a[i] is translated to ...... ..... Choices:
a+i, a, i}, and why?
(2x5)

express your
Q.2[a] What are the differences of a stack from a heap and
ples,
opinion on the type of languages (static/dynaric) with exam
'for which heap allocation is absolutely required.
[b} Ex-nl~; .... D
e ad
-t '
co de elirru. na .
and its con tlon w1.th an ample
vers io n to ta ex of 3 -addres
r get languag s cod e
e.

(5+ 5)
Q. 3 ( a1 U sin
gexamples of
your own, ex
'shift-reduce plain the term
conflict' and s 'left recurs
create in par an aly se what are the ion ' and
sers. problems the
[b} Construc se tw o
t the NDFA.s
lexical phase for l ) Identif .
iers 2) Keyw
ords 3) relop
for

Q .4 F o r the (5+5)
following gra
mmar

a ) Construc
t th e SDD fo
b ) Con r converting
struct DAG to
postfix notati
for a sample on
two operator string of the
s language inc 1

luding any
1

Q.5 Given (S+S)


the gramma I
r
construct the
Syntax Dire I

parse tree fo c te d D efm ition (SD


r the input str D) a n d th e
ing '3+2-1 '. C annotated
(for instance ompute the attrib
S.value) for ute .value'
Construct th each . node ·of th
e Directed A is tree bott
cyclic Graph om-up.'
(DAG) for th
is string.
'
Q.6 Explain (10)
with example
s of each
a) L-attribute
d SDD vs S-a
: b ) Quadru ttributed SDD
ples vs Triple
s data structu
res

'
(5+5 ) ,

'<

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy