Beruflich Dokumente
Kultur Dokumente
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
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
www.annauniverzity.com
16 Marks
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
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
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
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
16 Marks
1. Explain how the intermediate codes are generated for Boolean expressions
2. Explain in detail about back patching
www.annauniverzity.com
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 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