Compiler ConstructionCompilers and operating systems constitute the basic interfaces between a programmer and the machine for which he is developing software. In this book we are concerned with the construction of the former. Our intent is to provide the reader with a firm theoretical basis for compiler construction and sound engineering principles for selecting alternate methods, imple menting them, and integrating them into a reliable, economically viable product. The emphasis is upon a clean decomposition employing modules that can be re-used for many compilers, separation of concerns to facilitate team programming, and flexibility to accommodate hardware and system constraints. A reader should be able to understand the questions he must ask when designing a compiler for language X on machine Y, what tradeoffs are possible, and what performance might be obtained. He should not feel that any part of the design rests on whim; each decision must be based upon specific, identifiable characteristics of the source and target languages or upon design goals of the compiler. The vast majority of computer professionals will never write a compiler. Nevertheless, study of compiler technology provides important benefits for almost everyone in the field . • It focuses attention on the basic relationships between languages and machines. Understanding of these relationships eases the inevitable tran sitions to new hardware and programming languages and improves a person's ability to make appropriate tradeoft's in design and implementa tion . |
Other editions - View all
Common terms and phrases
abstract machine access function access paths activation record addop ALGOL 60 algorithm array assignment attribute grammar attribution rules automata basic block basic symbols begin Boolean bytes character coercible compiler writer condition constant construction context-free context-free grammar contour coroutines corresponding data structure declaration defined definition table depends derived described determined discussed in Section EBNF element encoding entry environment equivalent error evaluation example execution expression false false finite floating point FORTRAN global identifier implementation input instruction integer jump keywords label language definition lexical analyzer LR(k memory module node nonterminal object operand operations optimization parameter parse tree parser parsing partition Pascal pointer possible production programming languages pushdown automaton recursive reduce reference register allocation regular expression regular grammar representation represented result sequence significand source language specified stack static string structure tree syntactic target machine technique Theorem tion transition traversal tuple variable