Sie sind auf Seite 1von 2

PRIST UNIVERSITY TRICHY CAMPUS

Department of CSE
M.Tech I year CSE-COMPILER DESIGN

PART A
(10X2=20marks)

1.What are the cousins of the compiler?


2.What are the error recovery actions in a lexical analyzer?
3.What are the algebraic properties of regular expressions?
4.What is finite automata?
5.What are the goals of error handler in a parser?
6.Define Handle?
7.What is basic block?
8.What are the various ways to pass a parameters in a function?
9.How would you calculate the cost of an instruction?
10.How would you map names to values?

PART B
(5X16=80marks)

11.(i)What are the various phases of the compiler?Explain each phase in


detail.Write down the output of each phase
for the expression a:=b+c*50.
(ii)Briefly explain the Compiler-Construction tools.
OR
12.Explain in detail about applications of Compiler technology?

13.(a)Explain the process of constructing an NFA from a regular


expression.Find NFA for the expression (a/b)*a(a|b)(a|b).Convert the
obtained NFA into DFA.
(b)What are the issues of the lexical analyzer?
OR
14.(a)How would you construct a DFA directly from a regular expression?
(b)What are the preliminary steps that are to be carried out during parsing?
Explain with suitable example.

15.(a)Construct the predictive parser for the following grammar.


S->a|1^|(T)
T->T,S|S
Write down the necessary algorithms.
OR
16.(a)Check whether the following grammar is a LL(1) grammar
S->iEtS|iEtSeS|a
E->b
(b)Explain the error recovery strategies on Predictive parsing.
(c)Explain the LR parsing algorithm with an example.

17(a)What is a three address code?What are its types?How it is


implemented?
(b)Explain how declarations are done in a procedure using syntax directed
translation.
OR
18. Explain the various data structures used for implementing the symbol
table?
19.Explain the principle sources of code optimization in detail.
OR
20(i)What are the issues in the design of the code generator?
(ii)Explain the DAG representation of the basic block with an example.

Das könnte Ihnen auch gefallen