r/AskProgramming • • Jul 14 '26

Other Resource recommendations for learning/writing interpreters?

I have been teaching myself to code for about a year now and recently I have really fallen for the concept of writing my own interpreted language even if its something small just for the learning experience.

I am a bit of a slow learner and struggle with researching complicated topics and was wondering if anyone had an good book suggestions for me besides Crafting Interpreters; which I am now reading.

If I could provide any more info that would help with suggestions please ask.

8 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/jedi1235 Jul 15 '26

Yacc and Bison are classic, but I recommend Antlr these days. It's much more friendly, and powerful, and although it's coded in Java it can generate code in a large number of languages (I last used it in Go).

If you're more hands-on than book learning, pick an interpreted language like Lua and reimplement it yourself. Or just take inspiration from the examples in any programming guide and try to create that.

The most interesting part (for me) tends to be how to turn a function call inside the language into a call to a real function you've written and exposed.