Creating your first programming language 01-02-2017, 02:11 AM
#1
So, I recently wrote a simple descent parser and posted it to the forum here to gauge interest in writing compilers and interpreters. It seemed to have a lot of good reception, so I'm going to start a new tutorial series about it.
Creating your first programming language
In this tutorial series, I will go into the depths of the abyss that is computational linguistics, and illuminate it so that you can understand how your favorite programming language can understand your horrible code and magically turn it into something neat and structured that your computer can understand.
For this series, I will be working with the recursive descent parsing methodology, which is used in a few languages, but many of the more proper languages (like C, Java, PHP, etc) use far more complicated engines underneath (actually, C even requires a compiler compiler because its specification is so complex).
As this tutorial series goes along, I will either myself or have staff edit this post with links to the individual parts (after a certain period of time I won't be able to make edits anymore, @Oni you should change this for certain usergroups).
It is imperative that you not skip any of these parts and read them in order, I will not cover information that I have already covered in a previous post.
Before I get started on writing part 1 (will be in its own post, this is just an intro to get you salivating), I want to go over a couple things.
1. The rules on gravedigging do not apply to this series given the following conditions:
--a. What you have to say is relevant to the discussion
--b. Your post is clean and respectable
--c. The content you are adding is not negative to any member of the forum, think of my posts as your safe place, there are no stupid questions. I write these to get the community talking and active again.
2. This material will be VERY dense, so I ask that you do the following
--a. Pay close attention, I don't write these to show off, I write them so that you can learn
--b. Ask questions! This one is very important, this information will quickly be lost if the threads do not stay at least partially active. The more discussion that occurs, the more learning that can happen
--c. Be direct. Don't be afraid to ask me to go further in depth to something if you need help understanding it or are just curious, everybody takes in information at their own rate, others may have issues with abstracting the information themselves. We won't judge you if you don't understand how the modulo operation works.
3. I want these series to grow the community, so here's a couple suggestions of what you can do with this material
--a. Build your own language. Go ahead and try to do it yourself from scratch, the best way to learn is to do, that's how I learned everything I know. Try, google, bitch at it, figure it out, repeat.
--b. Add features and modify it. I would love to see some of your ideas, so I encourage you to take this and add your own twist to it and post it to the forum (bonus points if you make it turing complete)
Ok, with all of that said, I look forward to writing these. In the first part (I'll start writing it tonight likely, it may also be finished tonight, we'll see). As always, your comments, questions, concerns, and ideas are always welcome here.
Part 1 - Trees, trees, and more trees
Part 2 - Inception
Creating your first programming language
In this tutorial series, I will go into the depths of the abyss that is computational linguistics, and illuminate it so that you can understand how your favorite programming language can understand your horrible code and magically turn it into something neat and structured that your computer can understand.
For this series, I will be working with the recursive descent parsing methodology, which is used in a few languages, but many of the more proper languages (like C, Java, PHP, etc) use far more complicated engines underneath (actually, C even requires a compiler compiler because its specification is so complex).
As this tutorial series goes along, I will either myself or have staff edit this post with links to the individual parts (after a certain period of time I won't be able to make edits anymore, @Oni you should change this for certain usergroups).
It is imperative that you not skip any of these parts and read them in order, I will not cover information that I have already covered in a previous post.
Before I get started on writing part 1 (will be in its own post, this is just an intro to get you salivating), I want to go over a couple things.
1. The rules on gravedigging do not apply to this series given the following conditions:
--a. What you have to say is relevant to the discussion
--b. Your post is clean and respectable
--c. The content you are adding is not negative to any member of the forum, think of my posts as your safe place, there are no stupid questions. I write these to get the community talking and active again.
2. This material will be VERY dense, so I ask that you do the following
--a. Pay close attention, I don't write these to show off, I write them so that you can learn
--b. Ask questions! This one is very important, this information will quickly be lost if the threads do not stay at least partially active. The more discussion that occurs, the more learning that can happen
--c. Be direct. Don't be afraid to ask me to go further in depth to something if you need help understanding it or are just curious, everybody takes in information at their own rate, others may have issues with abstracting the information themselves. We won't judge you if you don't understand how the modulo operation works.
3. I want these series to grow the community, so here's a couple suggestions of what you can do with this material
--a. Build your own language. Go ahead and try to do it yourself from scratch, the best way to learn is to do, that's how I learned everything I know. Try, google, bitch at it, figure it out, repeat.
--b. Add features and modify it. I would love to see some of your ideas, so I encourage you to take this and add your own twist to it and post it to the forum (bonus points if you make it turing complete)
Ok, with all of that said, I look forward to writing these. In the first part (I'll start writing it tonight likely, it may also be finished tonight, we'll see). As always, your comments, questions, concerns, and ideas are always welcome here.
Part 1 - Trees, trees, and more trees
Part 2 - Inception
(This post was last modified: 01-02-2017, 06:29 PM by phyrrus9.)