Compiler Design and Construction syllabus
CSC3655 units · 46 topicsAcademic year 2083/84
Browse the units
1Introduction to Compilers (3 hrs)
Compiler Structure: Analysis and Synthesis Model of Compilation, sub-phases within analysis and synthesis phases
Basic concepts related to compiler such as interpreter
Simple One-Pass Compiler
Preprocessor, macros
Symbol table and error handler
2Analysis Phases (22 hrs)
Lexical AnalysisIts role
Specification and Recognition of tokens
Input Buffer
Finite Automata relevant to compiler construction, syntactic specification of languages
Optimization of DFA based pattern matchers
Syntax AnalysisIts role
Basic parsing techniques: Problem of Left Recursion, Left Factoring, Ambiguous Grammar
Top-down parsing
Bottom-up parsing
LR parsing
Semantic AnalysisStatic and Dynamic Checks
Typical Semantic errors
Scoping
Type Checking
Syntax directed definitions (SDD) and Translation (SDT)
Attribute Types: Synthesized and Inherited
Annotated Parse Tree
S-attributed and L-attributed grammar
Applications of syntax directed translation
Type Systems
Type Checking and Conversion
3Symbol Table and Run-time Storage (4 hrs)
Symbol Table DesignFunction of Symbol Table
Information provided by Symbol Table
Attributes and Data Structures for symbol table
Run-time storage management
4Code Generation and Optimization (16 hrs)
Intermediate Code GeneratorHigh-level and Low-level Intermediate representation
Syntax tree and DAG representations
Three-address code, Quadruples, Triples
SDT for intermediate code
Intermediate code generation for Declarations, Assignments, Control Flow, Boolean Expressions and Procedure Calls
Back patching
Code GeneratorFactors affecting a code generator
Target Language
Basic blocks and flow graphs
Dynamic programming code-generation algorithm
Code OptimizationNeed and criteria of Code Optimization
Basic optimization techniques
Case Studies of some compilers like C compiler, C++ compiler
Laboratory Works
Create a project using lexical analyzer generator or any high level language
Create a parser using parser generator or any high level language
Write programs for intermediate code generation