Compiler Design QB CS1602A
Compiler Design QB CS1602A
ENGINEERING COLLEGE
(An Autonomous Institution, Affiliated to Anna University)
QUESTION BANK
EVEN SEMESTER, 2023 - 2024
PART-A
MAR BTL COMPETEN
S. NO QUESTIONS CO
KS LEVEL CE
7. List out all error recovery actions in lexical analyzer. 1 2 BTL-1 Remember
13. What are the possible error recovery actions in 1 2 BTL-1 Remember
lexical analyzer?
PART-B
1 13 BTL-2 Understand
UNIT II
SYLLABUS:
Role of Parser – Grammars – Error Handling – Context-free grammars – Writing a grammar –Top Down Parsing
- General Strategies Recursive Descent Parser Predictive Parser-LL(1) Parser-Shift Reduce Parser-LR Parser-LR
(0)Item Construction of SLR Parsing Table -Introduction to LALR Parser - Error Handling and Recovery in
Syntax Analyzer-YACC.
PART-A
MARK K COMPETENC
S.NO QUESTIONS CO
S LEVEL E
2 2 BTL-2 Understand
7. What are the different levels of syntax error handler? 2 2 BTL-1 Remember
PART-B
Develop stack based implementation to construct shift
reduce parsing for the grammar
E->E+E
1. E->E*E 2 13 BTL-3 Apply
E->(E)
E->id and demonstrate its application on the input string
id1+id2*id3.
Find LALR for the given grammer and parse the sentence
10. (a+b)*
E->E+T|T, T->T*F|F,F->(E)|id
UNIT III
SYLLABUS:
Syntax Directed Definitions, Evaluation Orders for Syntax Directed Definitions, Intermediate Languages:
Syntax Tree, Three Address Code, Types and Declarations, Translation of Expressions, Type Checking.
PART-A
K
S.NO QUESTIONS CO MARKS COMPETENCE
LEVEL
PART-B
Storage Organization, Stack Allocation Space, Access to Non-local Data on the Stack, Heap Management -
Issues in Code Generation - Design of a simple Code Generator.
PART-A
K
S.NO QUESTIONS CO MARKS COMPETENCE
LEVEL
15.
PART-B
UNIT V
SYLLABUS:
Principal Sources of Optimization – Peep-hole optimization - DAG- Optimization of Basic Blocks- Global
Data Flow Analysis - Efficient Data Flow Algorithm.
PART-A
MAR COMPETENC
S.NO QUESTIONS CO K LEVEL
KS E
PART-B
5 13 BTL-3 Apply