Creating my own programming language from scratch - Day 1
Why create this series? I guess whenever we launch series we should ask ourselves why that series was created in the first place and It could be any of the following things There was a gap in the market, That you wanted to fix. You wanted to do it because its your job of writing content You see it as a notemaking exercise that you can look back later and revise. For me its none of the above. I wanna expand this to a fully unfiltered guide on what my state of mind looks like and how it evolves after I have created my first language. Also, Let's admit it has been always in the back of our mind to create our own programming language someday right, Ever since we started coding? Initial Exploration So we start with a simple youtube search first of all and we landed with a pretty good video(Its in hindi tho) I made my own programming language From here we got to understand the basics of what a components a programming language requires to function (and a refresher of my college course) Lexer/Tokenizer (Converts the program into tokens) Abstract Syntax Tree creator (Takes input of the tokens in the previous step and Creates a AST which holds the logical flow how the program should process the tokens step by step) Code Generator (Takes the input of created AST and converts it into machine understandable language) Code Runner (Runs the machine code generated in the previous step) I am pretty sure of how I used the above layman terms to describe each component that is required by a programming language to run. They are all going to get their technical descriptions later on and maybe new components might get added as well. Self study material While looking for more material to study through on the internet I came across Robert Nystrom CRAFTING INTERPRETERS. So called the HOLY GRAIL OF HOW TO MAKE YOUR OWN PROGRAMMING LANGUAGE Exactly what we needed! Now we start reading this Here is a summary of few pages down the line Started Reading the Book Here is what I got to know so far The book is written to use Java, but there are open source implementations of the same java snippets provided by the community (I Love open source man

Why create this series?
I guess whenever we launch series we should ask ourselves why that series was created in the first place and It could be any of the following things
- There was a gap in the market, That you wanted to fix.
- You wanted to do it because its your job of writing content
- You see it as a notemaking exercise that you can look back later and revise.
For me its none of the above. I wanna expand this to a fully unfiltered guide on what my state of mind looks like and how it evolves after I have created my first language.
Also, Let's admit it has been always in the back of our mind to create our own programming language someday right, Ever since we started coding?
Initial Exploration
So we start with a simple youtube search first of all and we landed with a pretty good video(Its in hindi tho)
I made my own programming language
From here we got to understand the basics of what a components a programming language requires to function (and a refresher of my college course)
- Lexer/Tokenizer (Converts the program into tokens)
- Abstract Syntax Tree creator (Takes input of the tokens in the previous step and Creates a AST which holds the logical flow how the program should process the tokens step by step)
- Code Generator (Takes the input of created AST and converts it into machine understandable language)
- Code Runner (Runs the machine code generated in the previous step)
I am pretty sure of how I used the above layman terms to describe each component that is required by a programming language to run. They are all going to get their technical descriptions later on and maybe new components might get added as well.
Self study material
While looking for more material to study through on the internet I came across Robert Nystrom CRAFTING INTERPRETERS. So called the HOLY GRAIL OF HOW TO MAKE YOUR OWN PROGRAMMING LANGUAGE
Exactly what we needed!
Now we start reading this
Here is a summary of few pages down the line
Started Reading the Book
Here is what I got to know so far
The book is written to use Java, but there are open source implementations of the same java snippets provided by the community (I Love open source man