Brewing Cappuccino: Writing a compiler without LLVM's IR
dev.to·6d·
Discuss: DEV
⚙️Query Compilers
Preview
Report Post

Before you read, if you want to go through the compiler yourself, you can find it here.

Introduction

Compilers have always felt something like magic to me. They seem so complex yet so simple, they’re just programs that convert code from one form to another. I’ve spent countless hours prodding the assembly generated by clang, just looking at how C gets converted to assembly. Naturally, I got curious. I wanted to know how to write one.

So how did I do it?

Obviously the first thing I did was to google "how to make my own programming language", which led me to this website. Now this gave me a rough idea on how to write a compiler but it wa…

Similar Posts

Loading similar posts...