How to make your own text programming language

This is the category for tutorials or solutions to general problems. If you want to ask a question about how to do something, use the Help with Snap! category.
Short answer:Don't do it!
There are a lot of good text languages already like JS or Python.

even better answer, try a simple syntax like

say "hello"

:slight_smile: I did that before

yeah, but other people can do it too.

I know

I think this is a silly thread. Yes, other people have invented programming languages, but you can still learn a lot by implementing one. It's just like anything else: I doubt if there are very many Snap! projects that were never done before, by someone somewhere. But the people who make projects learn from doing so, and that's worthwhile.


Is this clickbait? This forum clearly is in the "Tutorials" section, and the title of the forum is called "How to make your own text programming language" so people would expect this forum to teach them how to make a text-based programming language.

This forum is for anything related to Snap! and computer science.
Why does the tab text on the homepage say there is more than one?

I have three generic steps:

Zeroth, do Brian's steps. It seems like it would be beneficial to do those before mine.

First, you should figure out the syntax, data types, and purpose of the language.

Second, you should create a parser (I created a relatively simple [probably not optimized] parser for Query Logic in my Royalty Free Music Repertoire on Replit).

Third, if you have functions, map them with some functionalities of the implementing language (e.g. blocks in Snap!). Java native methods (functions) can be written in C.

I have a different sequence of steps.

  1. Read Structure and Interpretation of Computer Programs. Do the exercises.

  2. Read Lisp in Small Pieces. Do the exercises.

  3. Now start designing your language.

Looks interesting; that's like the Lisp in Small Pieces approach (except for the part about main()).

Hi, im a scratch coder, i heard this was a mod of old scratch, are yall gonna update the art tools, and make the UI better? i would really like that and maybe join this and lesve scratch cause i used this before scratch cause i had the coding book for that, thats why my name is PAFlame/ "Potential Agent Flame"

I answered this where you properly started a new topic for it; please don't hijack threads by changing the subject of this one.