By
Raul Bernardino
The compiler:
[1] What are the differences between
Compiler and Interpreter? [Internet]. Available from:
http://readanddigest.com/what-are-the-differences-between-compiler-and-interpreter/
(Accessed: 6 November 2010)
[2] J. Glenn Brookshear, (2009) Computer science: An Overview. 10th Edition, Boston:
Pearson Addison Wesley, Ch 6, P.282 and P.312
[3]
What is the difference between compiler and interpreter? [Internet]. Available from:
http://stackoverflow.com/questions/3618074/what-is-the-difference-between-compiler-and-interpreter
(Accessed: 6 November 2010)
[4] The
difference between compiler and interpreter [internet].Available from: http://www.antlr.org/wiki/display/ANTLR3/The+difference+between+compilers+and+interpreters (Accessed: 6
November 2010)
Introduction:
[1] In the computing field, the commands or instructions
which are given by the users are normally use a high level language, whereas
the computer machines will only understand the instructions in the binary
formats. The computer language is known
as machine language. The sole purpose of the compiler and interpreter is to
convert the user high level language into a machine level language so that it
makes the computer understand and executed users’ instructions.
[2] The
translation from high level to a low level machine language calls translator.
The translator will be translating all identifier of high level collection into
the machine language. The translator act similar to secondary generation of
assembler, however, it does not do a compiling.
The assembler uses to compile the machine instructions
into short sequence of activities in one single file. The assembler is
compiling the instructions, calls compilers.
The other translator calls interpreter. This interpreter
is doing an execution of the instructions of the program from high level
generation without translating into the machine language.
There would be more delay on interpreting
instructions from high level and executing compare to transiting or compiling
into low level of programming and execute.
[3] Below diagram shows the compilation and
interpretation:
By implementing these two distinctions of the interpreting
and compiling, it has its own merits and weakness. If we are using an
interpreting mode e.g. the web animation, it will be taking further delay of
displaying in other end of the machine. It is because the source codes are in
different location. Meanwhile, compiling web animation the source code will be
going with the web site, however developer have to think of how it can be
display in the far end machine while he or she have no idea what type machine
is in the far end. Maybe she or he the developer has some assumption of the
type machines. But it is unrealistic. Therefore, more developer are using
interpreting mode today.
[4] Why is that most of developer are using
interpreter mode in design compare to compiler? There are several reasons as
follow:
The Interpreter:
- Easier to build an interactive development
of the environments
- Easy to execute the
instructions codes which are they are executed statement by statement
- Become a port to different the OSs
and processor.
- The bytecode is portable to any
system with an interpreter port.
- Bytecodes are tightly packed
- The
only weakness is boring performance
- Compiling whole program in to the machine language
- Run in the specific operating system an processor
- Machine codes are not dense
- Run more faster
References: