programming languages


A programming language could be described as a set of rules and instructions that are used to communicate with computing machines in order to tell it what operations to perform to solve a certain problem. In other words, these programming language act as a common ground which enables machine language speaking computers and humans to interact while both understanding what is being said without much trouble.

Programming languages are utilized in several ways ranging from making simple applications to building massive computer systems. But it doesn’t just happen that the computer understands the syntax of the programming language directly, rather the code that is written by the programmer gets translated from being a high-level language to the low-level language that is machine language that utilizes ones and zeros to represent numbers, and this process of translation is done through what is called a compiler.

A compiler is piece of software that is responsible for translating high-level source code to binary code readable by the computing machine, and this process of translation is named compilation. The compiler executes four essential steps, namely: scanning, lexical analysis, syntactic analysis and finally semantic analysis. In the scanning process the compiler reads on character at a time from the code written by the developer and keeps track of those characters. Then in syntactical analysis, the compiler transforms the sequences of character into a series of strings also known as tokens which correlate to a certain rule set by a program called the lexical analyzer. Then in syntactic analysis where a process called syntax analysis is performed to know whether the tokens created by lexical analysis are in proper order as required for their usage. And finally in semantic analysis the structure of the tokens according to the grammar in a the used language is checked to determine if the used syntax is valid and if it is then it will get translated to machine language for the computer to recognize and perform the given task.



.................................................................................

Questions:

Why do we need so many programming languages?
To become a good programmer, how many languages would I have to know?
Do programming languges diifer in terms of high-level they are?

refrences and further readings:
compilers webopedia on programming languages introduction to programming languges