Translator (computing): Difference between revisions

Content deleted Content added
Undid revision 1037813714 by HikHik134 (talk) editing experiment or vandalism
Citation bot (talk | contribs)
Add: date, title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | Linked from User:BrownHairedGirl/Articles_with_bare_links | #UCB_webform_linked 1814/2171
Line 15:
A [[compiler]] is a translator used to convert [[high-level programming language]] to [[low-level programming language]]. It converts the whole [[Computer program|program]] in one session and reports [[Software bug|errors]] detected after the conversion. The compiler takes time to do its work as it translates high-level code to lower-level code all at once and then saves it to memory.
A compiler is [[Central processing unit|processor]]-dependent and [[Cross-platform software|platform-dependent]].
It has been addressed by alternate names as the following: special compiler, cross-compiler and, source-to-source compiler.<ref>{{Cite web|url=https://teachcomputerscience.com/translators/|title=Translators &#124; Purpose, Types, Examples & Advantages|date=11 January 2018}}</ref><ref>{{Cite web|url=https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/|title = What are compilers, translators, interpreters, and assemblers?}}</ref><ref name="Pasteur_2008">{{cite book |author-first1=Katja |author-last1=Schuerer |author-first2=Catherine |author-last2=Letondal |author-first3=Eric |author-last3=Deveaud |date=2008-02-04 |orig-year=2003-01-06 |publisher=[[Pasteur Institute]] |title=Introduction to Programming using Python - Programming Course for Biologists at the Pasteur Institute |chapter=Chapter 5. Program execution, Section 5.2. Interpreter and Compiler |website=pasteur.fr |pages=37–40 |chapter-url=http://www.pasteur.fr/formation/infobio/python/ch05s02.html <!-- |url=http://www.pasteur.fr/formation/infobio/python/index.html -->|access-date=2015-01-07 |url-status=dead |archive-url=https://web.archive.org/web/20151111024459/http://www.pasteur.fr/formation/infobio/python/ch05s02.html |archive-date=2015-11-11}} [https://web.archive.org/web/20151124102155/http://www.pasteur.fr/formation/infobio/python/support.pdf]</ref>
 
=== Interpreter ===
Line 21:
The [[Interpreter (computing)|interpreter]] is similar to a compiler, as it is a translator used to convert [[high-level programming language]] to [[low-level programming language]]. The difference is that it converts the program one line of code at a time and reports errors when detected, while also doing the conversion.
An interpreter is faster than a compiler as it immediately executes the code upon reading the code.
It is often used as a [[debugging tool]] for [[software development]] as it can execute a single line of [[computer code|code]] at a time. An interpreter is also more portable than a compiler as it is [[Central processing unit|processor]]-independent, you can work between different [[Computer hardware|hardware]] [[Computer architecture|architectures]].<ref>{{Cite web|url=https://teachcomputerscience.com/translators/|title=Translators &#124; Purpose, Types, Examples & Advantages|date=11 January 2018}}</ref><ref>{{Cite web|url=https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/|title = What are compilers, translators, interpreters, and assemblers?}}</ref><ref name="Pasteur_2008">{{cite book |author-first1=Katja |author-last1=Schuerer |author-first2=Catherine |author-last2=Letondal |author-first3=Eric |author-last3=Deveaud |date=2008-02-04 |orig-year=2003-01-06 |publisher=[[Pasteur Institute]] |title=Introduction to Programming using Python - Programming Course for Biologists at the Pasteur Institute |chapter=Chapter 5. Program execution, Section 5.2. Interpreter and Compiler |website=pasteur.fr |pages=37–40 |chapter-url=http://www.pasteur.fr/formation/infobio/python/ch05s02.html <!-- |url=http://www.pasteur.fr/formation/infobio/python/index.html -->|access-date=2015-01-07 |url-status=dead |archive-url=https://web.archive.org/web/20151111024459/http://www.pasteur.fr/formation/infobio/python/ch05s02.html |archive-date=2015-11-11}} [https://web.archive.org/web/20151124102155/http://www.pasteur.fr/formation/infobio/python/support.pdf]</ref>
 
=== Assembler ===
{{main|Assembly language#Assembler}}
An [[Assembler (computing)|assembler]] is a translator used to translate [[assembly language]] into [[machine language]]. It has the same function as a compiler for the assembly language but works like an interpreter. Assembly language is difficult to understand as it is a low-level programming language. An assembler translates a [[low-level language]], such as an assembly language to an even lower-level language, such as the [[machine code]].<ref>{{Cite web|url=https://teachcomputerscience.com/translators/|title=Translators &#124; Purpose, Types, Examples & Advantages|date=11 January 2018}}</ref><ref>{{Cite web|url=https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/|title = What are compilers, translators, interpreters, and assemblers?}}</ref>
 
== See also ==