GPMX: a portable general purpose macro processor adapted for preprocessing FORTRAN

  • Authors:
  • Robert C. Gammill

  • Affiliations:
  • The Rand Corporation, Santa Monica, California

  • Venue:
  • AFIPS '76 Proceedings of the June 7-10, 1976, national computer conference and exposition
  • Year:
  • 1976

Quantified Score

Hi-index 0.00

Visualization

Abstract

GPMX is an extension of GPM, a simple, elegant yet powerful language independent macro processor described by Strachey. Unextended, GPM is not suited for preprocessing languages which use column position and end of record to delimit statements. Examples are FORTRAN and many assembly languages. Many programmers are constrained to work in such limited languages and GPMX is a simple yet powerful tool for extending and modifying these languages. Others have developed preprocessors dedicated to a particular language. This has advantages for the implementor, but requires the user to learn a different preprocessor for each language he uses. GPMX is designed to work on any language so that the (non-trivial) effort of learning to use it need not be repeated later. Extensions in GPMX include macro control over: files, record input and output, spacing, conditional macro processing and compilation, access to input and output buffers, and dynamic changing of the macro flag characters. Most of the extensions are accomplished simply by putting the control information on the macro stack where the processor has access to it (ala von Neumann). GPMX has been implemented in ANS FORTRAN for portability. Several applications are shown, including GO-TO free control structures for FORTRAN. Source is available.