Название: Compiler Construction: Fundamentals and Applications Автор: Hanspeter Mössenböck Издательство: Springer Год: 2025 Страниц: 260 Язык: английский Формат: pdf (true) Размер: 10.1 MB
This textbook covers the fundamentals of compiler construction, from lexical analysis and syntax analysis to semantic processing and code generation. As a running example, a compiler for a simple Java-like programming language (MicroJava) is described and developed. It generates executable bytecode similar to Java bytecode. Other topics include the description of translation processes using attributed grammars and the use of a compiler generator to automatically generate the core parts of a compiler. For syntax analysis, the book concentrates on top-down parsing using recursive descent, but also describes bottom-up parsing. All code examples are presented in Java.
Fortunately, the basics of compiler construction are simple—anyone can learn them and add them to their repertoire of skills and techniques. Whilst compilers for programming languages such as Java or C/C++ are indeed only developed by large companies, there are many tasks (even outside of actual compiler construction) that can be solved easily and elegantly using quite elementary techniques. In principle, these techniques can be used whenever there is a structured input that can be described by a grammar. Examples of this are simple command languages, the processing of configuration files, log files, parts lists or data series of measurement data.
This book shows how it’s done. It covers the practical basics of compiler construction, from lexical analysis and syntax analysis to semantic processing and code generation. Other topics include the description of translation processes using attributed grammars and the use of a compiler generator to automatically generate the core parts of a compiler. These last two topics in particular are highly relevant in practice although they are not generally included in many books on compilers.
A companion web page contains a full set of PowerPoint slides for an introductory compiler course, sample solutions for more than 70 exercises provided at the end of each chapter to practice and reinforce the content of that chapter, and the full source code of the MicroJava compiler as well as other code samples. In addition, the open-source compiler generator Coco/R described in the book is provided as an executable and in source code.
The book targets both students of Computer Science or related fields as well as practitioners who want to apply basic compiling techniques in their daily work, e.g., when crafting software tools. It can be used as a textbook for an introductory compiler course on which more advanced courses on compiler optimizations can be based.
- Explains from a practical point of view how to write compilers or compiler-like tools - Includes as a running example the development of a compiler for MicroJava, a simple Java-like programming language - Complemented by a Web page with course slides, solutions to all exercises, and the source code of the MicroJava compiler
Скачать Compiler Construction: Fundamentals and Applications
|