Connected repository with assignments and solutions: https://github.com/zoltan-nz/while-lang-compiler
- Introduction
- Compiler Architecture
- Parsing 1
- Parsing 2
- Parsing 3
- Typing 1.
- Interpreter
- Typing 2.
- Typing 3.
- Unreachable Code
- Definite Assignment/Unassignment
- Definite Assignment 2. | Java Bytecode
- Java Bytecode Generation 1
- Java Bytecode Generation 2
- Java Bytecode Verification
- Machine Code 1
- Machine Code 2
- Machine Code 3
- Paper 1: Class Hierarchy Analysis
- Paper 2: Garbage Collection
- Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis
- Practical Virtual Method Call Resolution for Java
- Myths and Realities: The Performance Impact of Garbage Collection
- while.tar - While compiler for Assignment 1
- tests.tar - Test harness for Assignment 1
- newtests.tar - Test update for Assignment 1
- assignment2.tgz - Tests for Assignment 2
- whilelang.tar - Updated While compiler for Assignment 2, 3 and 4
- jasm-v0.1.7 - Old
jasmcompiler - assignment-3-test-harness.tgz - Test harness for Assignment 3
- assignment4.tgz - C compiler and test harness for Assignment 4
- Assignment 1
- Assignment 1 - Implementation
- Assignment 2
- Assignment 2 - Implementation
- Assignment 3
- Assignment 3 - Implementation
- Assignment 4
a An ordinary character stands for itself.
ε The empty string.
M|N Alternation, choosing from M or N.
M·N Concatenation, an M followed by an N.
MN Another way to write concatenation.
M∗ Repetition (zero or more times).
M+ Repetition, one or more times.
M? Optional, zero or one occurrence of M.
[a − zA − Z] Character set alternation.
. A period stands for any single character except newline.
"a.+*" Quotation, a string in quotes stands for itself literally.
Regular expressions for some tokens:
if IF
[a-z][a-z0-9]* ID
[0-9]+ NUM
([0-9]+"."[0-9]*)|([0-9]*"."[0-9]+) REAL
("--"[a-z]*"\n")|(" "|"\n"|"\t")+ no token, just white space (ex. comment starts: --)
. error