Go to file
2016-03-30 18:45:44 -07:00
LICENSE Give Super Tiny Compiler 2016-03-30 15:35:42 -07:00
README.md Add a test 2016-03-30 21:25:27 -04:00
super-tiny-compiler.js Init code comments 2016-03-30 17:39:16 -07:00
test.js Clean up test file 2016-03-30 18:45:44 -07:00

THE SUPER TINY COMPILER

Welcome to The Super Tiny Compiler. It's an ultra simplified example of all the major pieces of a modern compiler written in easy to read JavaScript. Reading through it can help you learn about how most compilers work end to end.

Why should I care?

That's fair, most people don't really have to think about compilers in their day jobs. However, compilers are all around you, tons of the tools you use are based on concepts borrowed from compilers.

But compilers are scary!

Yes, they are. But that's our fault (the people who write compilers), we've taken something that is reasonably straightforward and made it so scary that most think of it as this totally unapproachable thing that only the nerdiest of the nerds are able to understand.

Okay so where do I begin?

Awesome! Head on over to the super-tiny-compiler.js file.

I'm back, that didn't make sense

Ouch, I'm really sorry. I'm planning on doing a lot more work on this to add inline annotations. If you want to come back when that's done, you can either watch/star this repo or follow me on twitter for updates.

Tests

Run with node ./test/test.js


cc-by-4.0