Compiler Design Previous Papers
Compiler Design Previous Papers
example.
(b) Discuss about Recursive Descent Parsing.
5. (a) Translate the arithmetic expression
a:=b*-c+b*-c into
(i) Syntax tree i) Postfix notation
(ii) Three-address code.
(b) Discuss about Type Checking and Type
Conversions.
phase?
(b) What is meant by pass and
(C-19)
4 [07BENG - 3209]
(e) What is abstract syntax tree? Give an 4. (a) Illustrate brute force parsing technique with
example. suitable example.
(t) Define constant folding. (b) Computer FIRST and FOLLOW of the flowing
grammar:
(g) What are the rules to identity leader basic S’ aBDh, B ’ cC, C- ’ bc &, D ’ EF
blocks? E+g|e,Ff] [.
2. (a) Show the output produced by different stages 5 Design CLR Parser for the following grammar.
in compiler for the expression a := b*c/36; S ’L= R|R
where a, b and c are real numbers. L’*RIa
R ’L
(b) Explain bootstrapping a compiler with
suitable diagrams. 6. (a) Write about syntax directed definition and
syntax directed translation.
3. (a) Construct DFA from the following NFA: (b) Describe about type expressions.
M= ((p, q, r, s}, {0, 1}, , p, s).
Present State Next State
7. (a) Generate three address code for the following
switch block:
1
Switch(ch)
p p, a} p}
Case 1: c=a + b;
{r}
break;
{s} Case 2: c=a - b;
{s} break;
Case 3: C=a * b;
(b) What is the structure of LEX program? Write break;
a LEX program that accepts the keywords:
"begin, if, else" and identifier: "abc'. (b) Translate the expression (a + b) / (c + d) *(at
b/ c) - d into quadruples, triples and indirect
triples.
2 [07 BENG -3209] (C-19)
3 [07 BENG- 32091 (C-19)
[07 BENG - 3212]
2. (a) Give NFA for (a+ b)" ablb convert this toDFA.
(b) Explain the applications of grammar in the
design of COMPILER.
(P.T.O)
[07-3216 |
3. Discuss about the different stages of a
aneat sketch.
Compiler with
2
Dee 2022
7. (a) Describe different methods that are used in [07 BENG 3122]
Peep hole optimization'
EXAMINATION.
(b) Write a procedure to construct flow graph in III/IV B.Tech DEGREE
loop optimization. First Semester