Skip to content

An interpreter for Monkey with parser combinator written in Rust

License

Notifications You must be signed in to change notification settings

hatashiro/monkey-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monkey-rs Build Status

A compiler for the Monkey programming language written in Rust

The Monkey Programming Language

The official Monkey logo

What's Monkey?

Monkey is a programming language designed for learning about interpreter implementation, used in a book, Writing An Interpreter In Go.

Again, why?

Some people may already know that I've written a Monkey interpreter in Haskell. Why do I rewrite a similar thing in another language? Does it really mean anything?

Well, I've recently started learning Rust, and thought rewriting what I've already made would be a nice start to learn a new language. Also, the transition may not be so difficult as Rust adopted many language concepts from Haskell, such as pattern match, error handling, and trait (known as type class in Haskell).

Let me see if I can do it well ✌️

Screenshot

Compiler error messages

REPL

Instruction

Build, test and install:

cargo build --all
cargo test --all
cargo install

Run REPL and scripts:

monkey repl
monkey run examples/map-reduce.mk

License

MIT

About

An interpreter for Monkey with parser combinator written in Rust

Topics

Resources

License

Stars

Watchers

Forks

Languages