Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 5 days 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 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T06:14:10.000Z (5 months ago)
- Last Synced: 2024-08-03T09:12:38.147Z (4 months ago)
- Topics: interpreter, lexer, monkey, nom, parser, rust
- Language: Rust
- Size: 98.6 KB
- Stars: 352
- Watchers: 10
- Forks: 35
- 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
![The Monkey Programming Language](https://cloud.githubusercontent.com/assets/1013641/22617482/9c60c27c-eb09-11e6-9dfa-b04c7fe498ea.png)
## 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)