Skip to content

gserifi/imp-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMP Interpreter

IMP Language Interpreter written in Haskell

Installation

Clone this repository and run make. (Optional) If you want to run the binary from anywhere on your system, you can run sudo make install. That should work on Linux/Mac, if you're on Windows you have to do it manually. You can always uninstall by running sudo make uninstall

Usage

In the following I assume that you ran make install, otherwise instead of imp you have to use ./imp.

Run IMP program

imp program.imp

Examples

Some examples of valid IMP programs, this should also show what features of the language are already implemented. For the syntax check out LANGUAGE.md.

x := 5;
y := 1;
while x > 1 do
  y := y * x;
  x := x - 1
end

Output:

x = 1
y = 120

About

IMP Language Interpreter written in Haskell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published