相關主題
商品描述
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.
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.
商品描述(中文翻譯)
這本教科書涵蓋了編譯器建構的基本原理,從詞法分析和語法分析到語義處理和代碼生成。作為一個運行範例,書中描述並開發了一個簡單的類似於 Java 的程式語言編譯器(MicroJava)。它生成的可執行位元碼類似於 Java 位元碼。其他主題包括使用屬性文法描述翻譯過程,以及使用編譯器生成器自動生成編譯器的核心部分。對於語法分析,本書專注於使用遞歸下降的自上而下解析,但也描述了自下而上的解析。所有的程式碼範例均以 Java 呈現。
一本附屬的網頁包含了一整套用於入門編譯器課程的 PowerPoint 幻燈片、每章結尾提供的70多個練習題的範例解答,以便練習和鞏固該章內容,以及 MicroJava 編譯器的完整源代碼和其他程式碼範例。此外,書中描述的開源編譯器生成器 Coco/R 也提供了可執行檔和源代碼。
本書的目標讀者包括計算機科學或相關領域的學生,以及希望在日常工作中應用基本編譯技術的從業者,例如在製作軟體工具時。它可以作為入門編譯器課程的教科書,並為更高級的編譯器優化課程奠定基礎。
作者簡介
Hanspeter Mössenböck is Professor of Computer Science at the Johannes Kepler University Linz and has been involved with programming languages and compilers for many years. For more than 20 years, he has been working with Oracle Labs in the field of dynamic compiler optimization for Java and other programming languages. Many of the techniques developed at his institute are now used in Java systems worldwide. He is the author of several books on Java, C#, .NET and compiler-generating systems.
作者簡介(中文翻譯)
漢斯彼得·莫森博克(Hanspeter Mössenböck)是林茨約翰·開普勒大學(Johannes Kepler University Linz)的計算機科學教授,並且在程式語言和編譯器領域有多年經驗。超過20年來,他一直在甲骨文實驗室(Oracle Labs)從事Java及其他程式語言的動態編譯器優化工作。他所在的研究所開發的許多技術現在已在全球的Java系統中使用。他是多本有關Java、C#、.NET及編譯器生成系統的書籍的作者。