← Back to Teaching

Undergraduate · NUST

CS-354 — Compiler Construction

A hands-on introduction to how source code becomes an executable — from lexical analysis and parsing through semantic analysis, code generation, and optimization.

Credit hours: 3
Prerequisite Course(s): Algorithms
Office hours: By appointment

Course Description

This course covers the theory and practice of compiler construction: how a compiler translates source programs into executable code while preserving their meaning. We study each phase of the compilation pipeline — lexical analysis, parsing, semantic analysis, intermediate representation, optimization, and code generation.

Beyond compilers themselves, the techniques covered here — finite automata, grammars, tree-based program representations, and dataflow analysis — recur throughout computer science, from static analysis tools and IDEs to query engines and formal verification.

Course Outcomes / Objectives

Text Books