注册 | 登录读书好,好读书,读好书!
读书网-DuShu.com
当前位置: 首页出版图书科学技术计算机/网络网络与数据通信计算机网络编译原理与实践:英文版

编译原理与实践:英文版

编译原理与实践:英文版

定 价:¥58.00

作 者: (美)Kenneth C.Louden著
出版社: 机械工业出版社
丛编项: 经典原版书库
标 签: 编译原理

ISBN: 9787111108429 出版时间: 2002-02-01 包装: 胶版纸
开本: 24cm 页数: 592 字数:  

内容简介

  This exciting new book combines a detailed study of modern theories of compilerdesign with a complete description (with source code)of a working compiler for a small language.The book reflects the authors conviction that practical aspects of compiler design cannot be understood without a grasp of theory,and that theory cannot be truly comprehended by undergraduate students without seeing it put into actual practice.Unifying the texts discussion of concepts is a complete working compiler written in C and developed using the techniques discussed in each chapter.Extensive exercise sets at the end of each chapter focus students attention on specific programming problems.

作者简介


  ?

图书目录

l INTRODUCTION                  
 l.1 Why Compilers? A Brief History                   
 1.2 Programs Related to Compilers 4                  
 l.3 The Translation Process 7                  
 l.4 Major Data Structures in a Compiler l3                  
 1.5 Other Issues in Compiler Structure 14                  
 l.6 Bootstrapping and Porting 18                  
 l.7 The TINY Sample Language and Compiler 22                  
 1.8 C-Minus: A Language for a Compiler Project 26                  
 Exercises 27 Notes and References 29                  
                   
 2 SCANNING 31                  
 2.1 The Scanning Process 32                  
 2.2 Regular Expressions 34                  
 2.3 Finite Automata 47                  
 2.4 From Regular Expressions to DFAs 64                  
 2.5 Implementation of a TINY Scanner 75                  
 2.6 Use of  Lex to Generate a Scanner Automatically 81                  
 Exercises 89                  
 Programming Exercises 93                  
 Notes and References 94                  
                   
 3 CONTEXT-FREE GRAMMARS AND PARSING 95                  
 3.l The Parsing Process 96                  
 3.2 Context-Free Grammars 97                  
 3.3 Parse Trees and Abstract Syntax Trees 106                  
 3.4 Ambiguity 114                  
 3.5 Extended Notations: EBNF and Syntax Diagrams 123                  
 3.6 Formal Properties of Context-Free Languages 128                  
 3.7 Syntax of the TINY Language 133                  
 Exercises 138 Notes and References 142                  
                   
 4 T0P-D0WN PARSING l43                  
 4.1 Top-Down Parsing by Recursive-Descent l44                  
 4.2 LL(1) Parsing 152                  
 4.3 First and Follow Sets 168                  
 4.4 A Recursive-Descent Parser for the TINY Language l80                  
 4.5 Error Recovery in Top-Down Parsers l83                  
 Exercises l89 Programming Exercises l93                  
 Notes and References 196                  
                   
 5 BOTTOM-UP PARSING 197                  
 5.1 Overview of Bottom-Up Parsing 198                  
 5.2 Finite Automata of LR(0) Items and LR(0) Parsing 20l                  
 5.3 SLR(1) Parsing 2l0                  
 5.4 General LR(l) and LALR(l) Parsing 217                  
 5.5 Yacc: An LALR(l) Parser Generator 226                  
 5.6 Generation of a TINY Parser Using Yacc 243                  
 5.7 Error Recovery in Bottom-Up Parsers 245                  
 Exercises 250 Programming Exercises 254                  
 Notes and References 256                  
                   
 6  SEMANTIC ANALYSIS 257                  
 6.1 Attributes and Attribute Grammars 259                  
 6.2 Algorithms for Attribute Computation 270                  
 6.3 The Symbol Table 295                  
 6.4 Data Types and Type Checking 313                  
 6.5 A Semantic Analyzer for the TINY Language 334                  
 Exercises 339 Programming Exercises 342                  
 Notes and References 343                  
                   
 7  RUNTIME ENVIRONMENTS 345                  
 7.l Memory Organization During Program Execution 346                  
 7.2 Fully Static Runtime Environments 349                  
 7.3 Stack-Based Runtime Environments 352                  
 7.4 Dynamic Memory 373                  
 7.5 Parameter Passing Mechanisms 381                  
 7.6 A Runtime Environment for the TINY Language 386                  
 Exercises 388 Programming Exercises 395                  
 Notes and References 396                  
                   
 8 CODE GENERATION 397                  
 8.1 Intermediate Code and Data Structures for Code Generation                  
 8.2 Basic Code Generation Techniques                  
 8.3 Code Generation of Data Structure References                  
 8.4 Code Generation of Control Statements and Logical Expressions                  
 8.5 Code Generation of Procedure and Function Calls                  
 8.6 Code Generation in Commercial Compilers: Two Case Studies                  
 8.7 TM: A Simple Target Machine                  
 8.8 A Code Generator for the TINY Language                  
 8.9 A Survey of Code Optimization Techniques                  
 8.l0 Simple Optimizations for the TINY Code Generator                  
 Exercises Programming Exercises                  
 Notes and References                  
                   
 Appendix A C0MPILER PROJECT                  
 A.l Lexical Conventions of C-                  
 A.2 Syntax and Semantics of C-                  
 A.3 Sample Programs in C-                  
 A.4 A TINY Machine Runtime Environment for the C-- Language                  
 A.5 Programming Projects Using C-- and TM                  
                   
 Appendix B: TINY COMPILER LISTING                  
                   
 Appendix C: TINY MACHINE SHMULATOR LISTING Bibliography 558                  
                   
 Index 562                  

本目录推荐