Compilation

This is an old revision of this page, as edited by Jaques (talk | contribs) at 07:44, May 20, 2007. It may differ significantly from current revision.
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Compilation is the process of translating code written in a programming language into executable machine code. It consists of 4 steps:

1. Lexical analysis: convert source code into sequence of tokens.
2. Syntactic analysis: structure tokens into parse tree.
3. Semantic analysis: annotate parse tree with semantic actions.
4. Code generation: produce the final machine code.

A software program that automatically performs this compilation process is called a compiler.