Mini Interpreter / Compiler in Haskell

Programming Language Technology, 2015

Make sure you have bnfc, Happy, Alex, and GHC available.


To compile the interpreter:

  make interpreter

To run the interpreter:

  ./runmini ../


To compile the compiler:

  make compiler

To run the compiler:

  ./compilemini ../

Make sure you have jasmin.jar available. This will create a Jasmin file (Foo.j) and call Java to compile it into a bytecode file (Foo.class). To run the generated JVM code:

  java Foo

Make sure you have Runtime.class available. You can produce it by

  javac ../ -d .

Also make sure that your current directory (where Foo.class resides) is in the CLASSPATH.