Skip to content

Writing an interpreter in Go for the Monkey programming language

Notifications You must be signed in to change notification settings

christianb/Monkey-Interpreter-Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Writing An Interpreter In Go

This is an interpreter written in GoLang for the Monkey programming language.

All code and samples are based on the book "Writing An Interpreter in Go" by Thorsten Ball.

Lexer

The lexer transforms meaningless string into a (flat) list of things like "number literal", "string literal", "identifier", or "operator", called Tokens. It also recognizing reserved identifiers (keywords) and discarding whitespace.

Parser

The parser is turning a stream of Tokens, produced by the lexer, into a parse tree (Abstract Syntax Tree) representing the structure of the parsed language.

Run Tests

To execute all tests in all packages: go test ./...

Run the REPL

To start the REPL: go run main.go

About The Monkey Programming Language

Links

About

Writing an interpreter in Go for the Monkey programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages