神刀安全网

The Super Tiny Interpreter

THE SUPER TINY INTERPREER

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

Why should I care?

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

But interpreters are scary!

Yes, they are. But that’s our fault (the people who write interpreters), 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-interpreter.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 watch/star this repo for updates.

Tests

Run with node test.js

The Super Tiny Interpreter

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » The Super Tiny Interpreter

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮