COS 401
Principles of Compiler Construction
2 Unit(s) (LH 30)
Course Description
At the end of the course, students should be able to:
1. express the grammar of a programming language;
2. design lexical and syntax analysers and use them in the construction of scanners and parsers;
3. perform the operations of semantic analysis;
4. build a code generator;
5. use different compiler optimization schemes in addition to efficient register allocation and
garbage collection; and
6. design and program a complete working compiler for a given language.
Course Outline
Basic concepts of compiler, Application of regular expressions in lexical scanners, Parsing
(concrete and abstract syntax, abstract syntax trees), Application of context-free grammars in
table-driven and recursive-descent parsing, Symbol table management, code generation by tree
walking, Compilation approaches – Multi pass, Single Pass, Load and Go; Compiler
implementation - Scanning, syntax directed table driven, Architecture-specific operations:
instruction selection and register allocation, Optimization techniques and The use of tools in
support of the translation process and the advantages of Program libraries and separate
compilation Building syntax-directed tools.