Engineering a compiler
This entirely revised second edition of Engineering a Compiler is full of technical updates and new material covering the latest developments in compiler technology. In this comprehensive text you will learn important techniques for constructing a modern compiler. Leading educators and researchers...
Autor principal: | |
---|---|
Otros Autores: | |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Amsterdam :
Elsevier
2012.
|
Edición: | 2nd ed |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628324806719 |
Tabla de Contenidos:
- Front Cover; About the Authors; Engineering a Compiler; Copyright; Dedication; About the Cover; Table of Contents; Preface to the Second Edition; Changes in the Second Edition; Organization; The Art and Science of Compilation; Approach; Philosophy; A Word About Programming Exercises; Additional Materials; Acknowledgments; Chapter 1.Overview of Compilation; 1.1Introduction; Conceptual Roadmap; Overview; Why Study Compiler Construction?; The Fundamental Principles of Compilation; 1.2Compiler Structure; May You Study in Interesting Times; 1.3Overview of Translation; Notation; 1.3.1 The Front End
- Checking SyntaxIntermediate Representations; Terminology; 1.3.2The Optimizer; Analysis; Transformation; 1.3.3The Back End; About ILOC; Instruction Selection; Register Allocation; Instruction Scheduling; Compiler Construction is Engineering; Interactions Among Code-Generation Components; 1.4Summary and Perspective; Chapter Notes; Exercises; Chapter 2.Scanners; 2.1Introduction; Conceptual Roadmap; Overview; 2.2Recognizing Words; 2.2.1A Formalism for Recognizers; 2.2.2Recognizing More Complex Words; Section Review; 2.3Regular Expressions; 2.3.1Formalizing the Notation
- Regular Expressions in Virtual Life2.3.2Examples; 2.3.3Closure Properties of REs; Programming Languages Versus Natural Languages; 2.4From Regular Expression to Scanner; 2.4.1Nondeterministic Finite Automata; Equivalence of NFAs and DFAs; 2.4.2Regular Expression to NFA: Thompson's Construction; 2.4.3NFA to DFA: The Subset Construction; Representing the Precedence of Operators; From Q to D; Example; Fixed-Point Computations; Computing ?-closure Offline; 2.4.4DFA to Minimal DFA: Hopcroft's Algorithm; Examples; 2.4.5Using a DFA as a Recognizer; Section Review; 2.5Implementing Scanners
- 2.5.1Table-Driven ScannersAvoiding Excess Roll Back; Generating the Transition and Classifier Tables; Changing Languages; 2.5.2Direct-Coded Scanners; Representing Strings; Overhead of Table Lookup; Replacing the Table-Driven Scanner's While Loop; Classifying Characters; 2.5.3Hand-Coded Scanners; Buffering the Input Stream; Generating Lexemes; 2.5.4Handling Keywords; Section Review; 2.6Advanced Topics; 2.6.1DFA to Regular Expression; 2.6.2Another Approach to DFA Minimization: Brzozowski's Algorithm; 2.6.3Closure-Free Regular Expressions; 2.7Chapter Summary and Perspective; Chapter Notes
- ExercisesChapter 3.Parsers; 3.1Introduction; Conceptual Roadmap; Overview; 3.2Expressing Syntax; 3.2.1Why Not Regular Expressions?; 3.2.2Context-Free Grammars; Backus-Naur Form; Context-Free Grammars; 3.2.3More Complex Examples; 3.2.4Encoding Meaning into Structure; Classes of Context-Free Grammars and Their Parsers; 3.2.5Discovering a Derivation for an Input String; 3.3Top-Down Parsing; 3.3.1Transforming a Grammar for Top-Down Parsing; A Top-Down Parser with Oracular Choice; Eliminating Left Recursion; Backtrack-Free Parsing; Left-Factoring to Eliminate Backtracking
- 3.3.2Top-Down Recursive-Descent Parsers