lowing Paper ID and Roll No. to be filled in yourAnswer Book
B.Tech. (sEM. VD THEORY EXAMTNATTON 20 l 3- 1 4
COMPILERDESIGN Time
:3 Hours
Note :-
(1)
Total Marl
:
100
Atternpt all questions. Each question carries equal marks.
(2) l.
Be precise and to the point while answering.
Attempt any four parts
:
(5x4=20)
(a) Describe the synthesis-analysis model ofcompiler. (b) What are different compiler tools ? Discuss any two. (c) Remove left recursion from the grammar E-+E(r)lT T+T(F)lF F-+id
(d)
What do you mean by ambiguous grammar ? Show that the follorving grammar is ambiguous.
S+aSbSlbSaSle (e) Define boot-strapping with the help of an example.
(0 2.
Explain the term token, lexeme and Pattern.
Attempt any two parts
(a)
:
(10x2=20)
What do you mean by operator precedence grammar ?
ECS60,/DQJ-2t7s2
[Turn Over
Compute the operator precedence table for the given grammar.
E-+E+TlT
T+T*FlF F+(E)lid
(b) Differentiate
between Recursive Decent Parsing and Predietive Parsing. Derive the LL (l) parsing table for the following grammar bexpr
+ bexpr or bterm I bterm
bterm -+ bterm and bfactor I bfactor bfactor -+ not bfactor | (bexpr) | true I false
(c)
Showthatthe following grammar
S+AalbAclBclbBa A-+d il
B+d is L R
3.
(l)
but not LALR
Attempt any two parts
(l).
:
(10x2=20)
(a) Define Syntax Directed Translation. Construct annonated parse tree for the expression
(4 * 7 + l)
an
+ 2,
using the simple desk calculator grammar.
(b) What are different ways to write three address code ? Write the three address code forthe following code segment
WhileA
ifA=lthenC=g+l else while A < = D do
ECS603IDQJan52
A= A+
2.
:
(c)
Define backpatching and semantic rules for boolean expression. Derive the three address code for the following expression
P
4.
Attempt any two parts
(10x2=20)
:
(a)
What is the role of synrbol table ? Discuss different data structures used for symbol table.
(b)
What are lexical phase errors, syntactic phase erors and semantic phase errors ? Explain with suitable example.
(c)
Why run-time storage management is required ? How simple stack implementation is implemented ?
5.
Attempt any two parts
(a)
(10x2=20)
:
What is DAG ? How DAG is created from three address code ? Write algorithm for it and explain it with a relevant example.
(b) What are different issues in code optimization ? Explain it with properexample.
G) Context free grammar. G) Yacc parser generator. (d) Check whether left recursion exists for the following. griurunar: S -+ Aalb. A-+AclSdle. 1r060sl I I Contd.
Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. UPTU B.Tech ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. UPTU B.Tech ...
terms Pixel, Aspect Ratio, Resolution. O) Develop and write mid point circle algorithm. Apply it to. predict the pixels in any octant for the circle whose centre.
There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. UPTU B.Tech Pattern Recognition ECS-074 Sem 7_20
(e) Enumerate the 'advantages of the layered. approach to system design? Also, Explain. virtual machine architecture in detail. (0 What are Sernaphores?
4. Attempt any two parts of the following : (10x2=20I*. (a) Explain Issues ofRecovery in distributed database. Explain. types of failure in distributed system.
OPERATINGSYSTEM. Time : 3 Hours ... favour of the oldest process. Draw the Gantt ... Displaying UPTU B.Tech Operating System ECS-501 Sem 5_2013-14.pdf.