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.
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 lexer.py
The other components will get their own files as they are created.
@JaydenLiu1 Also yes, that's pretty much exactly what he was saying.
programmeruser was being nice when he said it was more of a shell than a language, because that's basically what it is.
if (PORTin == "pythn"): Python = input ("") if (Python == "print"): Print = input ("") print (Print)
I mean come on, look at it. This is basically all it is.
@JaydenLiu1 By the way, the python interpreter that got 80 upvotes, was done in probably less than 30 seconds if they typed fast.
The people that defended the above cycle farm are people like you who simply don't understand that you can't just make a bunch of if statements and call it a language.
@JaydenLiu1 Now stop filling my notifications with cringe. It's not worth trying to explain how
print(eval(input())) is not something that should get 80 upvotes to someone who will just use every excuse possible to say how it took lots of effort and hard work to type one line of python.
@JaydenLiu1 So many pings from here.
Also, you are really only harming yourself by quoting him.
Some of his sentences might go a little overboard but its basically how things are.
If I didn't care about being swarmed by everyone who believes it takes a lot of effort to make a few if statements in a file I would also put the truth in as blunt words as possible.
@JaydenLiu1 Typically if you actually call out said things as not being what they said they are they will go crazy.
There are plenty of things they may or may not reply with but I can think of some probable ones and their counterparts:
"Dude, chill" ('chilling' is not necessary when you are already 'chill')
"Hater" (This defeats itself.)
Special: "I diDn'T sAy iT wAs A rEAl C0diNG lAnGuAGE!" ('coding language' implies that it is a coding language)
"It took a lot of effort for him to make that" (If it did, you wouldn't be commenting about how it can be done in less than 10-30 minutes)
"Stop." (If they can't actually think of any reason you shouldn't call out how easy it is to do what they did)