In the midst of other projects on CodingRooms, Thunkable, and Replit, I was bored. Bored and failing to go to sleep. So I dreamt up an idea based on a forum post somewhere- what if there was a Snap! text-based language, like Tosh is to Scratch.
I decided to make that.
Too tired and lazy to make a list of commands, so just check out the single-line block because it has all the commands included.
PLEASE NOTE these text-based blocks don't have things like the pen, sound, control, or list sections because, again, tired. I'll add them later if I figure out how to.
Then you write a MATCH block that takes a string like "move () steps" and another string like "move 20 steps" and sees if they match, with "()" in the pattern matching anything in the user's input. When it finds a match, it doesn't just report True; it reports a list of all the input values given by the user. And finally you can just
I like it; it embodies a creative idea I would never have thought of; it's not quite at the level of mind-blowing projects (like all the ones Jens invents).
The language (any language) in which you write a program isn't the language that your computer's processor knows how to run. So there has to be software that takes the program you write and translates it into machine language, either as the program is running (an interpreter) or all at once into a file (a compiler). The first thing an interpreter or compiler has to do is transform your program from some bizarre syntax full of semicolons into a syntax tree that's easier to handle than straight program text. That transformation is called parsing the user's program, and the part of the interpreter or compiler that does it is the parser. Like this: