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