Compiler: Difference between revisions

From Rosetta Code
Content added Content deleted
(Added new Compiler Task)
Line 15: Line 15:
* [[Compiler/AST_interpreter|AST Interpreter task]]
* [[Compiler/AST_interpreter|AST Interpreter task]]
* [[Compiler/Verifying_syntax|Verify syntax task]]
* [[Compiler/Verifying_syntax|Verify syntax task]]
* [[Compiler/Simple_file_inclusion_pre_processor]]
* [[Compiler/Simple file inclusion pre processor]]

Revision as of 15:31, 6 June 2021

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