Programmable formatting of program text: Experiences drawn from the TAMPR system
The TAMPR System originated as an approach to the problem of automating the routine modifications of FORTRAN source programs required to adapt them to a variety of uses or environments. Three steps are involved: (1) A FORTRAN source program is processed by the TAMPR Recognizer, yielding essentially a parse tree called the abstract form, (2) the Transformation Interpreter applies IGT's (Intragrammatical Transformations) to the abstract form as tree operations, and (3) the abstract form is then reconverted to source program form by the Formatter. By ensuring that the transformations are applied only to the correct syntactic entities and only in the intended contexts, the use of the abstract form greatly simplifies establishing the reliability of the overall process.