Friday, January 11, 2008

Programming Language:-
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languages, are defined by syntactic and semantic rules which describe their structure and meaning respectively. Many programming languages have some form of written specification of their syntax and semantics; some are defined only by an official implementation.

Defintion
Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing".
A programming language is a language used to write computer programs, which involve a computer performing some kind of computation or algorithm and possibly control external devices such as printers, robots, and so on.

Syntax:-

expression ::= atom | list
atom ::= number | symbol
number ::= [+-]?['0'-'9']+
symbol ::= ['A'-'Z''a'-'z'].*
list ::= '(' expression* ')'

This grammar specifies the following:

  • expression is either an atom or a list;
  • atom is either a number or a symbol;
  • number is an unbroken sequence of one or more decimal digits, optionally preceded by a plus or minus sign;
  • symbol is a letter followed by zero or more of any characters (excluding whitespace); and
  • list is a matched pair of parentheses, with zero or more expressions inside it.

0 comments: