Learning to build a compiler from scratch.
This post marks the beginning of a new pet project that I have been planning for the longest time.
Compilers have always fascinated me, and I’ve been wanting to learn more about them for a very long time, and what better time to do that than now.
My aim with this series of blog posts is to document everything I read, watch, or do regarding compiler design.
I do not know how frequently I will be posting here, as I have very little time during the week to spend on this project, but I do not plan to stop working on It until I feel like I have understood what exactly happens under the hood of a compiler.
References
I did some basic research on what one might do to get started with building a compiler and here are some resources that I thought would help:
- Writing a C compiler - Blog Series by Nora Sandler
- Creating a Compiler - Youtube Playlist by Pixeled.
- How to make a Compiler - Reddit Thread on r/ProgrammingLanguages
Nora Sandler’s blog series seems to be a great place to start, as it was recommended by a colleague of mine.
Naming the Project
I know it seems foolish to be thinking about naming something even before I start to work on it, but I think doing so Is exciting and motivates me for some reason.
I searched a lot for name Ideas, and finally settled on Petra.
Petra means Stone or Rock in Greek, but honestly speaking i just chose the name because It sounded cool, also happens to be the name of a character from Brawlhalla (a game I played growing up).
My plan for this blog (or the lack of one…)
I guess the first few posts would be on how compilers work in general. Then i would slowly start implementing one when I find a good architecture to build my programming language on.
I don’t expect this blog to be the Holy Grail of compiler design and neither should you. It merely exists to document everything that I learn.
Let’s see where this goes! See you soon!