- language processor is an example of a system program , class of tools designed to help software developers.
- allows the development of applications in the language most appropriate to the task, removing the need for developing at the machine level. programmers can ignore the machine dependent of programming.
- receives a textual representation of an algorithm in a source language, and produces as output a representation of the same algorithm in the object or target language.
- language processor is written in what is called the implementation language.
- by a language processor, we mean a program that processes programs written in a programming language (source language). All or part of a language processor is a language translator, which translates the program from the source language into machine code, assembly language, or some other language. The machine code can be for an actual computer or for a virtual (hypothetical) computer. If it is for a virtual computer, then a simulator for the virtual computer is needed in order to execute the translated program.
If a language processor is a translator that produces machine or assembly code as output (in object code or executable code) then it is called a compiler. If the language processor executes the translated program (output from the translator) then it is called an interpreter.
In a typical programming language implementation, source program components (files or modules) are first translated into machine language to produce components called object modules or object files. Following the translation step, a linkage editor (or linker) combines multiple object components for a program with components from libraries to produce an executable program. This can occur either as an intermediate step, or in some cases it may occur as the program executes, loading each component as it is needed. The execution of a program may be done by an actual computer or by a simulator for a virtual computer.
Program components in languages such as C are normally compiled into object files, which are combined into an executable file by a linkage editor or linking loader. The linkage editor adjusts addresses as needed when it combines the object modules, and it also puts in the addresses where a module references a location in another module (such as for a function call). If an executable file is produced, then there will also be a loader program that loads an executable file into memory so that it can execute. The loader may also do some final adjustments on addresses to correspond to the actual locations in memory where the executing program will reside.
Language Processors example:
* GCC, Delphi, Visual Studio
* TeX/LaTeX
* Postscript
* HTML and Web browsers
* XML
References:
http://www.iis.ee.ic.ac.uk/yiannis/lp/LPLecture1c.pdf
http://people.cs.clemson.edu/~turner/courses/cs428/spring00/webct/content/pz/ch2/ch2_2.html
No comments:
Post a Comment