Skip to content

luther07/SML-COMPILER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Per L.C. Paulson, "...ML makes it easy to write clear, reliable programs".

I have the book, Modern Compiler Implementation in ML.
I have installed sml/nj and associated tools.
I am learning to implement a compiler by implementing a compiler.
  • Implemented part 1 of the Straight Line Program Interpreter: the maxargsStm and maxargsExp functions in structure Interpreter counts the maximum number of argumentss to all PrintStm constructors in a nested statement.

  • Implemented part 2 of the Straight Line Interpreter, renamed the mutually recursive functions maxargsStm and maxargsExp.

  • Exercises 1.1. parts a and b completed. This was my first use of exceptions. Exception will be thrown in the lookupkv function if the key isn't found in the binary search tree. Went back to the Straight Line Program Interpreter and added an exception to the lookup function.

  • Added a signature file and packaged the interpreter inside structure Interpreter. Also added compilation manager file to project. Now you can run my project with command: CM.make "sources.cm"; followed by importing the module into the top-level with: structure S = Interpreter;

    TODO: write functional tests to cover the code in maxargs.sml, interp.sml, and persistent.sml.

About

developing language compiler per Appel's "Modern Compiler Implementation in ML"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published