+ 1
What should i use to create a programmimg language?
There are many programming languages in the world. If i want to create one more, what should i use?
4 Respostas
+ 6
You could make a programming language based on another language, for example, you could make a compiler in c++ that reads your custom language code from a file, processes it and converts to machine code and then writes it down to an executable file.
then, using that new custom compiler, you could rewrite the language's compiler in the new language itself to make it independent.
If im not mistaken, python was based on C but then python interpreter was re-written in python itself. (if not, just take it as an example, its better not to do that in interpreted languages anyways...)
There are many books on compiler theory out there...
+ 4
Your best bet is to pick a language similar to your new language to write the compiler in. But, any can be used. As Valen.H. ~ mentioned, rewriting the compiler in itself is typical. However, you don't build your complete language first. Your first compiler in the other language only supports a minor subset of your language providing enough features to code it in your language. You port that to your new language subset. Followed, by expanding that multiple times to your finished compiler making use of features after they are added for the next version.
+ 1
John Wells Thanks!
+ 1
Valen.H. ~ Thanks!