This book provides the foundation for understanding the theory and pracitce of compilers. Revised and updated, it reflects the current state of compilation. Every chapter has been completely revised to reflect developments in software engineering, programming languages, and computer architecture that have occurred since 1986, when the last edition published. The authors, recognizing that few readers will ever go on to construct a compiler, retain their focus on the broader set of problems faced in software design and software development. Computer scientists, developers, and aspiring students that want to learn how to build, maintain, and execute a compiler for a major programming language.
1 Introduction
1.1 Language Processors
1.2 The Structure of a Compiler
1.3 The Evolution of Programming Languages
1.4 The Science of Building a Compiler
1.5 Applications of Compiler Technology
1.6 Programming Language Basics
1.7 Summary of Chapter 1
1.8 References for Chapter 1
2 A Simple Syntax-Directed Translator
2.1 Introduction
2.2 Syntax Definition
2.3 Syntax-Directed Translation
2.4 Parsing
2.5 A Translator for Simple Expressions
2.6 Lexical Analysis
2.7 Symbol Tables
2.8 Intermediate Code Generation
2.9 Summary of Chapter 2
3 Lexical Analysis
3.1 The Role of the Lexical Analyzer
3.2 Input Buffering
3.3 Specification of Tokens
3.4 Recognition of Tokens
3.5 The Lexical-Analyzer Generator Lex
3.6 Finite Automata
3.7 From Regular Expressions to Automata
3.8 Design of a Lexical-Analyzer Generator
3.9 Optimization of DFA-Based Pattern Matchers
3.10 Summary of Chapter 3
3.11 References for Chapter 3
4 Syntax Analysis
4.1 Introduction
4.2 Context-Free Grammars
4.3 Writing a Grammar
4.4 Top-Down Parsing
4.5 Bottom-Up Parsing
4.6 Introduction to LR Parsing: Simple LR
4.7 More Powerful LR Parsers
4.8 Using Ambiguous Grammars
4.9 Parser Generators
4.10 Summary of Chapter 4
4.11 References for Chapter 4
5 Syntax-Directed Translation
5.1 Syntax-Directed Definitions
5.2 Evaluation Orders for SDD's
5.3 Applications of Syntax-Directed Translation
5.4 Syntax-Directed Translation Schemes
5.5 Implementing L-Attributed SDD's
5.6 Summary of Chapter 5
5.7 References for Chapter 5
6 Intermediate-Code Generation
6.1 Variants of Syntax Trees
6.2 Three-Address Code
6.3 Types and Declarations
6.4 Translation of Expressions
6.5 Type Checking
6.6 Control Flow
6.7 Backpatching
6.8 Switch-Statements
6.9 Intermediate Code for Procedures
6.10 Summary of Chapter 6
6.11 References for Chapter 6
7 Run-Time Environments
7.1 Storage Organization
7.2 Stack Allocation of Space
7.3 Access to Nonlocal Data on the Stack
7.4 Heap Management
7.5 Introduction to Garbage Collection
7.6 Introduction to Trace-Based Collection
7.7 Short-Pause Garbage Collection
7.8 Advanced Topics in Garbage Collection
7.9 Summary of Chapter 7
7.10 References for Chapter 7
8 Code Generation
8.1 Issues in the Design of a Code Generator
8.2 The Target Language
8.3 Addresses in the Target Code
8.4 Basic Blocks and Flow Graphs
8.5 Optimization of Basic Blocks
8.6 A Simple Code Generator
8.7 Peephole Optimization
8.8 Register Allocation and Assignment
8.9 Instruction Selection by Tree Rewriting
8.10 Optimal Code Generation for Expressions
8.11 Dynamic Programming Code-Generation
8.12 Summary of Chapter 8
8.13 References for Chapter 8
9 Machine-Independent Optimizations
9.1 The Principal Sources of Optimization
9.2 Introduction to Data-Flow Analysis
9.3 Foundations of Data-Flow Analysis
9.4 Constant Propagation
9.5 Partial-Redundancy Elimination
9.6 Loops in Flow Graphs
9.7 Region-Based Analysis
9.8 Symbolic Analysis
9.9 Summary of Chapter 9
9.10 References for Chapter 9
10 Instruction-Level Parallelism
10.1 Processor Architectures
10.2 Code-Scheduling Constraints
10.3 Basic-Block Scheduling
10.4 Global Code Scheduling
10.5 Software Pipelining
10.6 Summary of Chapter 10
10.7 References for Chapter 10
11 Optimizing for Parallelism and Locality
11.1 Basic Concepts
11.2 Matrix Multiply: An In-Depth Example
11.3 Iteration Spaces
11.4 Affine Array Indexes
11.5 Data Reuse
11.6 Array Data-Dependence Analysis
11.7 Finding Synchronization-Free Parallelism
11.8 Synchronization Between Parallel Loops
11.9 Pipelining
11.10 Locality Optimizations
11.11 Other Uses of Affine Transforms
11.12 Summary of Chapter 11
11.13 References for Chapter 11
12 Interprocedural Analysis
12.1 Basic Concepts
12.2 Why Interprocedural Analysis?
12.3 A Logical Representation of Data Flow
12.4 A Simple Pointer-Analysis Algorithm
12.5 Context-Insensitive Interprocedural Analysis
12.6 Context-Sensitive Pointer Analysis
12.7 Datalog Implementation by BDD's
12.8 Summary of Chapter 12
12.9 References for Chapter 12
A A Complete Front End
A.1 The Source Language
A.2 Main
A.3 Lexical Analyzer
A.4 Symbol Tables and Types
A.5 Intermediate Code for Expressions
A.6 Jumping Code for Boolean Expressions
A.7 Intermediate Code for Statements
A.8 Parser
A.9 Creating the Front End
B Finding Linearly Independent Solutions
Index
《这一生关于你的风景》内容简介:我们终其一生,都在自我发现的道路上持续行走,推翻重建,自我成全。或许这条路,一辈子都走不完
《反腐大案》内容简介:近年来,高官落马案件频发,人们对于“贪官”“反腐”等相关事件的关注度越来越高的同时,对于如何更加有效
Asadeveloper,you’veprobablyheardthatfunctionalprogrammingtechniqueshelpmanagethe...
《新普惠经济:数字技术如何推动普惠性增长(英文版)》内容简介:本书基于阿里巴巴等的电子商务实践,强调了数字技术对普惠性增长
科研论文配图设计与制作从入门到精通-(附1DVD) 本书特色 本书针对科研人员在科学可视化表达中关心的问题——科研论文配图的设计与制作进...
《关羽:神化的《三国志》英雄》内容简介:《三国志》中的豪杰,为什么会被人们作为商业之神来崇拜呢?从史实到故事,再到信仰的对
本书为日本公认的最好的Ruby入门教程。松本行弘亲自审校并作序推荐。本书支持最新的Ruby2.0,也附带讲解了可运行于1.9版本的代码
菜鸟起飞,从这里开始!本笔记将透露:渗透、术语、脚本、内网、溢出各种攻击相关的手段和名词,总结、技巧、细节、亮点,不断变
《数字治理:中国城市视角》内容简介:本书围绕数字治理的背景、概念、现状以及趋势,从城市视角出发,分析和研究了国际国内城市在
《破解牛股密码(第2版)》内容简介:本书通过对市场中个股的描述,总结出牛股上涨的内在因素和外在图形特征,通过对牛股内外在特征
AquickguidetoeverythinganyonewouldwanttoknowaboutthesoaringlypopularInternetprog...
《明哥聊求职》内容简介:李明编著的《明哥聊求职》旨在帮助初入职场的年轻人了解求职的方方面面,从做好面试前的准备工作到如何编
本书是以MATLAB6.5版本为依托,介绍了MATLAB在通信工程中的各个方面地应用,是一本非常全面地介绍MATLAB通信仿真的书籍。该书作
《知识产权中国化应用研究》内容简介:本书系知识产权法权威学者吴汉东教授对知识产权基本问题的独到见解,浓缩了作者几十年学术研
《我们今天怎样做父亲》内容简介:回望晚清民国,我们发现了一个教育的传奇:一个偏僻的小山村,一个寒素之家,竟然诞生出了中国近
中文版CoreIDRAW图形设计经典技法118例-含光盘1张 本书特色 《中文版CorelDRAW图形设计经典技法118例(附光盘)》(作者曾全、邱雅莉)主要面...
《基于深度学习的自然语言处理》内容简介:将深度学习方法应用于各种自然语言处理任务,可以让你的算法在速度和准确性方面提升到一
《人人都来掷骰子:日常生活中的概率与统计》内容简介:概率和统计以各种各样的方式影响着普通百姓的生活——正如《人人都来掷骰子
《庆春》内容简介:老舍是我国现代杰出的文学家和语言大师。本书精选了老舍先生的经典作品,包括短篇小说和散文。其中有幽默诙谐的
《Redis入门指南》是一本Redis的入门指导书籍,以通俗易懂的方式介绍了Redis基础与实践方面的知识,包括历史与特性、在开发和生产