Content deleted Content added
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 |
Matthiaspaul (talk | contribs) CE, combined many identical references, improved ref |
||
Line 2:
{{Short description|Computer program that translates code from one programming language to another}}
{{Use dmy dates|date=February 2020|cs1-dates=y}}
{{Use list-defined references|date=January 2022}}
{{Program execution}}
A '''translator''' or '''programming language processor''' is a generic term that can refer to anything that [[Data conversion|converts]] code from one computer language into another.<ref name="
The term is also used for translators between software implementations and hardware implementations ([[ASIC]]s [[microchip]]s) of the same program, and from software descriptions of a microchip to the [[logic gate]]s needed to build it.{{Citation needed|date=July 2019}}
Line 15 ⟶ 16:
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 name="TCS_2018"/><ref name="Thornton_2017"/><ref name="Pasteur_2008"/>
=== Interpreter ===
Line 21 ⟶ 22:
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
=== 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
== See also ==
Line 37 ⟶ 38:
== References ==
{{Reflist|refs=
<ref name="Intel_1983_SH">{{cite book |title=Software Handbook |chapter=Translators And Utilities For Program Development |page=3-1 |date=1984 |orig-
<ref name="
<ref name="Thornton_2017">{{cite web |title=What are compilers, translators, interpreters, and assemblers? |date=2017-02-17 |author-first=Scott |author-last=Thornton |work=MicrocontrollerTips |url=http://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20190719223609/https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |archive-date=2019-07-19}}</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- }}
== Further reading ==
* {{cite book |title=Assemblers, Compilers, and Program Translation |author-first=Peter |author-last=Calingaert |editor-first=Ellis |editor-last=Horowitz |editor-link=Ellis Horowitz |date=1979 |orig-
* {{cite web |title=Why Hasn't AI Mastered Language Translation? |author-first=David |author-last=Pring-Mill |work=Singularity Hub |publisher=[[Singularity University]] |date=2018-03-04 |url=https://singularityhub.com/2018/03/04/why-hasnt-ai-mastered-language-translation/#sm.00000g1rmbl85mcrmqbgjyoco3zrf |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20191229055424/https://singularityhub.com/2018/03/04/why-hasnt-ai-mastered-language-translation/#sm.00000g1rmbl85mcrmqbgjyoco3zrf |archive-date=2019-12-29}}
* {{cite web |title=Language processors |author-first=Stephen A. |author-last=Edwards |publisher=[[Columbia University]] |date=Fall 2013 |url=http://www1.cs.columbia.edu/~sedwards/classes/2013/w4115-fall/processors.pdf |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20190624175913/http://www1.cs.columbia.edu/~sedwards/classes/2013/w4115-fall/processors.pdf |archive-date=2019-06-24}}
|