CS 15-212: Fundamental Structures of Computer Science II

Lecture 20: Interpreters

In the next series of lectures we put together lexical analysis, parsing, type checking, and evaluation to form the basic components of a code interpreter, which evaluates expressions directly rather than constructing an explicit translation of the code into an intermediate language, and then into machine language, as a compiler does. Our first example uses the basic grammar of arithmetic expressions, interpreting them in terms of operations over the rational numbers.

Key Concepts

Sample Code

On-line Notes


[ home | schedule | language | assignments | handouts ]

John Lafferty
lafferty@cs.cmu.edu