Jump to ratings and reviews
Rate this book

Implementing Programming Languages. an Introduction to Compilers and Interpreters

Rate this book
Implementing a programming language means bridging the gap from the programmer's high-level thinking to the machine's zeros and ones. If this is done in an efficient and reliable way, programmers can concentrate on the actual problems they have to solve, rather than on the details of machines. But understanding the whole chain from languages to machines is still an essential part of the training of any serious programmer. It will result in a more competent programmer, who will moreover be able to develop new languages. A new language is often the best way to solve a problem, and less difficult than it may sound. This book follows a theory-based practical approach, where theoretical models serve as blueprint for actual coding. The reader is guided to build compilers and interpreters in a well-understood and scalable way. The solutions are moreover portable to different implementation languages. Much of the actual code is automatically generated from a grammar of the language, by using the BNF Converter tool. The rest can be written in Haskell or Java, for which the book gives detailed guidance, but with some adaptation also in C, C++, C#, or OCaml, which are supported by the BNF Converter. The main focus of the book is on standard imperative and functional a subset of C++ and a subset of Haskell are the source languages, and Java Virtual Machine is the main target. Simple Intel x86 native code compilation is shown to complete the chain from language to machine. The last chapter leaves the standard paths and explores the space of language design ranging from minimal Turing-complete languages to human-computer interaction in natural language.

224 pages, Paperback

First published May 9, 2012

Loading...
Loading...

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (21%)
4 stars
7 (50%)
3 stars
3 (21%)
2 stars
1 (7%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Simon Renhult.
1 review
April 25, 2026
Happened to see this book in the campus book store and it was cheap. Great find as it is a good introduction to almost all aspects of the compiler pipeline, except for optimization. Personally I prefer hand written recursive descent parsers over generated ones. It feels like I finally understand how you implement a type checker without it becomming a complete mess and seeing how conceptually simple a Hindley-Milner type checker is I kind of want to try implementing a small functional language with it.
Profile Image for Giovanni.
15 reviews17 followers
April 13, 2020
Very diluted introduction to PL. I still prefer a more practical approach as in "Essentials of programming languages" by Friedman.
Profile Image for Dima.
12 reviews2 followers
March 5, 2013
I think, it is a very good book to get a feeling of what the programming language implementation is. The advantage of this book is that it concentrates on producing something that works (and gives you excitement) very quickly. Then one can start diving in more details with all other wonderful books on compilers, programming language design and implementation.
Displaying 1 - 3 of 3 reviews