Compiler Project Templates
Here, you find the program code templates of the compiler project that accompanies the book. Please refer to the project instructions in the book to use the templates.
Prerequisites
- Java Development Kit 13
- Eclipse of IntelliJ IDE recommended
- Intel 64 compatible processor (for JIT-compiled code)
- Windows, Linux, or MacOS (for JIT-compiled code)
Template 1: Lexer (Chapter 4)
- 1_Lexer.zip (zip, 9KB) (template and tests)
Template 2: Parser (Chapter 5)
- 2_Parser (zip, 21KB) (template and tests)
Template 3: Semantic Checker (Chapter 6)
- 3_Checker (zip, 18KB) (template and tests)
Template 4: Code Generator (Chapter 7)
- 4_Generator (zip, 42KB) (template, tests, and VM.jar)
Template 5: Virtual Machine & Interpreter (Chapter 9)
- 5_VirtualMachine (zip, 1.4MB) (template, tests, includes the JNA library)
Template 6: Object-Oriented Runtime Support (Chapter 10)
- 6_ObjectOrientation (zip, 5KB) (tests only)
Template 7: Inheritance & Type Polymorphism (Chapter 11)
- 7_TypePolymorphism (zip, 2KB) (tests only)
Template 8: Garbage Collection (Chapter 12)
- 8_GarbageCollector (zip, 2KB) (template and tests)
Template 9: Just-In-Time Compiler (Chapter 13)
- 9_JIT (zip, 21KB) (template, tests, including native libraries for Windows, Linux, and MacOS)
See the legal disclaimer for the license and terms of use.