Summary and Info
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.