Any notation for giving instructions is a programming language. Arithmetic notation is a pro-
gramming language; so is Pascal. The input data format for an applications program is also a
programming language. The person who uses an applications program thinks of its input com-
mands as a language, just like the program’s implementor thought of Pascal when he used it to
implement the applications program. The person who wrote the Pascal compiler had a similar
view about the language used for coding the compiler. This series of languages and viewpoints
terminates at the physical machine, where code is converted into action.
A programming language has three main characteristics:
Syntax: the appearance and structure of its sentences.
Semantics: the assignment of meanings to the sentences. Mathematicians use meanings
like numbers and functions, programmers favor machine actions, musicians prefer audi-
ble tones, and so on.
3. Pragmatics: the usability of the language. This includes the possible areas of application
of the language, its ease of implementation and use, and the language’s success in
fulfilling its stated goals.
Syntax, semantics, and pragmatics are features of every computer program. Let’s con-
sider an applications program once again. It is a processor for its input language, and it has
two main parts. The first part, the input checker module (the parser), reads the input and
verifies that it has the proper syntax. The second part, the evaluation module, evaluates the
input to its corresponding output, and in doing so, defines the input’s semantics. How the sys-
tem is implemented and used are pragmatics issues.
These characteristics also apply to a general purpose language like Pascal. An interpreter
for Pascal also has a parser and an evaluation module. A pragmatics issue is that the interpreta-
tion of programs is slow, so we might prefer a compiler instead. A Pascal compiler transforms
its input program into a fast-running, equivalent version in machine language.
The compiler pres