Skip to content

zoltan-nz/compilers

Repository files navigation

SWEN-430 Compilers

Connected repository with assignments and solutions: https://github.com/zoltan-nz/while-lang-compiler

Presentations

  1. Introduction
  2. Compiler Architecture
  3. Parsing 1
  4. Parsing 2
  5. Parsing 3
  6. Typing 1.
  7. Interpreter
  8. Typing 2.
  9. Typing 3.
  10. Unreachable Code
  11. Definite Assignment/Unassignment
  12. Definite Assignment 2. | Java Bytecode
  13. Java Bytecode Generation 1
  14. Java Bytecode Generation 2
  15. Java Bytecode Verification
  16. Machine Code 1
  17. Machine Code 2
  18. Machine Code 3
  19. Paper 1: Class Hierarchy Analysis
  20. Paper 2: Garbage Collection

Parsing

  1. Grammars and Parse Trees
  2. Scanner and Parsing
  3. Building a Parse Tree
  4. Using Patterns

Papers

  1. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis
  2. Practical Virtual Method Call Resolution for Java
  3. Myths and Realities: The Performance Impact of Garbage Collection

Whiley

While

Downloads

Assignments

JASM

jx86

Notes

Regular Expression Notations

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

Grammar

About

Learning about compilers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages