Synopses & Reviews
Master the skills you need to build your own compilers and interpreters
Compilers and interpreters are very difficult programs to write, but modern software engineering tackles the complexity. Design patterns and other object-oriented programming techniques guide you to develop well-structured code in incremental, understandable steps. Apply what you learn in this book to succeed with any complex software project.
You'll learn to:
Use Java to develop scanners and parsers for programming languages
Employ UML to model software components
Manage symbol tables with the Java Collections Framework
Use XML to represent the generated intermediate code
Develop an interpreter to execute programs, including a powerful interactive source-level debugger
Implement an integrated development environment (IDE) that animates the execution of programs
Use the IDE's graphical user interface to set breakpoints and single-step programs statement by statement with mouse clicks
Develop a code generator that emits object code for the Java Virtual Machine (JVM), and run the compiled code on multiple platforms
The Third Editionemphasizes modern software engineering practices in writing compilers and interpreters. Although its primary goal remains teaching these skills, the book can also be viewed as a modern software engineering book that uses writing compilers and interpreters as case studies. This edition keeps the same basic chapter organization as the Second Edition. The major changes includes new coverage of the Java Collections Framework and the Java Virtual Machine, UML, object-oriented programming, and XML and XML transformation tools. This is the definitive, up-to-date resource for IT professionals.
Long-awaited revision to a unique guide that covers both compilers and interpreters Revised, updated, and now focusing on Java instead of C++, this long-awaited, latest edition of this popular book teaches programmers and software engineering students how to write compilers and interpreters using Java. You?ll write compilers and interpreters as case studies, generating general assembly code for a Java Virtual Machine that takes advantage of the Java Collections Framework to shorten and simplify the code. In addition, coverage includes Java Collections Framework, UML modeling, object-oriented programming with design patterns, working with XML intermediate code, and more.
About the Author
Ronald Mak wrote the earlier editions of this very successful book as well as The Martian Principles for Successful Enterprise Systems: 20 Lessons Learned from NASA's Mars Exploration Rover Mission (also published by Wiley). He is also the author of Java Number Cruncher: The Java Programmer's Guide to Numerical Computing. He develops advanced software systems for organizations from startups to NASA. Currently a research staff member at the IBM Almaden Research Center, he also teaches compiler writing and software engineering at San José State University.
Table of Contents
Chapter 1 Introduction.
Chapter 2 Framework I: Compiler and Interpreter.
Chapter 3 Scanning.
Chapter 4 The Symbol Table.
Chapter 5 Parsing Expressions and Assignment Statements.
Chapter 6 Interpreting Expressions and Assignment Statements.
Chapter 7 Parsing Control Statements.
Chapter 8 Interpreting Control Statements.
Chapter 9 Parsing Declarations.
Chapter 10 Type Checking.
Chapter 11 Parsing Programs, Procedures, and Functions.
Chapter 12 Interpreting Pascal Programs.
Chapter 13 An Interactive Source-Level Debugger.
Chapter 14 Framework II: An Integrated Development Environment (IDE).
Chapter 15 Jasmin Assembly Language and Code Generation for the Java Virtual Machine.
Chapter 16 Compiling Programs, Assignment Statements, and Expressions.
Chapter 17 Compiling Procedure and Function Calls and String Operations.
Chapter 18 Compiling Control Statements, Arrays, and Records.
Chapter 19 Additional Topics.