Language Translators

A programming tool or software development tool is a program or application which is used by software developers to perform a variety of tasks. These include creating, debugging, maintaining, and to support other programs and applications. Just like how one might use multiple hand tools to fix a physical object, a programming tool is a relatively simple programs that can be combined together to accomplish a task.

Compilers

A compiler has the ability to "translate" a high-level programming language into machine-level statements, and then execute it.

The process of compilation involves multiple phases:

Javac, a popular compiler for java programs
Javac
  • Phase 1: a lexical analysis of the code is performed
  • Phase 2: the syntax of sequence of tokens are analyzed (a.k.a. parsing)
  • Phase 3: semantics are analyzed and machine level code is generated
  • Phase 4: code is optimized for efficiency

Compilation produces an object program written to an executable object file. Before the final execution of the program, the compiler executes the program and lists any errors that were found.

Interpreters

An example of an interpreter on command prompt.
Interpreter

An interpreter executes commands written in high-level programming language after converting it into an intermediate level statements. The most significant difference between interpreters and compilers is that compilers execute the whole file and provide a list of errors while interpreters execute after each line and stop translating once it has reached an error.

If the original code is of high efficiency, the utilisation of an interpreter would be a more suitable option since the compilation of a large volume of code may be very time consuming.

The Interpretation Process              The Compilation Process

Interpreter

The difference between Them

The following is an excerpt from http://www.differencebetween.com/difference-between-compiler-and-vs-interpreter/

  • A complier converts the high level instruction into machine language while an interpreter converts the high level instruction into an intermediate form.
  • Before execution, entire program is executed by the compiler whereas after translating the first line, an interpreter then executes it and so on.
  • List of errors is created by the compiler after the compilation process while an interpreter stops translating after the first error.
  • An independent executable file is created by the compiler whereas interpreter is required by an interpreted program each time.

Page 1 of 2

Next Page>>

Photos retrieved on 2011-11-02 from http://1.bp.blogspot.com/_sDOe5HxTdMk/TH3nShuvhOI/AAAAAAAABrY/ EXi8LqU5Nqw/s320/groovycDemonstratingJavacAndJavaLauncherAnnotated.png

Photos retrieved on 2011-11-02 from http://www.just2good.co.uk/images/gif/compile.gif

Photos retrieved on 2011-11-02 from http://1.bp.blogspot.com/_sDOe5HxTdMk/TH3nShuvhOI/AAAAAAAABrY/ EXi8LqU5Nqw/s320/groovycDemonstratingJavacAndJavaLauncherAnnotated.png

Valid XHTML 1.0 Transitional Valid CSS!