List and Explain the Characteristics of an Operating System

Decent Essays

| | | |
A compiler is a computer program that implements a programming language specification to "translate" programs, usually as a set of files which constitute the source code written in source language, into their equivalent machine readable instructions (the target language, often having a binary form known as object code). This translation process is called compilation. We compile the source program to create the compiled program. The compiled program can then be run (or executed) to do what was specified in the original source program.
The source language is always a higher-level language in comparison to machine code, written using some mixture of English words and mathematical notation, assembly language being the lowest …show more content…

Some compiler-writing tools are available which can reduce this size, but will add the corresponding dependencies. |
The compilation process |
At the highest level, compilation is broken into a number of parts: 1. Lexical analysis (tokenizing) 2. Syntax analysis (parsing) 3. Type checking 4. Code generation
Any compiler has some essential requirements,which are perhaps more stringent than for most programs: * Any valid program must be translated correctly, i.e. no incorrect translation is allowed. * Any invalid program must be rejected and not translated.
There will inevitably be some valid programs which can't be translated due to their size or complexity in relation to the hardware available, for example problems due to memory size. The compiler may also have some fixed-size tables which place limits on what can be compiled (some language definitions place explicit lower bounds on the sizes of certain tables, to ensure that programs of reasonable size/complexity can be compiled).
There are also some desirable requirements, some of which may be mutually exclusive: * Errors should be reported in terms of the source language or program. * The position at which an error was detected should be indicated; if the actual error probably occurred somewhat earlier then some indication of possible cause(s) should also be provided. * Compilation should be fast. * The translated program should be fast. * The translated

Get Access
Get Access