Listed in: Computer Science, as COSC-37
Lyle A. McGeoch (Section 01)
An introduction to the principles of the design of compilers, which are translators that convert programs from a source language to a target language. Some compilers take programs written in a general-purpose programming language, such as C, and produce equivalent assembly language programs. Other compilers handle specialized languages. For instance, text processors translate input text into low-level printing commands. This course examines techniques and principles that can be applied to the design of any compiler. Formal language theory (concerning regular sets and context-free grammars) is applied to solve the practical problem of analyzing source programs. Topics include: lexical analysis, syntactic analysis (parsing), semantic analysis, translation, symbol tables, run-time environments, code generation, optimization, and error handling. Each student will design and implement a compiler for a small language. Three class hours per week. Offered in alternate years. Requisites: Computer Science 14 and 21. Second semester. Professor L. McGeoch.