![]() |
|
Navigation |
Synopsis Analysis or transformation of one program by another program.
Description All programs have data as input and produce other data as output.
A typical example is a desktop calculator program:
after entering some numbers and operators, the program displays an answer.
For most programs the data are numeric (calculator, spreadsheet)
or textual (text editor, word processor).
A metaprogram is a program that uses programs as data. Writing metaprograms is called metaprogramming ![]() A metaprogram has to be written in some programming language itself. This is called the metalanguage. The program that is manipulated by the metaprogram is called the source program (also: object program) and is written in the source language (also: object language). In some cases the metaprogram transforms the source program into a target program in a target language.
Examples A Refactoring tool for restructuring Java code:
![]() |