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

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
JaydenLiu1 (35)

I hate people saying "I hate fake coding languages" because it offends the creator of the coding language. Please stop saying "fake" or "hate" on people's projects because it's not really nice and it also makes the creator upset for something that he/she made in a long time span.

Also people should stop overreacting on just a project the creator did for fun. People have no point and make no sense. I mean, there’s no difference in the words ”real” and ”fake” when comparing two different coding languages in

CSharpIsGud (931)

@JaydenLiu1 People say that, because they aren't languages.
If its fake, then people will call it fake regardless of if they hate it or not.
In case you have not seen, some people have literally just done this and called it a "coding language"

class Console:
    def WriteLn(str):

console = Console()

console.WriteLn("LOOK AT MY NEW LANGUAGE")

Luckily these kinds of things have sort of died down on replit now.
Simply calling it "hate" to call out what something is and is not does not change the fact that the above snippet is just python with a defined class.

JaydenLiu1 (35)

@CSharpIsGud Yeah I know those aren't really coding languages. It's technically C# in a nutshell. But, to be mean to the creator of a coding language that isn't just that, unacceptable! Hate is unacceptable!

And not to mention, not everybody is as good as you, my friend!

JaydenLiu1 (35)

@CodeSalvageON Stop being so mean. Like I said, hate/mean statements are UNACCEPTABLE!

JaydenLiu1 (35)

That's right! You heard me! UNACCEPTABLE!

JaydenLiu1 (35)


JaydenLiu1 (35)

@CodeSalvageON OK I do not want to stick with a person and stay talking with a person who is clearly weird and unstable, so see ya later!

PowerCoder (734)

@JaydenLiu1 You have a point. But some languages are not true programming languages; they're "fake" programming languages. They lack the functionality, syntax, and semantics of a true programming language.

JaydenLiu1 (35)

@PowerCoder But to compare a ”real” and ”fake” coding language, technically the words ”real” and ”fake” don’t make any sense or have any meaning when put in a statement like that.

TheDrone7 (1777)

@CodeSalvageON please refrain from comments like this.

PowerCoder (734)

@JaydenLiu1 There's a formal definition of a programming language that separates it from shells, markup languges, and others.

Formal definition of a programming language:

A programming language is a formal language comprising a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms. Most programming languages consist of instructions for computers.

Some languages are deemed fake because they do not follow these guidelines.