Essentials of Programming Languages teaches the fundamental concepts of programming languages through numerous short programs, or 'interpreters," that actually implement the features of a language.
What really happens when a program runs? Essentials of Programming Languages teaches the fundamental concepts of programming languages through numerous short programs, or "interpreters," that actually implement the features of a language. Nearly 300 exercises using these programs provide a hands-on understanding of programming principles that is hard, if not impossible, to achieve by formal study alone. In an approach that is uniquely suited to mastering a new level of programming structure, the authors derive a sequence of interpreters that begins with a high-level operational specification (close to formal semantics) and ends with what is effectively assembly language a process involving programming transformation techniques that should be in the toolbox of every programmer. The first four chapters provide the foundation for an indepth study of programming languages, including most of the features of Scheme, needed to run the language-processing programs of the book. The next four chapters form the core of the book, deriving a sequence of interpreters ranging from very high- to very low-level. The authors then explore variations in programming language semantics, including various parameter-passing techniques and object-oriented languages, and describe techniques for transforming interpreters that ultimately allow the interpreter to be implemented in any low-level language. They conclude by discussing scanners and parsers and the derivation of a compiler and virtual machine from an interpreter.