Compiler Design

CSCI 447 - Summer 2003

Muhamed F. Mudawar

mudawwar@aucegypt.edu

733 Falaki Academic Center, Ext: 5305

Office Hours: MTW 11-12:30 pm

Grades (Posted July 23)

Click here

Teaching Assistants

 

Rihab El-Kady

relkady@aucegypt.edu

Hours: MW 6 - 7 pm

Mobile Phone: 012 2446346

 

Mohamed Nader Hassan

mohnader@aucegypt.edu

 

Catalog Description

 

Prerequisite: CSCI 325 and 422. Offered in fall, spring, and summer.

Principles and practices in the design of compilers. Lexical analysis. Syntax analysis, top-down and bottom-up parsing. Syntax-directed translation and syntax trees. Declarations, types, and symbol management. Run-time environments, storage organization, parameter passing, dynamic storage allocation. Intermediate languages and intermediate code generation. Code generation and optimization. Project: students construct a simple compiler that generates unoptimized code.

Textbook

 

Kenneth Louden, Compiler Construction: Principles and Practice, PWS publishing company, 1997.

Objectives

To present a practical approach to the subject of compiler construction.

To cover the components of a compiler and how they fit together.

To automate the generation of compiler components using Lex and Yacc.

Download Course Syllabus

Get Adobe Acrobat Reader.  All downloadable files are in PDF format.

Lecture Transparencies

Introduction to compiling, the translation process

Scanning theory, regular expressions, finite automata

** Updated ** Using the Lex scanner generator, a TINY language and scanner

Symbol tables, hashing, and hash tables

Context-Free grammars, parse trees, syntax trees, ambiguity, TINY syntax

Recursive descent, LL(1) parsing, Syntax tree construction, Grammar analysis

Table Extra: Dealing with Scope

LR parsing techniques: LR(0), SLR(1), LR(1) and LALR(1) parsing

Yacc, semantic actions and attributes, precedence and associativity

Semantic processing techniques, attribute grammars

Intermediate code generation, translating expressions, control structures, etc.

Lex and Yacc

The Lex and Yacc Page

Google Directory of Lexer and Parser Generators

ALex and AYacc for Windows that generate C, C++, and Java code

Flex manual page

Bison manual page

Exams

Midterm: Tuesday, July 8, Room 208 FLAC, 9 am

Final: Monday, July 21, Room 208 FLAC, 9 am

Written Assignments

1: Scanning Theory

2: Context-Free Grammars

3: LL Parsing

4: LR Parsing

Projects

1: Scanner Generation with Lex

2: Recursive Descent Parsing

Sample Exams

Midterm Exam, Spring 1999

Final Exam, Spring 1999

Grading

Written assignments and quizzes: 15%

Programming assignments: 30%

Midterm Exam: 20% or 25%

Final Exam : 35% or 30%

[Home] [Teaching]

Last Updated: July 2003,  by Dr. Muhamed Mudawar