Viva Compiler

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

VIVA QUESTIONS SYSTEMS PROGRAMMING LAB

MODULE I

1. What is regular expression?


2. What is NFA?
3. What is subset construction algorithm?
4. What is closure?
5. What is Thompsons construction?
6. What is epsilon transition?
7. Why regular expressions are used to define lexical syntax of a language?
8. Differentiate the uses of regular expressions and grammars?
9. What are the different types of errors a program can contain?
10. Phases of a compiler
11. What are the two parts of compilation? Explain briefly.
12. Role of a lexical analyser
13. Explain book keeping during compilation
14. Input Buffering scheme
15. Use of sentinels
16. Use of LEX

MODULE II
1. What is meant by syntax analysis?
2. What is meant by syntax tree? Learn to construct syntax trees
3. What is the role of parser?
4. What is left factored grammar? Learn to perform left factoring
5. Left recursion. Eliminating left recursion
6. Recursive Descent Parser for different grammars
7. Constructing FIRST and FOLLOW
8. Precedence relations matrix
9. What is Handle?
10. Top down and Bottom up parsing
11. LL(k) parser, LR(k) parser meaning and working
12. Left most derivation and right most derivation
13. Ambiguous grammar, parse tree
14. Items, valid items
15. What is left sentential form, right sentential form
16. Shift reduce conflict, reduce reduce conflict
17. Explain CFG, why is it used in syntax analysis phase
18. What is Context Free Language
19. Use of YACC
MODULE III
1. Role of semantic analyser
2. Explain Type Checking
3. Explain SDD, SDT
4. S-attributed grammar, L-attributed grammar, examples
5. SDT for evaluating simple expression
6. Memory allocation strategies
7. Activation record
8. Block structured languages
9. Local and non local variable
10. dynamic and static memory allocation
MODULE IV
1. Need for code optimization
2. Basic blocks
3. Constructing basic blocks from a sequence of statements
4. Flowgraphs
5. Machine Dependent and independent optimization
6. Local and global optimization
7. Various Optimization strategies
8. Need for Intermediate code generation
9. Various intermediate representations
10. Advantage of indirect triples over triples
11. Conversion from infix to postfix
12. Creating DAG and syntax tree
13. Peephole Optimization
MODULE V

1. What are the error recovery strategies?


2. What is panic-mode recovery?
3. What is phrase level recovery?
4. What is global correction?
5. Code generation issues
6. How do you generate target code from three address code
7. Explain symbol table and symbol table handling
8. Eliminating dead code, common subexpression using DAG
9. Computing next use and liveness information
10. What information is stored in the symbol table

QUESTIONS FROM ASSEMBLER AND MACOPROCESSOR


1. Explain the operation of a two pass assembler
2. Explain the output format of an assembly code
3. Explain intermediate code generation in assembler and the intermediate code format
4. Explain operation of macroprocessror
5. Explain DEFTAB, NAMTAB
6. Explain creation of symbol table during assembling a code.
7. Explain the format of macro
8. What is macro expansion

You might also like