https://github.com/gthvn1/orangutan
🍌 An interpreter of Monkey lang in OCaml 🐫
https://github.com/gthvn1/orangutan
monkey ocaml
Last synced: 5 months ago
JSON representation
🍌 An interpreter of Monkey lang in OCaml 🐫
- Host: GitHub
- URL: https://github.com/gthvn1/orangutan
- Owner: gthvn1
- License: mit
- Created: 2023-12-14T09:34:52.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-11T11:28:21.000Z (about 2 years ago)
- Last Synced: 2024-04-20T00:54:07.262Z (about 2 years ago)
- Topics: monkey, ocaml
- Language: OCaml
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Orangutan
Whence Orangutan? In verity, we choose Orangutan because we are on Monkey Islang
and Orangutans are splendid great apes native to the verdant rain-forests of
Indonesia and Malaysia. Being engrossed in yonder task of writing an interpreter
of Monkey Lang in OCaml, it was natural to select a primate whose appellation doth
starts with an 'O'.
# Notes
## Setup env
- You can create a switch for the package
- `opam switch create ./ 5.1.1`
- `opam install dune alcotest -y`
## Run repl
- to run the repl: `dune exec orangutan`
``` bash
Welcome to Monkey Islang!
Type 'q;' to exit.
>> let a = 10;;
LET IDENT(a) ASSIGN INT(10) SEMICOLON SEMICOLON
>> if a == 10 then true else false;;
IF IDENT(a) EQ INT(10) THEN TRUE ELSE FALSE SEMICOLON SEMICOLON
>> q;
May your trip be as enjoyable as finding
extra bananas at the bottom of the bag!
```