Course Objectives
At the end of the course, students will
- understand the syntactic and semantic descriptions of programming languages and formally define the grammar and semantics of a language,
- understand the theory and practice of compiler implementation,
- be familiar with standard tools and design approaches used to construct a compiler,
- understand the theory of lexical analysis, parsing, and constructing a lexical analyzer,
- know how to construct abstract syntax trees and symbol tables, and
- understand intermediate machine representations and final code generation.
Course Description
Overview of compilation and translation; lexical analysis: regular expressions, non-deterministic finite automata (NFA) and deterministic finite automata (DFA), using lex; syntactic analysis: context-free grammars, LL parsing, LR parsing, using yacc; semantic analysis: symbol tables, syntax directed translation, type checking; code generation: intermediate code generation, final code generation: optimization: basic blocks, flow graphs, other optimizations.
Course Content
- Introduction
- Lexical analysis
- Syntax analysis
- Syntax directed translation
- Type checking
- Intermediate code generation
- Code generation
- Code optimization