© 1965 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||
A general purpose macrogenerator
Project MAC, Massachusetts Institute of Technology, Cambridge 39, Mass., USA
The macrogenerator described in this paper is a symbol string processor, both its input and its output being strings of symbols. It operates by a form of substitution which is completely general in its application in that it is allowed anywhere. The result is a powerful system including such features as recursive functions and conditional expressions which can be implemented with very few instructions.
Part 1 describes the operation of the macrogenerator and gives some indication of how it has been used at Cambridge. Part 2 contains a sufficiently detailed account of its implementation to make it a relatively simple task to transfer it to any suitable computer.
Part 2 describes in some detail an implementation of the general purpose macrogenerator described in Part 1. The implementation is based on the use of a single stack and is described both as a series of transformations on the state of the stack, and by a CPL program. Various error checking features are described which greatly simplify the discovery of errors in macro programs.
* Project MAC, Massachusetts Institute of Technology, Cambridge 39, Mass. Formerly of University Mathematical Laboratory, Corn Exchange St., Cambridge, England.