Monday, February 25, 2008

Why did compiler did compiling?

How was the first compiler ever compiled???

What is a compiler (interpreter)?

A program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. Thus, a compiler differs from an interpreter, which analyzes and executes each line of source code in succession, without looking at the entire program. The advantage of interpreters is that they can execute a program immediately. Compilers require some time before an executable program emerges. However, programs produced by compilers run much faster than the same programs executed by an interpreter.

Every high-level programming language (except strictly interpretive languages) comes with a compiler. In effect, the compiler is the language, because it defines which instructions are acceptable.

Evolution of Compiler

First was machine code: First programs written directly in the hardware's machine code

Then was assembler: A program written in machine code to interpret asm into machine code.

Then was a compiler: a set of programs (lexical analyser, parser linker etc) which could convert source code to assembler/machine code.


The first compiler was the A-0, created by Real Admiral Dr. Grace Murphy Hopper in 1949. It was made from assembly.

The A-O series of compilers translated symbolic mathematical code into machine code, and allowed the specification of call numbers assigned to the collected programming routines stored on magnetic tape. One could then simply specify the call numbers of the desired routines and the computer would "find them on the tape, bring them over and do the additions

http://forums.devshed.com/dev-shed-lounge-26/the-first-compiler-370155.html

http://www.linuxquestions.org/questions/programming-9/compiler-conundrum-which-came-first-a-compiler-or-its-source-code-132911/

http://www.webopedia.com/TERM/C/compiler.html