What is a compiler?
A tool that transforms
program in source programming language |
---|
into a
program in target programming language |
---|
so that we can
run the compiled program on machine |
---|
Source Language
Typically a 'high-level' programming language, such as:
It should be easy to use by programmers
- correspond to ways programmers think about algorithms and data
- help programmers to avoid errors
Target language
It can be
- machine language for a microprocessor, e.g. of Intel x86 or ARM architecture, or
- virtual machine bytecode such in JVM or .NET Framework
It should be easy to run on the target platform.