Crafting a Compiler
Title | Crafting a Compiler PDF eBook |
Author | Charles N. Fischer |
Publisher | Benjamin-Cummings Publishing Company |
Pages | 840 |
Release | 1988 |
Genre | Computers |
ISBN |
Software -- Programming Languages.
Crafting Interpreters
Title | Crafting Interpreters PDF eBook |
Author | Robert Nystrom |
Publisher | Genever Benning |
Pages | 1021 |
Release | 2021-07-27 |
Genre | Computers |
ISBN | 0990582949 |
Despite using them every day, most software engineers know little about how programming languages are designed and implemented. For many, their only experience with that corner of computer science was a terrifying "compilers" class that they suffered through in undergrad and tried to blot from their memory as soon as they had scribbled their last NFA to DFA conversion on the final exam. That fearsome reputation belies a field that is rich with useful techniques and not so difficult as some of its practitioners might have you believe. A better understanding of how programming languages are built will make you a stronger software engineer and teach you concepts and data structures you'll use the rest of your coding days. You might even have fun. This book teaches you everything you need to know to implement a full-featured, efficient scripting language. You'll learn both high-level concepts around parsing and semantics and gritty details like bytecode representation and garbage collection. Your brain will light up with new ideas, and your hands will get dirty and calloused. Starting from main(), you will build a language that features rich syntax, dynamic typing, garbage collection, lexical scope, first-class functions, closures, classes, and inheritance. All packed into a few thousand lines of clean, fast code that you thoroughly understand because you wrote each one yourself.
Crafting a Compiler with C
Title | Crafting a Compiler with C PDF eBook |
Author | Charles N. Fischer |
Publisher | Addison-Wesley |
Pages | 812 |
Release | 1991-01-01 |
Genre | Computers |
ISBN | 9780805321661 |
This extremely practical, hands-on approach to building compilers using the C programming language includes numerous examples of working code from a real compiler and covers such advanced topics as code generation, optimization, and real-world parsing. It is an ideal reference and tutorial. 0805321667B04062001
Modern Compiler Implementation in C
Title | Modern Compiler Implementation in C PDF eBook |
Author | Andrew W. Appel |
Publisher | Cambridge University Press |
Pages | 560 |
Release | 2004-07-08 |
Genre | Computers |
ISBN | 1107268567 |
This new, expanded textbook describes all phases of a modern compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as functional and object-oriented languages, that are missing from most books. In addition, more advanced chapters are now included so that it can be used as the basis for a two-semester or graduate course. The most accepted and successful techniques are described in a concise way, rather than as an exhaustive catalog of every possible variant. Detailed descriptions of the interfaces between modules of a compiler are illustrated with actual C header files. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the advanced chapters, covers the compilation of object-oriented and functional languages, garbage collection, loop optimizations, SSA form, loop scheduling, and optimization for cache-memory hierarchies.
Lisp in Small Pieces
Title | Lisp in Small Pieces PDF eBook |
Author | Christian Queinnec |
Publisher | Cambridge University Press |
Pages | 540 |
Release | 2003-12-04 |
Genre | Computers |
ISBN | 1139643282 |
This is a comprehensive account of the semantics and the implementation of the whole Lisp family of languages, namely Lisp, Scheme and related dialects. It describes 11 interpreters and 2 compilers, including very recent techniques of interpretation and compilation. The book is in two parts. The first starts from a simple evaluation function and enriches it with multiple name spaces, continuations and side-effects with commented variants, while at the same time the language used to define these features is reduced to a simple lambda-calculus. Denotational semantics is then naturally introduced. The second part focuses more on implementation techniques and discusses precompilation for fast interpretation: threaded code or bytecode; compilation towards C. Some extensions are also described such as dynamic evaluation, reflection, macros and objects. This will become the new standard reference for people wanting to know more about the Lisp family of languages: how they work, how they are implemented, what their variants are and why such variants exist. The full code is supplied (and also available over the Net). A large bibliography is given as well as a considerable number of exercises. Thus it may also be used by students to accompany second courses on Lisp or Scheme.
Modern Compiler Design
Title | Modern Compiler Design PDF eBook |
Author | Dick Grune |
Publisher | Springer Science & Business Media |
Pages | 832 |
Release | 2012-07-20 |
Genre | Computers |
ISBN | 1461446996 |
"Modern Compiler Design" makes the topic of compiler design more accessible by focusing on principles and techniques of wide application. By carefully distinguishing between the essential (material that has a high chance of being useful) and the incidental (material that will be of benefit only in exceptional cases) much useful information was packed in this comprehensive volume. The student who has finished this book can expect to understand the workings of and add to a language processor for each of the modern paradigms, and be able to read the literature on how to proceed. The first provides a firm basis, the second potential for growth.
A Retargetable C Compiler
Title | A Retargetable C Compiler PDF eBook |
Author | Christopher W. Fraser |
Publisher | Addison-Wesley Professional |
Pages | 598 |
Release | 1995 |
Genre | Computers |
ISBN |
This book brings a unique treatment of compiler design to the professional who seeks an in-depth examination of a real-world compiler. Chris Fraser of AT &T Bell Laboratories and David Hanson of Princeton University codeveloped lcc, the retargetable ANSI C compiler that is the focus of this book. They provide complete source code for lcc; a target-independent front end and three target-dependent back ends are packaged as a single program designed to run on three different platforms. Rather than transfer code into a text file, the book and the compiler itself are generated from a single source to ensure accuracy.