Skip to content

Programming Language Processors in Java Compilers and Interpreters

Best in textbook rentals since 2012!

ISBN-10: 0130257869

ISBN-13: 9780130257864

Edition: 2000

Authors: David A. Watt, Deryck F. Brown

List price: $119.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

A gently-paced introduction to designing and building compilers using the object-oriented programming language Java, this book features examples in Java and a complementary working compiler and interpreter that are provided via the Internet.
Customers also bought

Book details

List price: $119.99
Copyright year: 2000
Publisher: Prentice Hall PTR
Publication date: 1/7/2000
Binding: Hardcover
Pages: 436
Size: 7.50" wide x 9.75" long x 1.00" tall
Weight: 1.936
Language: English

Preface
Introduction
Levels of programming language
Programming language processors
Specification of programming languages
Syntax
Contextual constraints
Semantics
Case study: the programming language Triangle
Further reading
Exercises
Language Processors
Translators and compilers
Interpreters
Real and abstract machines
Interpretive compilers
Portable compilers
Bootstrapping
Bootstrapping a portable compiler
Full bootstrap
Half bootstrap
Bootstrapping to improve efficiency
Case study: the Triangle language processor
Further reading
Exercises
Compilation
Phases
Syntactic analysis
Contextual analysis
Code generation
Passes
Multi-pass compilation
One-pass compilation
Compiler design issues
Case study: the Triangle compiler
Further reading
Exercises
Syntactic Analysis
Subphases of syntactic analysis
Tokens
Grammars revisited
Regular expressions
Extended BNF
Grammar transformations
Starter sets
Parsing
The bottom-up parsing strategy
The top-down parsing strategy
Recursive-descent parsing
Systematic development of a recursive-descent parser
Abstract syntax trees
Representation
Construction
Scanning
Case study: syntactic analysis in the Triangle compiler
Scanning
Abstract syntax trees
Parsing
Error handling
Further reading
Exercises
Contextual Analysis
Identification
Monolithic block structure
Flat block structure
Nested block structure
Attributes
Standard environment
Type checking
A contextual analysis algorithm
Decoration
Visitor classes and objects
Contextual analysis as a visitor object
Case study: contextual analysis in the Triangle compiler
Identification
Type checking
Standard environment
Further reading
Exercises
Run-Time Organization
Data representation
Primitive types
Records
Disjoint unions
Static arrays
Dynamic arrays
Recursive types
Expression evaluation
Static storage allocation
Stack storage allocation
Accessing local and global variables
Accessing nonlocal variables
Routines
Routine protocols
Static links
Arguments
Recursion
Heap storage allocation
Heap management
Explicit storage deallocation
Automatic storage deallocation and garbage collection
Run-time organization for object-oriented languages
Case study: the abstract machine TAM
Further reading
Exercises
Code Generation
Code selection
Code templates
Special-case code templates
A code generation algorithm
Representation of the object program
Systematic development of a code generator
Control structures
Constants and variables
Constant and variable declarations
Static storage allocation
Stack storage allocation
Procedures and functions
Global procedures and functions
Nested procedures and functions
Parameters
Case study: code generation in the Triangle compiler
Entity descriptions
Constants and variables
Further reading
Exercises
Interpretation
Iterative interpretation
Iterative interpretation of machine code
Iterative interpretation of command languages
Iterative interpretation of simple programming languages
Recursive interpretation
Case study: the TAM interpreter
Further reading
Exercises
Conclusion
The programming language life cycle
Design
Specification
Prototypes
Compilers
Error reporting
Compile-time error reporting
Run-time error reporting
Efficiency
Compile-time efficiency
Run-time efficiency
Further reading
Exercises
Projects with the Triangle language processor
Appendices
Answers to Selected Exercises
Informal Specification of the Programming Language Triangle
Introduction
Commands
Expressions
Value-or-variable names
Declarations
Parameters
Type-denoters
Lexicon
Programs
Description of the Abstract Machine TAM
Storage and registers
Instructions
Routines
Class Diagrams for the Triangle Compiler
Compiler
Abstract syntax trees
Commands
Expressions
Value-or-variable names
Declarations
Parameters
Type-denoters
Terminals
Syntactic analyzer
Contextual analyzer
Code generator
Bibliography
Index