How To Make A True Coding Language: Part 1
CSharpIsGud (919)

Im making this tutorial series because almost every language i've seen posted to repl talk doesn't use parsing algorithms and I think it would be nice to see some that do. There are a couple flavors of these languages, typically they come in 2 forms
1) They use string splitting and regular expressions

Technically you can call this "parsing" or a language of some sort.
But you will very quickly discover you run into syntax limitations like having to have a separator for a lot of things.
set:var,Hello World;print:var

2) They do nothing at all but define some classes or variables

I don't know how people get away with this and then tell you to calm down when someone calmly separates what it is from what it isn't. Even when put in the best possible words as to not directly attack the repl itself.

Which is why I have decided to create a tutorial on making a programming language in hopes people start making ones that don't have the above flaws.

This tutorial is going to go bottom to top using no dependencies at all and will show creation of a lexer all the way up to the hand made recursive-descent parser!

The Lexer (or scanner, tokenizer, whatever you wish to call it)

Located in

The other components will get their own files as they are created.


You are viewing a single comment. View All
PYer (3872)

Hey! Great tutorial/idea! Haven't seen one of these yet. (But don't insult other people's projects either...)

DynamicSquid (4626)

@PYer unrelated, but your on your way to 3000

PYer (3872)

lol thanks! I have my first cycle special planned for it. it's been planned for 2 months, and I'm not sure if i'll have it finished in time @DynamicSquid

DynamicSquid (4626)

@PYer ooh... can't wait to see that! And I'm sure once you release your cycles special, it won't be long before you take over mat!

PYer (3872)

ummm... i think you're going to be disappointed. And I feel like it's going to take some time to beat mat. I've been ahead of him once before, but lost the lead. I'm satisfied being second. @CodingCactus and @Vandesm14 are slowly creeping up (quickly in the case of CodingCactus). The cycle special is REDACTED. I'll delete that in one minute though :) @DynamicSquid

DynamicSquid (4626)

@PYer oh, well, still, 3000 cycles! That's pretty good, well done :)