Maintaining a balance between a theoretical and practical approach to this important subject, Elements of Compiler Design serves as an introduction to compiler writing for undergraduate students. From a theoretical viewpoint, it introduces rudimental models, such as automata and grammars, that underlie compilation and its essential phases. Based on these models, the author details the concepts, methods, and techniques employed in compiler design in a clear and easy-to-follow way. From a practical point of view, the book describes how compilation techniques are implemented. In fact, throughout the text, a case study illustrates the design of a new programming language and the construction of its compiler. While discussing various compilation techniques, the author demonstrates their implementation through this case study. In addition, the book presents many detailed examples and computer programs to emphasize the applications of the compiler algorithms. After studying this self-contained textbook, students should understand the compilation process, be able to write a simple real compiler, and easily follow advanced books on the subject.