Code and example subdirectories

Files will be added to the zip-files as they are made available. Updated 2003-04-29

DirectoryFileContents LectureZip-file
.General tools
Env.sig, Env.smlEnvironment implementation  top.zip
Naivestore.sig, Naivestore.smlNaive store implementation
Sto.sig, Sto.smlStore implementation
cont/ Continuation-passing style
fun.sml Continuation-passing interpreter for a functional language 8 cont.zip
imp.sml Continuation-passing interpreter for an imperative language
backtrack.sml Interpreter for a small language (Icon-style) with backtracking
Factorial.java Continuation-passing style factorial function in Java
testlongjmp.c Example illustrating setjmp/longjmp in C
expr/ A simple expression language
grammar.txt Informal grammar description 2, 3 expr.zip
Absyn.sml Abstract syntax
Exprlex.lex Lexer specification
Exprpar.grm Parser specification
parse.sml Definition of parse functions
expr.sml Expression interpreter (eval) and compilers
Stack.java Abstract stack machine for expression evaluation
ex1.ex Well-formed expression for parser testing
bad1.ex-bad8.ex Ill-formed expressions for parser testing
Exprparlex.jj JavaCC lexer and parser specification example
Exprtree.jjt JavaCC lexer, parser and tree specification example
fun/ A first-order and a higher-order functional language
grammar.txt Informal grammar description 4, 5 fun.zip
Absyn.sml Abstract syntax
Funlex.lex Lexer specification
Funpar.grm Parser specification
parse.sml Definition of parse functions
fun.sml First-order functional language interpreter
tychk.sml Definition of an explicitly typed functional language, and its type checker
hofun.sml Higher-order functional language interpreter
tyinf.sml Type inference for the hofun language
imp/ Imperative languages, and micro-C
grammar.txt Informal grammar description 6, 7,
9, 10
imp.zip
c.sml Interpreter for naive imperative language (not micro-C)
Absyn.sml Micro-C abstract syntax
Clex.lex Micro-C lexer specification
Cpar.grm Micro-C parser specification
parse.sml Micro-C parse functions
c.sml Micro-C interpreter
Machine.sml Definition of abstract machine code, used by comp.sml and contcomp.sml
comp.sml Compiler from micro-C to stack machine
Machine.java Abstract stack machine for micro-C code execution
contcomp.sml Continuation-based compiler from micro-C to stack machine
jvmcomp.sml Continuation-based compiler from micro-C to Java bytecode
Factorial.javaRecursive factorial
ex13.javaLeap years in Java
InOut.javaLibrary for running micro-C programs as Java programs
ex13.csLeap years in C#
ex1.c-ex21.cMicro-C example programs
oo/ Micro-Java, a small subset of Java
grammar.txt Informal grammar description 11 oo.zip
Absyn.sml Abstract syntax
Oolex.lex Lexer specification
Oopar.grm Parser specification
parse.sml Definition of parse functions
oo.sml Interpreter for micro-Java
Util.java Used for running micro-Java programs as Java programs
ex1.java-ex5.javaExample programs in micro-Java
Invokevirtual.java Timing method calls in Java
Invokevirtual.cs Timing method calls in C#
Override.cs Method calls in C#
LinkedList.cs Linked list example in C#
javascript1.html Object creating in JavaScript
javascript2.html Prototype-based inheritance in JavaScript
rtcg/ Reflection and runtime code generation
Reflect0.cs-Reflect2.csReflection in C# 12 rtcg.zip
Reflect0.java-Reflect4.javaReflection in Java
RTCG1.cs-RTCG8.csRuntime code generation in C#
RTCG2.java-RTCG8.javaRuntime code generation in Java
usql/ Micro-SQL, a small subset of SQL
grammar.txt Informal grammar description   usql.zip
Absyn.sml Abstract syntax
Sqllex.lex Lexer specification
Sqlpar.grm Parser specification
parse.sml Definition of parse functions


Peter Sestoft (sestoft@dina.kvl.dk) 2003-02-18