Skip to content

PraWater/Monkey_Interpreter.ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Monkey Interpreter 🐵

Tree walking interpreter written in OCaml for Monkey Language - A simple language with C-like syntax.

Implemented by following the book Writing an Interpreter in Go by Thorsten Ball

Features

  • Integers, booleans, strings, arrays, hash maps
  • A REPL
  • Arithmetic expressions
  • Let statements
  • First-class and higher-order functions
  • Built-in functions
  • Recursion

REPL

Requirements

  • OCaml
  • opam
  • dune

Run

dune exec bin/main.exe

TODO

  • Errors like in the book
  • Tests?
  • Closures
  • Read from a file

Resources Used

About

Tree walking interpreter written in OCaml

Topics

Resources

Stars

Watchers

Forks