.pa 1 .he 'M6 (I)'11/15/72'M6 (I)' .ti 0 NAME m6 -- general purpose macro processor .sp .ti 0 SYNOPSIS m6__ [ -d__ arg1 ] [ arg2 [ arg3 ] ] .sp .ti 0 DESCRIPTION m6__ takes input from file arg2 (or standard input if arg2 is missing) and places output on file arg3 (or standard output). A working file of definitions, "m.def", is initialized from file arg1 if that is supplied. M6 differs from the standard [1] in these respects: .sp #trace:, #source: and #end: are not defined. .sp #meta,arg1,arg2: transfers the role of metacharacter arg1 to character arg2. If two metacharacters become identical thereby, the outcome of further processing is not guaranteed. For example, to make []{} play the roles of #:<> type .sp .in+5 \\\#meta,<\\\#>,[: .br [meta,<:>,]: .br [meta,[substr,<<>>,1,1;,{] .br [meta,[substr,{{>>,2,1;,}] .in-5 .sp #del,arg1: deletes the definition of macro arg1. .sp #save: and #rest: save and restore the definition table together with the current metacharacters on file m.def. .sp #def,arg1,arg2,arg3: works as in the standard with the extension that an integer may be supplied to arg3 to cause the new macro to perform the action of a specified builtin before its replacement text is evaluated. Thus all builtins except #def: can be retrieved even after deletion. Codes for arg3 are: .sp .in+5 .nf 0 - no function 1,2,3,4,5,6 - gt,eq,ge,lt,ne,le 7,8 - seq,sne 9,10,11,12,13 - add,sub,mpy,div,exp 20 - if 21,22 - def,copy 23 - meta 24 - size 25 - substr 26,27 - go,gobk 28 - del 29 - dnl 30,31 - save,rest .fi .in-5 .sp .ti 0 FILES m.def--working file of definitions .br /usr/lang/mdir/m6a--m6 processor proper (/usr/bin/m6 is only an initializer) .br /usr/lang/mdir/m6b--default initialization for m.def .br /bin/cp--used for copying initial value of m.def .sp .ti 0 SEE ALSO [1] A. D. Hall, The M6 Macroprocessor, Bell Telephone Laboratories, 1969 .sp .ti 0 DIAGNOSTICS "err" -- a bug, an unknown builtin or a bad definition table .br "oprd"--can't open input or initial definitions .br "opwr"--can't open output .br "ova" -- overflow of nested arguments .br "ovc" -- overflow of calls .br "ovd" -- overflow of definitions .br "Try again" -- no process available for copying m.def .br .sp .ti 0 BUGS Characters in internal tables are stored one per word. They really should be packed to improve capacity. For want of space (and because of unpacked formats) no file arguments have been provided to #save: or #rest:, and no check is made on the actual opening of file m.def. Again to save space, garbage collection makes calls on #save: and #rest: and so overwrites m.def.