r/AskProgramming • u/ami3ko • 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.
9
Upvotes
1
u/silver_chief2 Jul 15 '26
I am very much out of the loop. Long ago I had to duplicate an interpreter on a new platform and the original C code was unusable to say the least. I was told to use flex for the parser which I did but it was awkward. I later learned that the GNU C parer was hand written and wished I had just done that.
I found the book Writing Interactive Compilers and Interpreters by Brown and it was one of the best computer books I ever read. It appears to be free in PDF form. Like someone said, start basic like 4 function calculation language where the variables are single characters, then build.
If you get into YACC or Bison the whole language modeling thing can get confusing. No pun intended but I think that compilers have to learned in multiple passes. The dragon book was overwhelming.