https://github.com/Rydgel/monkey-rust
An interpreter for the Monkey programming language written in Rust
https://github.com/Rydgel/monkey-rust
interpreter lexer monkey nom parser rust
Last synced: 2 months ago
JSON representation
An interpreter for the Monkey programming language written in Rust
- Host: GitHub
- URL: https://github.com/Rydgel/monkey-rust
- Owner: Rydgel
- License: bsd-3-clause
- Created: 2017-03-24T14:09:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T06:14:10.000Z (about 1 year ago)
- Last Synced: 2024-11-11T10:42:35.215Z (8 months ago)
- Topics: interpreter, lexer, monkey, nom, parser, rust
- Language: Rust
- Size: 98.6 KB
- Stars: 364
- Watchers: 10
- Forks: 36
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# monkey-rust
An interpreter for the Monkey programming language written in Rust

## 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 an interpreter: [Writing An Interpreter In Go](https://interpreterbook.com/#the-monkey-programming-language). This is where the Monkey programming language come from.
## Instruction
### Build and test
```bash
$ cargo build
$ cargo test
```### Running the REPL
```bash
$ cargo run --release --bin monkey_repl
```### Running the Interpreter
```bash
$ cargo run --release --bin monkey_exe -- --src examples/hash.mk
```## License
[BSD3](LICENSE)