How to Make a Computer Languageby eHow Computers Editor
Computer programming languages make it easier for humans to tell a computer what to do. Computers only deal with ones and zeros, but a computer program that is composed only of binary numbers is not readable. With some tips, you can make your own computer language.
Consider the purpose of your computer language. Some languages are better than others at certain tasks, and how you design the language depends on what you want to do with it.
Decide if you want to make a high-level language (that is, a language that compiles to another language, such as assembly language, C++, Java or FORTRAN) or a low-level language (a language that compiles to machine code-ones and zeros).
Gain an understanding of the computer architecture or of the low-level language to which you will compile your language. For a low-level language, you must know what's happening at the hardware level. For a high-level language, you should understand how the lower-level language works.
Learn about the computer operating system. To run any programs that you create with your language, you must be able to interface with the operating system. Alternatively, you can always design your own operating system.
Designate the commands and syntax for your language. You need a precise, consistent way to express any basic function that you want your language to handle.
Create a compiler to convert programs written in your language to either machine code or to a lower-level language. Without a compiler, your language isn't of any use on the computer.
Test both your language and your compiler for bugs and errors.
- check Making a programming language is time-consuming. It's likely that there's already a language out there that does what you want, so unless you're making a language for a highly special purpose or you're just doing it to test your skills, shop around before you reinvent the wheel.
- check Higher-level languages are typically more user-friendly than lower-level languages since they can deal with more abstract functions and operations.
- check Higher-level languages take more time to compile to machine code (the computer may have to run them through several compilers) and usually produce slower executable programs. Programming in lower-level languages is usually more difficult, but it's a better way to make programs that run quickly.