home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man6 / m6.6 < prev    next >
Encoding:
Text File  |  1975-06-26  |  2.6 KB  |  115 lines

  1. .th M6 VI 2/19/74
  2. .sh NAME
  3. m6 \*- general purpose macroprocessor
  4. .sh SYNOPSIS
  5. .bd m6
  6. [ name ]
  7. .sh DESCRIPTION
  8. .it M6
  9. copies the standard input to the standard output,
  10. with substitutions for any macro calls that appear.
  11. When a file name argument
  12. is given, that file is read before the standard input.
  13. .s3
  14. The processor is as described in the reference with these
  15. exceptions:
  16. .s3
  17. .lp +2 0
  18. .it #def,arg1,arg2,arg3:
  19. causes \fIarg1\fP to
  20. become a macro with defining text \fIarg2\fP and (optional) built-in serial number
  21. \fIarg3\fP.
  22. .s3
  23. .it #del,arg1:
  24. deletes the definition of macro \fIarg1\fP.
  25. .s3
  26. .it #end:
  27. is not implemented.
  28. .s3
  29. .it #list,arg1:
  30. sends the name of the macro designated by \fIarg1\fP to the current
  31. destination without recognition of any warning characters;
  32. \fIarg1\fP is 1 for the most recently defined macro, 2 for the next most recent,
  33. and so on.
  34. The name is taken to be empty when \fIarg1\fP doesn't make sense.
  35. .s3
  36. .it #warn,arg1,arg2:
  37. replaces the old warning character \fIarg1\fP by the new warning character \fIarg2\fP.
  38. .s3
  39. .it #quote,arg1:
  40. sends the definition text of macro \fIarg1\fP to the current
  41. destination without recognition of any warning characters.
  42. .s3
  43. .it #serial,arg1:
  44. delivers the built-in serial number associated
  45. with macro \fIarg1\fP.
  46. .s3
  47. .it #source,arg1:
  48. is not implemented.
  49. .s3
  50. .it #trace,arg1:
  51. with \fIarg1\fP = `1'
  52. causes a reconstruction of each later call to be placed
  53. on the standard output with a call level number;
  54. other values of \fIarg1\fP turn tracing off.
  55. .i0
  56. .s3
  57. The built-in `warn' may be used to replace inconvenient warning characters.
  58. The example below replaces `#' `:' `<' `>' by `[' `]' `{' `}'.
  59. .s3
  60. .lp +10 0
  61. .nf
  62. #warn,<#>,[:
  63. [warn,<:>,]:
  64. [warn,[substr,<<>>,1,1\fB;\fP,{]
  65. [warn,[substr,{{>>,2,1\fB;\fP,}]
  66. [now,{calls look like this}]
  67. .fi
  68. .i0
  69. .s3
  70. Every built-in function has a serial number, which specifies the action
  71. to be performed before the defining text is expanded.
  72. The serial numbers are:
  73. 1 gt,
  74. 2 eq,
  75. 3 ge,
  76. 4 lt,
  77. 5 ne,
  78. 6 le,
  79. 7 seq,
  80. 8 sne,
  81. 9 add,
  82. 10 sub,
  83. 11 mpy,
  84. 12 div,
  85. 13 exp,
  86. 20 if,
  87. 21 def,
  88. 22 copy,
  89. 23 warn,
  90. 24 size,
  91. 25 substr,
  92. 26 go,
  93. 27 gobk,
  94. 28 del,
  95. 29 dnl,
  96. 32 quote,
  97. 33 serial,
  98. 34 list,
  99. 35 trace.
  100. Serial number 0
  101. specifies no built-in action.
  102. .sh "SEE ALSO"
  103. A. D. Hall, M6 Reference Manual.
  104. Computer Science Technical Report #2, Bell Laboratories, 1969.
  105. .sh DIAGNOSTICS
  106. Various table overflows and ``impossible'' conditions
  107. result in comment and dump.
  108. There are no diagnostics for poorly formed input.
  109. .sh AUTHOR
  110. M. D. McIlroy
  111. .sh BUGS
  112. Provision should be made to extend tables as needed,
  113. instead of wasting a big fixed core allocation.
  114. You get what the PDP11 gives you for arithmetic.
  115.