Compiler: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Replaced redirected link to Wirth's book)
Line 8: Line 8:
* [[:Category:Compilers and Interpreters|List of compilers and interpreters]]
* [[:Category:Compilers and Interpreters|List of compilers and interpreters]]
* [[wp:Compiler|Wikipedia page about compilers]]
* [[wp:Compiler|Wikipedia page about compilers]]
* [http://www-old.oberon.ethz.ch/WirthPubl/CBEAll.pdf Free PDF of Niklaus Wirth's "Compiler Construction"]
* [http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf Free PDF of Niklaus Wirth's "Compiler Construction"]
* [[Compiler/lexical_analyzer|Lexical Analyzer task]]
* [[Compiler/lexical_analyzer|Lexical Analyzer task]]
* [[Compiler/syntax_analyzer|Syntax Analyzer task]]
* [[Compiler/syntax_analyzer|Syntax Analyzer task]]

Revision as of 17:46, 8 December 2016

A compiler reads the source code of a program, and produces either machine code (instructions in a suitable format for the CPU to execute), bytecode, or a translation of the source into some other form (often into a different language, i.e. C to assembly).

When generating object code, it is often the case that the resulting code must be then passed to a linking stage for conversion into an executable form. The linking stage is necessary for resolving references to libraries of code and adding any extra executable runtime that is required. Depending on the compiler in use, sometimes the linker is a separate program from the compiler; other times, the compiler handles the linking itself.

See also