Compilers: Principles, Techniques, and Tools (精裝) 美國版
暫譯: 編譯器:原理、技術與工具 (精裝) 美國版

Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman

  • 出版商: Addison Wesley
  • 出版日期: 1986-01-01
  • 售價: $1,100
  • 貴賓價: 9.8$1,078
  • 語言: 英文
  • 頁數: 796
  • 裝訂: Hardcover
  • ISBN: 0201100886
  • ISBN-13: 9780201100884
  • 相關分類: Compiler
  • 無法訂購

買這商品的人也買了...

商品描述


Description

This introduction to compilers is the direct descendant of the well-known book by Aho and Ullman, Principles of Compiler Design. The authors present updated coverage of compilers based on research and techniques that have developed in the field over the past few years. The book provides a thorough introduction to compiler design and covers topics such as context-free grammars, fine state machines, and syntax-directed translation.

Back to Top


Table Of Contents

1. Introduction to Compiling.
Compilers.
Analysis of the Source Program.
The Phases of a Compiler.
Cousins of the Compiler.
The Grouping of Phases.
Compiler-Construction Tools.
Bibliographic Notes.

2. A Simple One-Pass Compiler.
Overview Syntax Definition.
Syntax-Directed Translation.
Parsing.
A Translator for Simple Expressions.
Lexical Analysis.
Incorporating a Symbol Table.
Abstract Stack Machines.
Putting the Techniques Together.
Exercises.
Bibliographic Notes.

3. Lexical Analysis.
The Role of the Lexical Analyzer.
Input Buffering.
Specification of Tokens.
Recognition of Tokens.
A Language for Specifying Lexical Analyzers.
Finite Automata.
From a Regular Expression to an NFA.
Design of a Lexical Analyzer Generator.
Optimization of DFA-Based Pattern Matchers.
Exercises.
Bibliographic Notes.

4. Syntax Analysis.
The Role of the Parser.
Context-Free Grammars.
Writing a Grammar.
Top-Down Parsing.
Bottom-Up Parsing.
Operator-Precedence Parsing.
LR Parsers.
Using Ambiguous Grammars.
Parser Generators.
Exercises.
Bibliographic Notes.

5. Syntax-Directed Translation.
Syntax-Directed Definitions.
Construction of Syntax Trees.
Bottom-Up Evaluation of S-Attributed Definitions.
L-Attributed Definitions.
Top Down Translation.
Bottom-Up Evaluation of Inherited Attributes.
Recursive Evaluators.
Space for Attribute Values at Compile Time.
Assigning Spaces at Compiler-Construction Time.
Analysis of Syntax-Directed Definitions.
Exercises.
Bibliographic Notes.

6. Type Checking.
Type Systems.
Specification of a Simple Type Checker.
Equivalence of Type Expressions.
Type Conversions.
Overloading of Functions and Operators.
Polymorphic Functions.
An algorithm for Unification.
Exercises.
Bibliographic Notes.

7. Run-Time Environments.
Source Language Issues.
Storage Organization.
Storage-Allocation Strategies.
Access to Nonlocal Names.
Parameter Passing.
Symbol Tables.
Language Facilities for Dynamic Storage Allocation.
Dynamic Storage Allocation Techniques.
Storage Allocation in Fortran.
Exercises.
Bibliographic Notes.

8. Intermediate Code Generation.
Intermediate Languages.
Declarations.
Assignment Statements.
Boolean Expressions.
Case Statements.
Backpatching.
Procedure Calls.
Exercises.
Bibliographic Notes.

9. Code Generation.
Issues in the Design of a Code Generator.
The Target Machine.
Run-Time Storage Management.
Basic Blocks and Flow Graphs.
Next-Use Information.
A Simple Code Generator.
Register Allocation and Assignment.
The Dag Representation of Basic Blocks.
Peephole Optimization.
Generating Code from Dags.
Dynamic Programming Code-Generation Algorithm.
Code-Generator Generators.
Exercises.
Bibliographic Notes.

10. Code Optimization.
Introduction.
The Principal Sources of Optimization.
Optimization of Basic Blocks.
Loops in Flow Graphs.
Introduction to Global Data-Flow Analysis.
Iterative Solution of Data-Flow Equations.
Code-Improving Transformations.
Dealing with Aliases.
Data-Flow Analysis of Structured Flow Graphs.
Efficient Data-Flow Algorithms.
A Tool for Data-Flow Analysis.
Estimation of Types.
Symbolic Debugging of Optimized Code.
Exercises.
Bibliographic Notes.

11. Want to Write a Compiler?
Planning a Compiler.
Approaches to Compiler Development.
The Compiler-Development Environment.
Testing and Maintenance.

12. A Look at Some Compilers.
EQN, a Preprocessor for Typesetting Mathematics.
Compilers for Pascal.
The C Compilers.
The Fortran H Compilers.
The Bliss/11 Compiler.
Modula-2 Optimizing Compiler.

Appendix: A Compiler Project.
Introduction.
A Pascal Subset.
Program Structure.
Lexical Conventions.
Suggested Exercises.
Evolution of the Interpreter.
Extensions.

Bibliography.
Index.


Back to Top

商品描述(中文翻譯)

描述
這本編譯器導論是Aho和Ullman著名書籍《編譯器設計原理》的直接後裔。作者根據過去幾年在該領域發展的研究和技術,提供了有關編譯器的最新內容。本書徹底介紹了編譯器設計,涵蓋了上下文無關文法、有限狀態機和語法導向翻譯等主題。

目錄
1. 編譯簡介。
編譯器。
原始程式分析。
編譯器的階段。
編譯器的親戚。
階段的分組。
編譯器建構工具。
參考文獻。

2. 一個簡單的單通道編譯器。
概述語法定義。
語法導向翻譯。
解析。
簡單表達式的翻譯器。
詞法分析。
整合符號表。
抽象堆疊機。
將技術整合在一起。
練習。
參考文獻。

3. 詞法分析。
詞法分析器的角色。
輸入緩衝。
令牌的規範。
令牌的識別。
用於指定詞法分析器的語言。
有限自動機。
從正則表達式到NFA。
詞法分析器生成器的設計。
基於DFA的模式匹配優化。
練習。
參考文獻。

4. 語法分析。
解析器的角色。
上下文無關文法。
編寫文法。
自上而下的解析。
自下而上的解析。
操作符優先解析。
LR解析器。
使用模糊文法。
解析器生成器。
練習。
參考文獻。

5. 語法導向翻譯。
語法導向定義。
語法樹的構建。
S-屬性定義的自下而上評估。
L-屬性定義。
自上而下的翻譯。
繼承屬性的自下而上評估。
遞歸評估器。
編譯時的屬性值空間。
編譯器建構時的空間分配。
語法導向定義的分析。
練習。
參考文獻。

6. 類型檢查。
類型系統。
簡單類型檢查器的規範。
類型表達式的等價性。
類型轉換。
函數和操作符的重載。
多型函數。
統一的算法。
練習。
參考文獻。

7. 執行時環境。
源語言問題。
存儲組織。
存儲分配策略。
訪問非本地名稱。
參數傳遞。
符號表。
動態存儲分配的語言功能。
動態存儲分配技術。
Fortran中的存儲分配。
練習。
參考文獻。

8. 中間代碼生成。
中間語言。
聲明。
賦值語句。
布林表達式。
案例語句。
回填。
程序調用。
練習。
參考文獻。

9. 代碼生成。
代碼生成器設計中的問題。
目標機器。
執行時存儲管理。
基本塊和流圖。
下一次使用信息。
一個簡單的代碼生成器。
寄存器分配和分配。
基本塊的DAG表示。
窺視優化。
從DAG生成代碼。
動態編程代碼生成算法。
代碼生成器生成器。
練習。
參考文獻。

10. 代碼優化。
介紹。
優化的主要來源。
基本塊的優化。
流圖中的循環。
全局數據流分析的介紹。
數據流方程的迭代解。
改進代碼的轉換。
處理別名。
結構化流圖的數據流分析。
高效的數據流算法。
數據流分析工具。
類型估計。
優化代碼的符號調試。
練習。
參考文獻。

11. 想寫一個編譯器嗎?
編譯器的規劃。
編譯器開發的方法。
編譯器開發環境。
測試和維護。

12. 看看一些編譯器。
EQN,一個數學排版的預處理器。
Pascal的編譯器。
C編譯器。
Fortran H編譯器。
Bliss/11編譯器。
Modula-2優化編譯器。

附錄:一個編譯器項目。
介紹。
一個Pascal子集。
程式結構。
詞法約定。
建議的練習。
解釋器的演變。
擴展。

參考文獻。
索引。