Dr. Chuck C. Liang
Professor of Computer Science, Hofstra University .
201A Adams Hall
Hempstead, NY 11550
Office Phone: (516 463) 5559
Email: email@example.com (<- click to send me mail)
Official Office Hours: Monday-Thursday 3:30-4:30pm
The homepage of the previous time that I taught this course is available here
The following are the components of my "jBASIC" sample interpreter. Although it is an interpreter as opposed to a compiler, it contains many of the same basic components as a compiler.
Lambdascript example: programming with pure lambda terms using Krivine's
java implementation, LR(1) grammar and sample program.
Some sample grammars (in my syntax):
Sample hand-coded x86 assembly language programs in gnu syntax:
fibonacci sequence, summing an array
The Truth Lab. (progressive assignment - reload for latest).
Some guidelines, code fragments, are found here.
Parser Generator Stage 1. The content of this assignment will be the subject of your next progress grade. I've added my version of the function to compute the Nuillible set. Reload for latest
Parser Generator Stage 2: Generating the State Machine.
Parser Generator Stage 3: Generating the Parser.
Parser Generator Final.
MiniJava+ compiler project overview
Lexer and Parser (RELOAD FOR LATEST). Due Tuesday 4/1
Abstract Syntax and Visitor Pattern (now with Translator). Due Thursday 4/10
Symbol Table and Type Checker. Due Thursday 4/17
Additional guidelines for type checking
x86 assembly language assignment
Translation to an intermediate langauge (abstract assembly). Due 4/24 Some Optimizations and Static analysis. Due 5/1.
Learning x86 assembly language, understanding calling conventions. 5/8
Translation to x86 assembly, final exam, 5/15
Minijava+ program to test type checking
More sample Minijava+ program to test your parser and translator on: test.mj, fact.mj, Quicksort.mj
Program to test your assembler: power2.c. Follow instructions in comments.
test cases for parser generator:
Nasty grammars for testing stage 2: nasty1, nasty2, nasty3
Read Chapter 2,3,4,5 of textbook.