The Code generation reference article from the English Wikipedia on 24-Apr-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Code generation

Have you considered sponsoring a child
In computer science, the code generation is a process on compilers that actually outputs machine code on the target environment.

Code generators usually take intermediate form generated by directly semantic analysis or intermediate code generators. Three address code format is a common intermediate format, described in fact in the dragon book. It also refers to one of the trial generations in genetic programming


In more general sense, the code generation is to produce programs in some automatical manner. A compiler-compiler, a program that generates a compiler like yacc, is a very common instance.

Code generations can be done either at runtime, including load time or compiler time. Just-in-time compilers usually produce native or nearly native code from byte code when programs are loaded onto the compilers. Compiler-compilers, for instance, almost always generate code at compiler time on the other hand.

A preprocessor is an example of the simplest code generator.


See also: Model Driven Architecture, compiler, programming language, semantic analysis