home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / fweb153.zip / fweb-1.53 / web / macs.hweb < prev    next >
Text File  |  1995-09-23  |  2KB  |  76 lines

  1. @z --- macs.hweb ---
  2.  
  3. FWEB version 1.53 (September 23, 1995)
  4.  
  5. Based on version 0.5 of S. Levy's CWEB [copyright (C) 1987 Princeton University]
  6.  
  7. @x-----------------------------------------------------------------------------
  8.  
  9. @ Definitions for macros used in macro processing, especially in \.{macs.web}.
  10.  
  11. @d semi 01 /* Kludge! */
  12.  
  13. @d SILENT (boolean)NO
  14. @d COMPLAIN (boolean)YES
  15.  
  16. @d OUTER_MACRO 0xFF
  17. @d OUTER_UNMACRO 0xFE
  18. @d UNDEFINED_MACRO 0xFD
  19.  
  20. @d MAX_XLEVELS 200
  21.  
  22. @d equiv equiv_or_xref // Info corresponding to names.
  23. @d EQUIV ASCII HUGE * // For casting into the above field.
  24.  
  25. /* Note that the following function retrieves not only regular \WEB\
  26. macros, but also built-in functions. */
  27. @d MAC_LOOKUP(cur_val) (cur_val < MODULE_NAME ?
  28.     (text_pointer)(name_dir+(cur_val))->equiv : NULL)
  29.  
  30. @d macro 0 // For appending a macro; distinguishes from a module.
  31.  
  32.  
  33. /* The following are the values of the |macro_type| field of
  34. |name_pointer|s. */
  35. @d NOT_DEFINED 0
  36. @d DEFERRED_MACRO 1 /* Numbers chosen so that |DEFERRED_MACRO +
  37.     scanning_defn| gives the two choices. */
  38. @d IMMEDIATE_MACRO 2
  39. @d FILE_NAME 3 // Used to prevent truncations from affecting file names.
  40.  
  41. @d MAKE_RECURSIVE @'*' /* To allow a WEB macro to be recursive, preface its
  42.     definition by this symbol, as in `\.{@@m *R R}'.  (Recursive macros
  43.     are not presently implemented.) */
  44.  
  45. @d AUTO_INSERT @'['
  46. @d END_AUTO_INSERT @']'
  47.  
  48. /* Guard against overflow of the macro buffer. */
  49. @d MCHECK(n,reason) if(mp+(n) > macrobuf_end)
  50.             mbuf_full((unsigned long)(n),(outer_char *)reason)@;
  51.  
  52. @#if 0
  53.     @d MCHECK mcheck // This speeds things up a bit.
  54. @#endif
  55.  
  56. @<Typedef...@>=
  57.  
  58. typedef struct
  59.     {
  60.     sixteen_bits token[MAX_XLEVELS];
  61.     int level;
  62.     } XIDS;
  63.  
  64. @
  65. @<Glob...@>=
  66.  
  67. IN_COMMON STMT_LBL max_stmt; /* See \.{common.web}. */
  68.  
  69. EXTERN sixteen_bits outp_line[NUM_LANGUAGES]
  70. #ifdef _FTANGLE_h
  71.     #if(part == 0 || part == 1)
  72.         = {1,1,1,1,1,1,1,1}
  73.     #endif /* |part == 1| */
  74. #endif /* |_FTANGLE_h| */
  75. ;
  76.