SIMPLI is an interpreter for the IMP language, a typical imperative language.
docs/-
This directory contains the documentation and the presentation of the interpreter.
src/-
This directory contains the source code of the interpreter.
test/-
This directory contains the unit test for the interpreter.
To build the SIMPLI interpreter, simply run cabal build in the root project
directory. Note: it is not necessary to actually build the tool and use it
as an executable: you can use cabal run to run it, cabal repl to open an
interactive shell or even use Hugs by starting an hugs instance in the
src directory.
There are four ways of using SIMPLI:
-
Interpreting a source file
-
Interpreting the standard input
-
Interpreting a command
-
Using it as a library
$ cat code.imp # The content of the input file
x := 3; y := x + 4
$ simpli code.imp
[x = 3,y = 7]