/CPRL-Java-3rd

Repository for the book "Compiler Design Using Java®: An Object-Oriented Approach (Third Edition)" by John I. Moore, Jr.

Primary LanguageJavaThe UnlicenseUnlicense

Compiler Design Using Java®: An Object-Oriented Approach (Third Edition)

This repository contains handouts, PowerPoint slides, and Java source files to accompany the book Compiler Design Using Java®: An Object-Oriented Approach (Third Edition) by John I. Moore, Jr. The book covers implementation of a compiler for CPRL (Compiler PRoject Language), a programming language designed for teaching the basics of compiler construction. CPRL includes variables, statements, expressions, arrays, records, and subprograms. The target language for the compiler is assembly language for the CPRL Virtual Machine (CVM), a virtual machine with a stack-based architecture that is similar to but much simpler than the Java Virtual Machine (JVM).

The organization of the compiler project into modules has changed from the original printing of the book. The assembler has been moved into a separate module, so now there are four modules for the compiler project. See Appendix A listed below for details.

Several sections from the book are provided as PDF documents.