Can i create a new programming language based on my mother language(sinhala-srilanka).if can please help me to create my new programming languge.please tell me how should i do it.
This is an interesting and hard question to solve, but i will try to answer.
- What is a programming language?
The first thing you have to do is to search “programming language” in a search engine and probably the first result will be wikipedia: https://en.wikipedia.org/wiki/Programming_language. This will give you a “basic” explanation of what is it.
- Learn a programming language!
Several languages are implemented on C or C++ and others are bootstrapped. A lot of compilers are written in C because that’s what a lot of people know best, but that doesn’t mean the all compilers must be written C or assembler. Using a higher-level language will probably make the task a lot easier. So you have to choose one and become a masterfull developer of it.
- Rules, Compiler and Interpreter
Writing a language basically means defining a set of rules for your language, or describing the specifications for your language. To let the computer understand this rules you need to create a interpreter or a compiler for your language. A compiler (even the interpreter) is just another program. It reads in a bunch of text and emits either another text file or a binary file of machine code. The difference between this two is: an interpreter runs the program as it’s translating, a compiler just translates the code without executing it. The big parts of the compiler are:
- A lexer, which breaks your source text into tokens (literals, identifiers, punctuators, etc.);
- A parser, which takes those tokens and matches them to the language grammar;
- A code generator, which emits the target code based on results from the parser.
I will not go into too much detail.
Or you can follow this “little” guide on this github repository: ftomassetti/LangSandbox.
Hope this help
great advice.thank you so much sir.
Yes of course, You can create, I just develop Sinhala version of python. you just need to encode characters. I develop a translator to convert Sinhala keywords to python keywords and also it’s a web based one , so it’s easy to display the Sinhala characters other than showing on console.Try it I can help you, but I am not an expert just a self learning computer science student of 16 years old. My language is the world’s first Sinhala programming language