Skip to content

eshom/monkey3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monkey Interpreter

This is an implementation of monkey language as presented in the book "Writing An Interpreter In Go" It is written in zig.

While the language works, it is quite buggy with bad management design that could be better. However, the book and this repo are intended to be a learning experience, so do not expect anything more than that.

Supported OS: Linux and Windows It may also work with MacOS but I do not own a Mac.

Compiled and tested with zig 0.16.0-dev.724+2e31077fe

Build

zig build -Doptimize=ReleaseFast

On Linux, you can get a nicer REPL experience by linking GNU Readline which depends on libc.

zig build -Doptimize=ReleaseFast -Dreadline

Run

There are two modes, REPL and script execution.

REPL:

./zig-out/bin/monkey3

Script:

./zig-out/bin/monkey3/ ./examples/fibonacci.monkey

About

Monkey Interpreter in zig (third re-write) following Thorsten Ball's book

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published