Atjaunināt sīkdatņu piekrišanu

Practical Approach to Compiler Construction 1st ed. 2017 [Mīkstie vāki]

  • Formāts: Paperback / softback, 254 pages, height x width: 235x155 mm, weight: 4161 g, 26 Illustrations, black and white; XV, 254 p. 26 illus., 1 Paperback / softback
  • Sērija : Undergraduate Topics in Computer Science
  • Izdošanas datums: 10-Apr-2017
  • Izdevniecība: Springer International Publishing AG
  • ISBN-10: 3319527878
  • ISBN-13: 9783319527871
Citas grāmatas par šo tēmu:
  • Mīkstie vāki
  • Cena: 42,44 €*
  • * ši ir gala cena, t.i., netiek piemērotas nekādas papildus atlaides
  • Standarta cena: 49,94 €
  • Ietaupiet 15%
  • Grāmatu piegādes laiks ir 3-4 nedēļas, ja grāmata ir uz vietas izdevniecības noliktavā. Ja izdevējam nepieciešams publicēt jaunu tirāžu, grāmatas piegāde var aizkavēties.
  • Daudzums:
  • Ielikt grozā
  • Piegādes laiks - 4-6 nedēļas
  • Pievienot vēlmju sarakstam
  • Formāts: Paperback / softback, 254 pages, height x width: 235x155 mm, weight: 4161 g, 26 Illustrations, black and white; XV, 254 p. 26 illus., 1 Paperback / softback
  • Sērija : Undergraduate Topics in Computer Science
  • Izdošanas datums: 10-Apr-2017
  • Izdevniecība: Springer International Publishing AG
  • ISBN-10: 3319527878
  • ISBN-13: 9783319527871
Citas grāmatas par šo tēmu:

This book provides a practically-oriented introduction to high-level programming language implementation. It demystifies what goes on within a compiler and stimulates the reader's interest in compiler design, an essential aspect of computer science. Programming language analysis and translation techniques are used in many software application areas.

A Practical Approach to Compiler Construction covers the fundamental principles of the subject in an accessible way. It presents the necessary background theory and shows how it can be applied to implement complete compilers. A step-by-step approach, based on a standard compiler structure is adopted, presenting up-to-date techniques and examples. Strategies and designs are described in detail to guide the reader in implementing a translator for a programming language.

A simple high-level language, loosely based on C, is used to illustrate aspects of the compilation process. Code examples in C are included, together with discussion and illustration of how this code can be extended to cover the compilation of more complex languages. Examples are also given of the use of the flex and bison compiler construction tools. Lexical and syntax analysis is covered in detail together with a comprehensive coverage of semantic analysis, intermediate representations, optimisation and code generation. Introductory material on parallelisation is also included.

Designed for personal study as well as for use in introductory undergraduate and postgraduate courses in compiler design, the author assumes that readers have a reasonable competence in programming in any high-level language.

 

Recenzijas

 I found this book easy to read, with relevant examples and a good set of references. For me, its most interesting feature is the strategy used to support a particular audience: people who need to process text but will not write production compilers. The material itself has been standard for 30 years. (Computing Reviews, August, 2017)

The book is an excellent resource for anyone who is looking for an introduction to the basic structure and concepts of a compiler. Better-suited works are available for an in-depth analysis. (Jonas Devlieghere, Computing Reviews , February, 16, 2018)

1 Introduction
1(12)
1.1 High-Level Languages
1(4)
1.1.1 Advantages of High-Level Languages
2(1)
1.1.2 Disadvantages of High-Level Languages
3(2)
1.2 High-Level Language Implementation
5(4)
1.2.1 Compilers
6(1)
1.2.2 Compiler Complexity
6(1)
1.2.3 Interpreters
7(2)
1.3 Why Study Compilers?
9(1)
1.4 Present and Future
10(1)
1.5 Conclusions and Further Reading
11(2)
References
12(1)
2 Compilers and Interpreters
13(24)
2.1 Approaches to Programming Language Implementation
13(3)
2.1.1 Compile or Interpret?
15(1)
2.2 Defining a Programming Language
16(6)
2.2.1 BNF and Variants
17(4)
2.2.2 Semantics
21(1)
2.3 Analysis of Programs
22(6)
2.3.1 Grammars
22(1)
2.3.2 Chomsky Hierarchy
23(1)
2.3.3 Parsing
24(4)
2.4 Compiler and Interpreter Structure
28(6)
2.4.1 Lexical Analysis
29(1)
2.4.2 Syntax Analysis
30(1)
2.4.3 Semantic Analysis
31(1)
2.4.4 Machine-Independent Optimisation
31(1)
2.4.5 Code Generation
32(1)
2.4.6 Machine-Dependent Optimisation
32(1)
2.4.7 Symbol Tables
33(1)
2.4.8 Implementation Issues
33(1)
2.5 Conclusions and Further Reading
34(3)
References
35(2)
3 Lexical Analysis
37(38)
3.1 Lexical Tokens
38(7)
3.1.1 An Example
38(1)
3.1.2 Choosing the List of Tokens
39(2)
3.1.3 Issues with Particular Tokens
41(3)
3.1.4 Internal Representation of Tokens
44(1)
3.2 Direct Implementation
45(12)
3.2.1 Planning a Lexical Analyser
46(1)
3.2.2 Recognising Individual Tokens
47(7)
3.2.3 More General Issues
54(3)
3.3 Regular Expressions
57(4)
3.3.1 Specifying and Using Regular Expressions
57(1)
3.3.2 Recognising Instances of Regular Expressions
58(1)
3.3.3 Finite-State Machines
59(2)
3.4 Tool-Based Implementation
61(11)
3.4.1 Towards a Lexical Analyser for C
62(8)
3.4.2 Comparison with a Direct Implementation
70(2)
3.5 Conclusions and Further Reading
72(3)
References
73(2)
4 Approaches to Syntax Analysis
75(20)
4.1 Derivations
75(2)
4.1.1 Leftmost and Rightmost Derivations
76(1)
4.2 Parsing
77(13)
4.2.1 Top--Down Parsing
78(1)
4.2.2 Parse Trees and the Leftmost Derivation
78(4)
4.2.3 A Top--Down Parsing Algorithm
82(4)
4.2.4 Classifying Grammars and Parsers
86(2)
4.2.5 Bottom-Up Parsing
88(1)
4.2.6 Handling Errors
89(1)
4.3 Tree Generation
90(1)
4.4 Conclusions and Further Reading
91(4)
References
93(2)
5 Practicalities of Syntax Analysis
95(46)
5.1 Top-Down Parsing
96(4)
5.1.1 A Simple Top-Down Parsing Example
97(3)
5.1.2 Grammar Transformation for Top-Down Parsing
100(1)
5.2 Bottom-Up Parsing
100(10)
5.2.1 Shift-Reduce Parsers
101(2)
5.2.2 Bison---A Parser Generator
103(7)
5.3 Tree Generation
110(3)
5.4 Syntax Analysis for DL
113(19)
5.4.1 A Top-Down Syntax Analyser for DL
113(11)
5.4.2 A Bottom-Up Syntax Analyser for DL
124(7)
5.4.3 Top-Down or Bottom-Up?
131(1)
5.5 Error Handling
132(2)
5.6 Declarations and Symbol Tables
134(2)
5.7 What Can Go Wrong?
136(1)
5.8 Conclusions and Further Reading
137(4)
References
138(3)
6 Semantic Analysis and Intermediate Code
141(36)
6.1 Types and Type Checking
142(4)
6.1.1 Storing Type Information
142(1)
6.1.2 Type Rules
143(3)
6.2 Storage Management
146(7)
6.2.1 Access to Simple Variables
147(1)
6.2.2 Dealing with Scope
147(1)
6.2.3 Functions
148(2)
6.2.4 Arrays and Other Structures
150(3)
6.3 Syntax-Directed Translation
153(1)
6.3.1 Attribute Grammars
153(1)
6.4 Intermediate Code
154(7)
6.4.1 Linear IRs
155(3)
6.4.2 Graph-Based IRs
158(3)
6.5 Practical Considerations
161(12)
6.5.1 A Three-Address Code IR
162(1)
6.5.2 Translation to the IR
163(8)
6.5.3 An Example
171(2)
6.6 Conclusions and Further Reading
173(4)
References
175(2)
7 Optimisation
177(28)
7.1 Approaches to Optimisation
178(2)
7.1.1 Design Principles
178(2)
7.2 Local Optimisation and Basic Blocks
180(7)
7.2.1 Constant Folding and Constant Propagation
181(1)
7.2.2 Common Subexpressions
182(4)
7.2.3 Elimination of Redundant Code
186(1)
7.3 Control and Data Flow
187(7)
7.3.1 Non-local Optimisation
188(2)
7.3.2 Removing Redundant Variables
190(1)
7.3.3 Loop Optimisation
191(3)
7.4 Parallelism
194(7)
7.4.1 Parallel Execution
196(1)
7.4.2 Detecting Opportunities for Parallelism
197(1)
7.4.3 Arrays and Parallelism
198(3)
7.5 Conclusions and Further Reading
201(4)
References
202(3)
8 Code Generation
205(30)
8.1 Target Machines
205(5)
8.1.1 Real Machines
206(3)
8.1.2 Virtual Machines
209(1)
8.2 Instruction Selection
210(2)
8.3 Register Allocation
212(7)
8.3.1 Live Ranges
214(1)
8.3.2 Graph Colouring
215(4)
8.3.3 Complications
219(1)
8.3.4 Application to DL's Intermediate Representation
219(1)
8.4 Function Call and Stack Management
219(4)
8.4.1 DL Implementation
220(1)
8.4.2 Call and Return Implementation
221(2)
8.5 Optimisation
223(7)
8.5.1 Instruction-Level Parallelism
223(3)
8.5.2 Other Hardware Features
226(2)
8.5.3 Peephole Optimisation
228(1)
8.5.4 Superoptimisation
229(1)
8.6 Automating Code Generator Construction
230(1)
8.7 Conclusions and Further Reading
231(4)
References
233(2)
9 Implementation Issues
235(12)
9.1 Implementation Strategies
235(5)
9.1.1 Cross-Compilation
237(1)
9.1.2 Implementation Languages
237(2)
9.1.3 Portability
239(1)
9.2 Additional Software
240(2)
9.3 Particular Requirements
242(1)
9.4 The Future
243(1)
9.5 Conclusions and Further Reading
243(4)
References
245(2)
Appendix A The DL Language 247(4)
Index 251
Des Watson works in the field of compiler design and development. He has extensive experience in research and both undergraduate and postgraduate teaching in programming language design and implementation at the University of Sussex, UK. He also works with commercial organisations, particularly in the field of compiler optimisation of code for embedded systems.