Вы находитесь на странице: 1из 5

Vivekanandha College of Arts & Sciences for Women (Autonomous), Elayampalayam

PG & Research Department of Computer Science and Applications


V Semester 2018-2019
Subject: Compiler Design Class: III B.Sc.(CS) ‘B’

Subject Code: 14U5CSC07

QUESTION BANK

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 lex eme
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 contex t 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
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.
5 Marks and 10 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 or real.
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.
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 f or 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. Define left recursion.
28. Define left factoring
29. How will you eliminate left factor?
30. Define recursive descent parsing.
31. Define predictive parser
32. Define LL(1) Grammar
5 Marks & 10 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 parser.
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 t free grammar that generates all palindrome of a’s and b’s. 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
L->*R L->id R->L
UNIT III
2 Marks
1. Write down the different intermediate languages.
2. What are the different implementation methods for three-address code?
3. What do you mean by quadruple?
4. Define triple.
5. Define indirect triple.
6. Write down the benefits for using an intermediate language.
7. Define three-address code.
8. Write down any four common three -address statements.
9. Define translation scheme.
10. What are the different methods are available to translate Boolean expressions?
11. Define short circuit code.
12. Define back patching.
13. What are the functions available to manipulate labels.
14. What is the purpose of the symbol M in the grammar?
15. Define the purpose of code generator.
16. List down the generic issues in the design of code generators.
17. What are the problem s occur during the use of registers?
18. What do you mean by symbol table?
19. When the symbol table entries are used?
20. Define semantic analysis.
21. Define syntax analysis.
22. Write down the steps in analysis phase.
23. What do you mean by linear analysis?
24. Define hierarchical analysis?
25. How the conditional jump and unconditional jumps are specified in three address code?
26. Write down the partial expression evaluated during running time for one and two
dimensional arrays
27. What do a* and a+ refer to in a regular expression?
28. What is the purpose of symbol table?
29. Represent the given statement as a triple and a quadruple x: = y op z
5 Marks & 10 Marks
1. Explain different intermediate languages.
2. Discuss about three-address code?
3. Explain the following: Quadruple Triple and Indirect Triple.
4. Explain the concept of flow control with an example.

UNIT IV
2 Marks
1. Define Runtime Environment?
2. Define Activation tree?
3. Define Flow graph?
4. What do you meant by loop.
5. Define semantic analysis.
6. Define syntax analysis
7. Write down the steps in analysis phase.
8. What do you mean by linear analysis?
9. List down the errors in syntax analysis.
10. State various errors occurred during lexical phase
11. List out semantic errors.
5 Marks & 10 Marks
1. Explain in detail about run time storage management
2. Explain the simple code generator
4. Explain the term “nesting depth” with some suitable example
5. Explain Hash tables.
6. Give sub division of run time memory
7. Explain dynamic scoping.
8. Explain the concept of stack allocation scheme.
9. Discuss in detail about run time management.
10. Explain Heap allocation.
11. Explain stack allocation.
12. Explain induction variable end reduction strength.
13. Explain deadlock elimination.

UNIT V
2 Marks
1. Define peephole optimization
2. Define procedure calls
3. Give characteristics of peep hole.
4. What do you meant by Algebric simplification?
6. What is storage organization?
7. What are all division and sub storage?
8. What are the processes of optimizing compiler?
9. Define DAG.
5 Marks &10 Marks
1. Explain code optimization in detail
2. Explain storage allocation strategies
3 .Explain control stacks.
4. Explain in detail about DAG.

Вам также может понравиться