Compiler Design - Monowar Hussain
Compiler Design - Monowar Hussain
of printed pages = 4
CSE 181601
2022
COMPILER DESIGN
(i) Match the following according to input to the compiler phase that processes
it.
A Syntax Tree Code Generator
Integer X;
return 0;
[Turn over
Which of the following phases in a seven-phase C compiler will throw an
error?
case 1:a=b*c;
break;
default: a = a++;
break;
(a) 27 (b) 28
(c) 24 (d) 26
2
CSE 181601
(ix) Consider Lhe following grammar S plpqlpqr
Choosing the correct statement for the grammar is
(a) LL(2) (b) LL(4)
(c) LL1) (d) LL(3)
(x) Consider the augmented grammar given below:
S' ’S
S<l>|id
L’L,S|S
Let I, = CLOSURE (IS' ’ S]), the number of items in the, set GOTO(H,,<) is
2.,(9 Explain the basic task of a lexical analyzer in the analysis phase of(7)a
compiler.
Write the rules for computing FIRST(X) and FOLLOW(A). (4+2+2=8)
CSE 181601 4