Sie sind auf Seite 1von 1

CYCLE TEST I PRINCIPLES OF COMPILER DESIGN Branch:III CSE Date : 9.2.

2012
PART-A 1.What is compiler. 2.What arethe properties to be hold for intermediate representations. 3. State the usage of symbol table. 4.State some of the Compiler Construction tools. 5.What are the conditions to remove left recursion? 6.What are the States of Shift reduce parser. 7. What is an operator grammar? Give Example. 8. What are Kernel and Non-kernel items. 9.Mention some of the cousins of compiler. 10. What is Ambiguous Grammar? How will you remove it. PART-B 15*2=30 11. Construct predictive parser for the following grammar. S ->a||(T) T->T,S|S Show the Behaviour of Parser.i) (a,(a,a)) ii) (((a,a), ,(a),a) (15) (or) 12. a) S->iEtS|iEtSeS|a E->b Check whether the grammar is LL(1) grammar. (6) b) Write down the output for the following expression in various phases of compiler. a:=b*c-d (5) c) Find FIRST and FOLLOW for E->TE E->+TE| T->FT T->*FT| F->(E)|id (4) 13. Show that the following grammar is LR(1) but not LALR(1). (15) S->Aa|bAC|Bc|bBa A->d B->d (or) 14. a) Check whether the grammar is SLR(1) or not (8) S->L=R S->R L->*R L->id R->L b) Draw the Precedence graph for the Following table. (7) a ( ) , $ a .> .> .> ( <. <. = <. ) .> .> .> , <. <. .> .> $ <. <.

Semester :VI Max Marks:50


10*2=20

Das könnte Ihnen auch gefallen