COMP 4712: Compiler Construction

This course is of interest to students who want to learn about the theoretical foundations of compiler construction.

Prerequisites:  COMP 2003 or the former COMP 3724, and 3 credit hours in Computer Science at the 3000- level or above ( COMP 3600 is recommended)

Availability: ⚠ This course is not planned to be offered in the near future.

Course Objectives

To provide a theoretical basis for practical approaches to compiler construction. Primary emphasis is upon popular methods of syntax analysis and code generation. Some background in formal languages and automata theory is required.

Representative Workload
  • Assignments and Projects 30%
  • In-class Exams 40%
  • Final Exam 40%
Representative Course Outline
  • Formal languages and their grammars:
    • Chomsky hierarchy
    • Context-free languages
    • Derivation trees, leftmost and rightmost derivations
    • Ambiguity
    • Grammar transformations
    • Normal forms
  • Definition of programming languages:
    • BNF and EBNF
    • Syntax and semantics
    • Syntax-driven semantics
    • Syntax and semantics analysis
  • Lexical analysis:
    • finite automata and regular expressions
    • construction of scanners
    • lex
  • Bottom-up parsing:
    • General and deterministic
    • LR(k) grammars and parsers
    • LR, SLR, LALR parsers
    • Code generation for bottom-up parsers
    • yacc
  • Top-down parsing:
    • General and deterministic
    • LL(k) grammars and parsers
    • Action symbols and code generation for top-down parsing
    • Recursive descent parsing
  • Attribute grammars:
    • Inherited and synthesized attributes
    • Attribute evaluation schemes

Page last updated May 24th 2021