540203 Theory Major Course

Compiler Design and Construction

3.0 Credits 45 class hours 80 Marks Fourth Year · Semester VII
Course outline

What you’ll study

Introduction to compilers — the analysis of a source program, the phases of a compiler and compiler-construction tools. A simple one-pass compiler — syntax definition, context-free grammars, parse trees, ambiguity and the associativity of operators. Lexical analysis — the role of the lexical analyzer, input buffering, the specification of tokens, finite automata, Thompson's construction and the conversion of a regular expression to a DFA. Basic parsing techniques — bottom-up and operator-precedence parsing, top-down and predictive parsing, LL(1) grammars and LR parsers (SLR, LALR). Intermediate code generation — intermediate languages and three-address code. Code generation — issues in the design of a code generator, the target machine, basic blocks and flow graphs, the code-generation algorithm, the DAG and peephole optimization. Code optimization — function-preserving transformations, and basic-block and loop optimization. Error detection — reporting errors and the sources of syntactic, semantic and dynamic errors.

Reference Books
Compilers: Principles, Techniques and Tools — Aho, Sethi & Ullman
Principles of Compiler Design — Aho & Ullman
Compiler Design in C — A. J. Holub
Course Code
540203
Credit Hours
3.0 Credits · 80 marks
Class Hours
45 class hours
Course Type
Major Theory
Semester
Fourth Year · Semester VII
Back to Semester VII
Learn it free & get certified

Free certificate courses for this subject

Hand-picked online courses to master Compiler Design and Construction. Each link opens an exact course page on a platform that issues a real certificate at zero cost — no financial-aid condition, no hidden fee.