Skip to content

A compiler for the Monkey programming language written in Rust

License

Notifications You must be signed in to change notification settings

vvbae/monkey-rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monkey-rust

A compiler for the Monkey programming language written in Rust

The Monkey Programming Language

Notes

This repository is forked from Monkey-Rust. The original repository stores the Rust version of Writing An Interpreter In Go by the same author. This repository borrows the codes of parser/ and lexer/ of the mentioned repository, which I used as part of my implementation of the Rust version of the compiler.

What’s Monkey?

Monkey has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease and has integers, booleans, arrays and hashes built-in.

There is a book about learning how to make a compiler: Writing A Compiler In Go. This is where the Monkey programming language come from.

Instruction

Build and test

$ cargo build
$ cargo test

Running the REPL

$ cargo run --release --bin monkey_repl

Running the Interpreter

$ cargo run --release --bin monkey_exe -- --src examples/hash.mk

License

BSD3

About

A compiler for the Monkey programming language written in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%