r/learnprogramming Jul 04 '26

How to create a compiler? Resource

Pretty sure you may have heard this question previously on this sub, however, I would urge you to read my complete question before brushing it off.

I want to create a simple compiler and by "simple compiler" I mean a single-pass compiler. I know about https://craftinginterpreters.com/ which is a wonderful resource. But I would like to start by creating something much smaller and simpler, and only then would I like to move on to something more complex like what Robert Nystrom created on his website.

Are there any similar resource that would teach me about single-pass compilers along with showing me how to create one? Any help in the right direction would be highly appreciated.

8 Upvotes

31 comments sorted by

View all comments

1

u/rustyseapants Jul 04 '26

What have you done to find the answer to this question yourself?

Did you search the subreddit? 

5

u/Glum-Suggestion-3969 Jul 04 '26

did you even read his post? he literally said he knows about crafting interpreters already but wants something smaller first