C2 Compiler Concepts

Lieferzeit: Lieferbar innerhalb 14 Tagen

53,49 

ISBN: 3211824316
ISBN 13: 9783211824313
Autor: Teufel, Bernd/Schmidt, Stephanie/Teufel, Thomas
Verlag: Springer Verlag GmbH
Umfang: xi, 176 S., 19 s/w Illustr., 176 p. 19 illus.
Erscheinungsdatum: 08.01.1993
Auflage: 1/1993
Produktform: Kartoniert
Einband: KT
Artikelnummer: 7002594 Kategorie:

Beschreibung

Writing a compiler is a very good practice for learning how complex problems could be solved using methods from software engineering. It is extremely important to program rather carefully and exactly, because we have to remember that a compiler is a program which has to handle an input that is usually incorrect. Therefore, the compiler itself must be error-free. Referring to Niklaus Wirth, we postulate that the grammatical structure of a language must be reflected in the structure of the compiler. Thus, the complexity of a language determines the complexity of the compiler (cf. Compilerbau. B. G. Teubner Verlag, Stuttgart, 1986). This book is about the translation of programs written in a high level programming language into machine code. It deals with all the major aspects of compilation systems (including a lot of examples and exercises), and was outlined for a one session course on compilers. The book can be used both as a teacher's reference and as a student's text book. In contrast to some other books on that topic, this text is rather concentrated to the point. However, it treats all aspects which are necessary to understand how compilation systems will work. Chapter One gives an introductory survey of compilers. Different types of compilation systems are explained, a general compiler environment is shown, and the principle phases of a compiler are introduced in an informal way to sensitize the reader for the topic of compilers.

Autorenporträt

Inhaltsangabe1 General Remarks on Compiler Theory.- 1.1 Types of Compilation Systems.- 1.2 Compiler Environments.- 1.3 Analysis and Synthesis.- 2 Formal Aspects.- 2.1 Backus-Naur Fonri (BNF).- 2.2 Formal Languages.- 2.3 Analyzing Techniques.- 2.4 Syntax Graphs.- 2.5 The Programming Language PL/0.- 3 Lexical Analysis and Symbol Tables.- 3.1 Finite Automata.- 3.2 The Scanner.- 3.3 Symbol Tables.- 3.4 Lexical Analysis of PUO.- 4 Syntax Analysis and Parser Construction.- 4.1 Top-down Analysis.- 4.1.1 LL-grammars.- 4.1.2 Recursive Descent Strategy.- 4.1.3 Tabular Parsing.- 4.2 Bottom-up Analysis.- 4.2.1 LR(k)-grammars.- 4.2.2 Shift-Reduce Analysis.- 4.2.3 LR-Parser.- 4.3 Recursive Descent Parser for PL/0.- 5 Semantic and Type Analysis.- 5.1 Intermediate Codes.- 5.2 Syntax-directed Translation.- 5.3 Type Checking.- 5.4 Intermediate Code Generation for PUO.- 6 How to Handle Errors.- 6.1 Error Classification.- 6.2 Effects of Errors.- 6.3 Error Handling in Lexical Analysis.- 6.4 En-or Handling in Syntax Analysis.- 6.5 Semantic Errors.- 6.6 PL/0 Error Recovery.- 7 Code Generation and Optimization.- 7.1 Storage Allocation.- 7.1.1 Static Storage Allocation.- 7.1.2 Dynamic Storage Allocation.- 7.2 Parameter Passing.- 7.3 Variable Addressing.- 7.4 Code Generation.- 7.5 Code Optimization.- 8 Impacts of Modern Hardware Developments.- 8.1 Computer Architectures vs. Programming Languages.- 8.2 Instruction Sets and Microcode.- 8.3 RISC Architectures.- Exercises.- References.

Das könnte Ihnen auch gefallen …