Credits and Contact Hours
3 credits, 43 hours
Course Instructor Name
Prof. Tassos Dimitriou
Textbook
Douglas Thain, Introduction to Compilers and Language Design, 2nd edition, 2021
Catalog Description
This course is a senior elective that introduces students to compiler construction and issues related to software compilation. Topics includes Lexical analysis, Syntax analysis: LL parsing and LR parsing, Semantic analysis: Type checking and attributed grammars, Memory management, Error handling, Code generation, Code optimization, and Bootstrapping. Students will be exposed to real compiler implementations. Students become familiar with make, lex, and yacc as a part of the course and are required to implement one compiler project in their favorite computer programming
language.
Prerequisite
CpE-207, CpE-363
Specific Goals for the Course
Upon successful completion of this course, students will be able to:
Demonstrate a working understanding of the process of scanning through the identification of the tokens of a programming language, the construction of regular expressions to define tokens, the construction of finite state automata to recognize tokens, and the writing of a functioning scanner to automatically identify the tokens in a program. (Student outcomes: 1, 2, 6)
Demonstrate a working understanding of the process of parsing through the application of EBNF to the definition of a programming language, the conversion of an EBNF definition of a programming language into an LL(1) context free grammar, the construction of an LL(1) table for an LL(1) grammar, and the writing of a functioning recursive descent compiler based on said LL(1) grammar. (Student outcomes: 1, 6)
Demonstrate a working understanding of the process of semantic analysis through the construction of semantic records based on parse trees, the construction of symbol tables, the organization of run time memory, and the writing of a semantic analyzer for a compiler. (Student outcomes: 1, 2)
Design, analyze, implement, and test a working compiler for a small language. (Student outcomes: 1, 2, 6)
Write scanner using the (lex) scanner generator. (Student outcomes: 1)
Write parser using the (yacc) parser generator. (Student outcomes: 1)
Topics to Be Covered
Overview of compilation.
Lexical analysis.
Symbol table management.
Theory of parsing.
Recursive descent parsing.
Non-recursive predictive parsing.
Syntax directed translation.
Intermediate code generation.