Sorry if this post doesn’t exactly fit this sub forum as this is my first post on the entire forum.
I already know very basic C++ syntax from w3schools, but decided to purchase a book explaining a lot more of the language (C++ for dummies 7th edition)
I chose this language to create my own as in many open-source programming languages, such as Swift uses a grand majority of c++ to construct the language, and because the freecodecamp tutorial ‘The Programming Language Pipeline’ recommended it.
I want my language to be a personal modification of code.org’s Game Lab Code, which I am already very familiar with and which source can be found on github
I need help with building this project as I need to know:
Which main syntaxes and subjects in C++ should I learn in order to build this?
How can I import Code.org’s existing Game Lab code into C++ to modify it?
Do I need external software or modifications to build this?
Tips and advice would also heavily be appreciated.
I took a class on how programming languages are designed. I don’t remember everything, but only the key parts that stuck out to me as its been a few years.
Namely, languages are defined by their syntax, and this definition (grammar) is what you program your compiler to deal with.
C++ could be the language you pick to create your compiler/run-time, same way Python is written in C. Or even the original C compiler was written… in C
However, before you get into how you’d create the compiler itself, you need to define the language syntax itself, so you know what the compile will do with it.
Here’s the wikipedia page that goes over the high level concepts and ideas behind creating a programming language theoretically.
Once you have your syntax rules defined, then you can go into creating your compiler.
I can’t help much here, as I never got past the theoretical aspects of creating a language. The class was specifically designed to stop at that point, as the continuation course, where you actually create a compiler for a language you make up was discontinued as “no one makes compilers anymore”. It is an interesting idea, that helps understand existing languages, but its also a good amount of work. Still rather mind blowing to write code to read code haha.