CS 416-3
Compiler Construction
Catalog Description
Introduction to compiler construction. Design of a simple complete compiler, including lexical analysis, syntactical analysis, type checking and code generation.
Prerequisite:
306 and 311 each with a grade of C or better.
Objectives
To introduce the students to the principles of compiler design and implementation.
Course Outline
| Lectures | ||
| 1. | Introduction
Basic ideas, phases of a compiler, compiler construction tools. |
2 |
| 2. | Language and Grammers
Basic concepts, classification of grammars (type 0, 1, 2, and 3), reduced grammars and extended BNF notations, regular expressions. |
4 |
| 3. | A Simple One-Pass Compiler
Syntax definition, scanner, parsing, syntax directed translation, symbol tables, semantics and code generation. |
3 |
| 4. | Lexical Analysis
Regular expressions, finite state acceptors, conversion algorithms, token specification, scanner generator (LEX). |
6 |
| 5. | Syntax Analysis
Top down parsing, recursive descent and predictive parsers, LL(1) grammars, bottom-up parsing, simple and operator precedence grammars, simple LR parsing, introduction to LALR and cannonical LR parsing. |
6 |
| 6. | Type Checking
A simple type checker, type conversions. |
3 |
| 7. | Symbol Tables
Symbol table organization for both block structured and non block structured languages. |
3 |
| 8. | Run-time Storage Organization
Dynamic storage allocation strategies, access to nonlocal names, parameter passing, heap storage. |
4 |
| 9. | Intermediate Codes
Intermediate languages, quadruples. |
3 |
| 10. | Code Generation
Issues in code design, target machine, register allocation, simple code generator. |
6 |
| Total | 40 | |