Mini-Lua compiler in JavaScript

Project URL: http://hyperweb.space/#!/project/shag-legs

This is a compiler, using a hand-rolled lexer, recursive-descent parser, and x86 assembly generator. It compiles a very small subset of Lua to very basic x86 assembly.

I wrote this compiler for a Tech Talk called “Writing a Compiler in HyperWeb in 30 Minutes”. It took almost 90 minutes. Estimates are hard.

(If you want to start from the beginning of the Tech Talk, use the [blank compiler project] (http://hyperweb.space/#!/project/lime-soarer))

2 Likes

Shag legs? WTF?!

(If you want to start from the beginning of the Tech Talk, use the blank compiler project2)

Is this talk available somewhere?

I think https://fogcreek.wistia.com/medias/jlmycl67ty is it

1 Like

I’m sure you saw, but this project is now featured on the HyperDev blog https://hyperdev.com/blog/how-to-write-a-compiler-in-javascript-and-hyperdev/

Moved to http://minilua.glitch.me/

1 Like