Compiler Design CSCI 447 - Fall 2000 410 Falaki Building, Ext: 5305 UTR 10-12 noon Assistants Deena El-Shami Lab Hours: UTR 1-3pm, Lab 501 Falaki (492 Group) Soha Abou Seif Lab Hours: UTR 12-2pm, Lab 505 or 6th Floor Falaki (491 Group) Catalog Description Prerequisite: CSCI 325. Offered in fall and spring. 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. Reference Aho, Sethi, and Ullman, Compilers: Principles, Techniques, and Tools, Addison Wesley, 1988. 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. 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 Using the Lex scanner generator, a TINY language and scanner Symbol tables, hash tables, and string spaces Context-Free grammars, parse trees, syntax trees, ambiguity, TINY syntax Recursive descent, LL(1) parsing, Syntax tree construction, Grammar analysis LR parsing, LR(0) items and parsing, SLR(1), LR(1) and LALR(1) parsing Yacc, semantic actions and attributes, precedence and associativity, error recovery Semantic processing techniques, attribute grammars, syntax-directed translation Data types and type checking. Intermediate code, data structures for code generation, basic code generation techniques, using the simple target machine TM. Written Assignments Mini-Projects 1: Scanner generation with Lex, Hash tables for identifiers and literals 2: Recursive-descent parser for M language, Generating a syntax tree 3: Parser generation with Yacc, Syntax tree generation, Type checking Sample Exams Grading Written assignments and quizzes: 15% Programming assignments: 30% Midterm Exam: 20% or 25% Final Exam : 35% or 30% Last Updated: December 2000 |