Skip to content

mateuszmrw/monkey-go-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monkey Language Interpreter in Go

The code in this repository contains an interpreter for "Monkey" language, written by following Writing An Interpreter In Go by Thorsten Ball

Monkey is a simple and intuitive programming language designed for learning and understanding the fundamentals of interpreters and compilers.

Features

  • Lexer for tokenizing Monkey source code
  • Parser for generating an Abstract Syntax Tree (AST)
  • Evaluator for interpreting the AST and executing the Monkey code
  • REPL (Read-Eval-Print Loop) for an interactive programming environment
  • Support for integer, boolean, string, array, and hash data types
  • First-class functions and closures
  • Error handling and custom error messages

Getting Started

Prerequisites

To run the Monkey interpreter, you will need:

  • Go (version 1.16 or later)

Installation

  1. Clone the repository:
    git clone https://github.com/mateuszmrw/monkey-interpreter-go.git
  1. Change into the project directory:
    cd monkey-interpreter-go
  1. Build the project:
    go build -o monkey

Usage

Running the REPL

To start the REPL and interact with the Monkey interpreter, simply run:

    ./monkey

You will be greeted with a prompt where you can enter Monkey code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages