Be Winter 2019
Be Winter 2019
Be Winter 2019
___________
Q.1 (a) Explain the analysis synthesis model of compilation. List the factors that affect the 07
design of compiler. Also List major functions done by compiler.
(b) What does the linker do? What does the loader do? What does the preprocessor 07
do? Explain their role(s) in compilation process.
Q.2 (a) Construct a DFA for a given regular expression (010+00)*(10)* 07
(b) Write a brief note on input buffering techniques to Lexical Analyzer. 07
OR
(b) Explain Shift-Reduce parsing with suitable example. 07
Q.3 (a) Test whether the following grammar is LL (1) or not. Construct predictive 07
parsing table for it.
S→1AB|Є
A→1AC|0C
B→0S
C→ 1
(b) What is Intermediate form of the code? What are the advantages of it? What 07
are generally used intermediate forms? Write N-Tuple notation for:
(a+b)*(c+d)-(a+b+c)
OR
Q.3 (a) Construct the canonical parsing table for the following Grammar 07
S’→S
S→CC
C→cC|d
(b) What is the difference between parse tree and syntax tree? Write appropriate 07
grammar and draw parse as well as syntax tree for a*(a-a^a)
Q.4 (a) Eliminate left recursion from the following grammar and rewrite the 07
Grammar.
S→Aa|b
A→Ac | Sd | є
(b) Explain the types of attributed grammar? Which phase of the compilation process 07
does it facilitate? Explain with example.
OR
Q.4 (a) Explain activation record. How is task divided between calling & called program 07
for stack updating?
(b) Explain: Error Recovery Strategies in Compiler in brief. 07
Q.5 (a) Explain various code optimization techniques. 07
(b) Explain: Symbol Table Management. How symbol table differs from other 07
data structures?
OR
Q.5 (a) Discuss generic issues in the design of code generation. 07
(b) Compare Static and Dynamic memory allocation. 07
*************