monkey

command module
v0.0.0-...-f03464b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2021 License: MIT Imports: 5 Imported by: 0

README

Monkey

This is my repo for working through Writing an Interpreter in Go and subsequently Writing a Compiler in Go, both by Thorsten Ball. They implement a programming language called Monkey.

Why are you learning about interpreters and compilers?

My curiosity began because I used to work professionally quite a bit with MATLAB, but sadly MATLAB lacks modern tooling that I became accustomed to - namely, I wanted MATLAB to have a formatter, much like prettier for JavaScript/TypeScript or gofmt for Go. I set out to see what it would take to write one myself, and quickly discovered you need to parse the language to be able to format it... but I didn't know anything about that!

It turns out MATLAB is a major pain to parse because of some of its peculiar syntax, so my formatter never took off, and I since have stopped working with MATLAB. But I was left with my curiosity about lexers, parsers, ASTs, and all the rest of the moving parts that are required to compile a language. I watched most of a livestreamed series on YouTube from Immo Landwerth where he builds his own programming language, and he recommended these two books as a great resource for learning - so here we are!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL