3. Source Language
• Any programming language or high level languages
are called source language.
• These languages contains English like words and
mathematical symbols, that are easy to understand by
the Human. E.g. C, C++, java, Python, PHP etc.
• There are thousand of languages(source) ranges from
traditional programming languages to specialized
language.
4. Target Language
•low level programming languages.
•It has two forms
•Relocatable Machine Code
•Target Assembly Code
5. Relocatable Machine Code
• It is a machine code with relocatable address.
• Machine code that is loaded in storage so that its relative address is
different from its absolute address.
• Absolute Address: A direct address that identifies a location, such as
a storage location, without a reference to any other address, such as a
base address.
• Relative address: A direct address that identifies its location by
means of its displacement from a base address.
6. Target Assembly Code
•If the output of the compiler is in assembly
language then a translator called assembler is
used to translate the output(assembly codes)
into machine code.
8. Desirable Properties of compiler
• It must generate a correct executable code.
• The input program and the output program must be
equivalent, the compiler should preserve the meaning
of the input program.
• Compiler should be fast.
• Compiler should provide good diagnostic for
programming errors.