| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
Intermediate Code Generation | |
| |
| |
Intermediate Languages | |
| |
| |
Declarations | |
| |
| |
Assignment Statements | |
| |
| |
Boolean Expressions | |
| |
| |
Case Statements | |
| |
| |
Backpatching | |
| |
| |
Procedure Calls | |
| |
| |
Exercises | |
| |
| |
Bibliographic Notes | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
Want to Write a Comp | |