Sie sind auf Seite 1von 12

www.annauniverzity.

com

Anna University
6th sem CSE
CE2352 PCD question bank 2m & 16m
UNIT I
2 Marks
1. Define compiler
2. Distinguish between compiler and interpreter
3. Define translator
4. What do you mean by assembler and preprocessor
5. Define macro processor
6. Define phase
7. What is the purpose of scanner?
8. Define token and lexeme
9. Define parser
10. What do you mean by syntax tree (parse tree or derivation tree)?
11. What are the advantages and disadvantages of intermediate language?
12. Define sentence
13. Define terminal symbol and non-terminal symbol
14. Define derivation and reduction
15. Define context free grammar
16. Define production rule (or rewriting rule)
17. Define ambiguity
18. What do you mean by ambiguous grammar?
19. Define recursive grammar with types
20. Define conflict
21. What do you mean by look ahead symbol?
22. Define handle and linear grammar
23. Define regular expression

www.annauniverzity.com

24. What do you mean by canonical derivation


25. What do you mean by canonical sentential form
26. What is the purpose of precedence relation?
27. What is an important task done by lexical analyzer or scanner?
28. What are the tasks done by scanner other than token generation?
29. What are the reasons for separating the analysis phase to lexical analysis and parser?
30. Define pattern and lexeme

16 Marks
1. Explain the role performed by lexical analysis of the compiler.
2. Write grammar for the following languages the set of non-integers with no leading zeros.
3. Explain the need of code optimization in compiler
4. Write note on front and back end of compiler
5. Write a context free grammar that generates all numbers; numbers can be integer oreal.
r
6. Explain the phases of compiler
7. Explain Symbol table management and error handling
8. Explain construction tools in compiler
9. Explain cousins of compiler
10. Explain the need of intermediate code generator and write the grammar for the following languages
set of non-negative odd integers.

UNIT II
2 Marks
1. Define attribute
2. Define panic mode
3. Write down the possible error recovery actions taken by lexical analyzer.

www.annauniverzity.com

4. Define character class and language


5. What are the operations supported by a string
6. What are the common operations in a language?
7. What do you mean by subsequence?
8. What is the purpose of the following notations , + and ?
9. Explain the notation useful for character class
10. What is the purpose of transition diagram?
11. Define the purpose of gettoken( ) function
12. Define the purpose of installid( ) function
13. Define Look ahead operator.
14. Define Finite automata.
15. Define NFA
16. Define DFA
17.Write down the structure of LEX program.
18. What are the Types of Parsers
19. What do you mean by shift reduce parsing?
20. Define Handle pruning
21. State the goals for error handler in parser
22. How the handles are identified in parsing?
23. What are the different actions of parser?
24. Define operator grammar
25. Define operator precedence grammar
26. What are the different precedence relations in operator precedence parser?
27. What are the different methods are available to determine relations?
28. What do you mean by precedence function?

www.annauniverzity.com

29. Write down the difficulties in top down parsing.

16 Marks

1.Consider the grammar


S->(L)| A
L->L,S|S
a) What are the terminals, on terminals and start symbol
b) find parse tree for (i)(a,a)
(ii) (a,(a,a)
(iii)(a,((a,a),(a,a)))
2.Explain LR parsers
3.Explain how to construct SLR parsing tables with example
4.explain top down parsing
5.explain bottom up parsing
6.Explain error recovery in operator precedence parsing
7.Write a context free grammar that generates all palindrome of as and bs.A palindrome is the string
that reads the same.
8.Explain SLR parser.
9.Explain syntax directed definition
10.construct unambiguous grammar for the statement with example
11.define LL(1) grammar with examples

12.Check whether the following grammar is SLR(1) or not


S->L=R
S->R

www.annauniverzity.com

L->*R
L->id
R->L

UNIT III
16 Marks
1. Define left recursion
2. Define left factoring
3. How will you eliminate left factor?
4. Define recursive descent parsing.
5. Define predictive parser
6. Define LL(1) Grammar
7. Write down the different intermediate languages.
8. What are the different implementation methods for three-address code?
9. What do you mean by quadruple?
10. Define triple
11. Define indirect triple
12. Write down the benefits for using an intermediate language
13. Define three-address code.
14. Write down any four common three-address statements.
15. Define translation scheme
16. What are the different methods are available to translate Boolean expressions?
17. Define short circuit code
18. Define back patching.
19. What are the functions available to manipulate labels.
20. What is the purpose of the symbol M in the grammar?

www.annauniverzity.com

21. Define the purpose of code generator.


22. List down the generic issues in the design of code generators.
23. What are the problem s occur during the use of registers?
24. What do you mean by symbol table?
25. When the symbol table entries are used?
26. Define semantic analysis.
27. Define syntax analysis
28. Write down the steps in analysis phase.
29. What do you mean by linear analysis?
30. Define hierarchical analysis

2 Marks
1. Define left recursion
2. Define left factoring
3. How will you eliminate left factor?
4. Define recursive descent parsing.
5. Define predictive parser
6. Define LL(1) Grammar
7. Write down the different intermediate languages.
8. What are the different implementation methods for three-address code?
9. What do you mean by quadruple?
10. Define triple
11. Define indirect triple
12. Write down the benefits for using an intermediate language
13. Define three-address code.

www.annauniverzity.com

14. Write down any four common three-address statements.


15. Define translation scheme
16. What are the different methods are available to translate Boolean expressions?
17. Define short circuit code
18. Define back patching.
19. What are the functions available to manipulate labels.
20. What is the purpose of the symbol M in the grammar?
21. Define the purpose of code generator.
22. List down the generic issues in the design of code generators.
23. What are the problem s occur during the use of registers?
24. What do you mean by symbol table?
25. When the symbol table entries are used?
26. Define semantic analysis.
27. Define syntax analysis
28. Write down the steps in analysis phase.
29. What do you mean by linear analysis?
30. Define hierarchical analysis

16 Marks
1. What is three-address code? Mention its types. How would you implement the three address
statements? Explain with suitable examples.
2.How would you generate the intermediate code for the flow of control statement with example.
3.Explain the translation Boolean expression in to three address code.
4.what is short circuit code explain with appropriate example.
5.Explain about Boolean expression in the form of numerical representation.
6.what is the procedure of type conversion with in assignment?

www.annauniverzity.com

7.what is translation scheme of addressing array elements.


8.explain about the in directed triples.
9.Explain about intermediate code generation.
10.write the advantages and disadvantages of generating an intermediate representation.
11.Define translation scheme and write three address code for a<b or b>c.
12.what are the various way of calling the procedures? Explain in detail.
13.Explain the various data structures used for implementing the symbol table.
14.translate the following executable statements in to three-address code
a) I=1;
While(I<=10)
{ a[I]=0;
I=I+1; }
b) a<b or b>c and d<c.

UNIT IV
2 Marks
1. Define translation scheme
2. What are the different methods are available to translate Boolean expressions?
3. Define short circuit code
4. Define back patching.
5. What are the functions available to manipulate labels?
6. What is the purpose of the symbol M in the grammar?
7. Define the purpose of code generator.
8. List down the generic issues in the design of code generators.
9. What are the problem s occur during the use of registers?
10. What do you mean by symbol table?

www.annauniverzity.com

11. When the symbol table entries are used?


12. Define semantic analysis.
13. Define syntax analysis
14. Write down the steps in analysis phase.
15. What do you mean by linear analysis?
16. Define hierarchical analysis
17. Write down some examples of conventional compilers.
18. Define front end
19. Define back end
20. What do you mean by syntax directed translation?
21. What is the reason for the term three address code?
22. How the conditional jump and unconditional jumps are specified in three address code?
23. Write down the partial expression evaluated during running time for one and two dimensional
arrays
24. What do a*and a+ refer to in a regular expression?
25. What is the purpose of symbol table?
26. Represent the given statement as a triple and a quadruple x := y op z
27. Define triple
28. Define indirect triple
29. Write down the benefits for using an intermediate language
30. Define three-address code.
31. Write down any four common three address statements.

16 Marks
1. Explain how the intermediate codes are generated for Boolean expressions
2. Explain in detail about back patching

www.annauniverzity.com

3. Explain the issues in the design of code generator


4. Explain in detail about run time storage management
5. Explain the simple code generator
6 Explain peephole optimization
7 Explain the term nesting depth with some suitable example
8 Explain Hash tables
9 Give sub division of run time memory
10 Explain dynamic scoping.

UNIT V
2 Marks
1. Define Runtime Environment?
2.Define Activation tree?
3.Define Flow graph?
4.What do you meant by loop
5.Explian peephole optimization
6.Define procedure calls
7.Give characteristics of peep hole
8.What do you meant by Algebric simplification?
9.what is the need of sub expression?
10.Define dead code?
11.Define reduction in strength?
12.Define DFS
13.Define Copy propagation?
14.What is the advantage of Copy propagation?
15.What is Code motion?

www.annauniverzity.com

16.What is scope of declaration?


17.What is storage organization?
18.what are all division and sub storage?
19.Define Activation records?
20.What is the purpose of activation record?
21.what are storage allocation strategies?
22.What is static allocation?
23.Give limitation of static allocation
24.Define stack allocation?
25. Define back patching?
26. List down the generic issues in the design of code generators.
27.Define calling sequence?
28.Define Heap allocation?
29.Define deallocation?
30.What are the processes of optimizing compiler?

16 Marks
1. Explain code optimization in detail
2.Discuss in detail about run time management
3.Explain Heap allocation
4 Explain stack allocation
5.Explain induction variable end reduction strength
6.Explain deadlock elimination
7.Explain storage allocation strategies
8.Explain control stacks

www.annauniverzity.com

9.discuss in detail about activation records


10.Explain the various structures used in Symbol table construction

Das könnte Ihnen auch gefallen