Programs from Lecture |
As the course progresses, links will be provided to take you to more substantive sample programs from class.
Here is also an environment-based interpreter for PCF.
The last problem of Homework 6 asks you to write an interpreter that also works for let-expressions. A parser that generates these terms is available here.
Note that the syntax of a let expression is
let id = exp in exp end
so don't forget to put in the keyword "end" when testing your code.
Sample code in PCF can be found here.
The lexer file for your midterm is available here
Finally, here is an environment-based interpreter (written by Chris Stone) for a simple functional language that includes exceptions.
Programs from Lecture |