Use of a macro processor with SUMX

Joseph C. Park, US Atomic Energy Commission (AEC), Max Planck Inst. fuer Physik und Astrophysik, Munich (Germany), USDOE · 1972

If the SUMX control statements are considered as forming a base "language", then the power of equipping it with a macro facility becomes obvious. In the following report, we describe a simple scheme which consists of making one preprocessing pass through a general purpose (that is, base-language-independent) macro processor called MACROS. The input text is prepared using base language statements (preferably in terms of variable symbols rather than fixed values) interspersed with preprocessor statements, such as macro definitions, macro calls, and value assignments to symbols. Prior to processing, this text is compiled by MACROS into a target text consisting entirely of base language statements. In Section II our scheme is described by an actual example with enough variety to illustrate most features of MACROS. Appendix A gives a formal description of the processor for reference purposes. In Appendix B we briefly summarize various CHARMs used in the example. In Section III, several examples of errors in using the processor are collected, which also serve to show the limited capability of MACRO01. Appendix C has models for Job Control Language statements required to run.

Read the paper · More papers on PaperTik