Where to Go from Here

In this chapter, we had to completely ignore garbage collection, executing code from more than one source file (linking), classes, libraries, and debuggers. But, we’d need all of that to build an interpreter for a general-purpose programming language. The best way to figure out how all that works is to dig into the source for an existing interpreter. Interpreter source code is available for just about every common language, both dynamically typed and statically typed. You can also read the literature on the Smalltalk and Self interpreters as well as garbage collection and dynamic method dispatch. A good paper to read on register-based bytecode machines is The Implementation of Lua 5.0 [IdC05].

One of the things you’ll discover ...

Get Language Implementation Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.