home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume17 / ease2 / part01 / src / symtab.h < prev   
Encoding:
C/C++ Source or Header  |  1989-02-08  |  2.4 KB  |  82 lines

  1. /*    $Header: symtab.h,v 2.0 88/06/15 14:43:08 root Exp $    */
  2.  
  3. /*
  4.  * $Log:    symtab.h,v $
  5.  * Revision 2.0  88/06/15  14:43:08  root
  6.  * Baseline release for net posting. ADR.
  7.  * 
  8.  */
  9.  
  10. /*
  11.  *    symtab.h    -- Definitions related to the "et" symbol table. 
  12.  *
  13.  *    author        -- James S. Schoner, Purdue University Computing Center,
  14.  *                     West Lafayette, Indiana  47907
  15.  *
  16.  *    date        -- July 1, 1985
  17.  *
  18.  *    Copyright (c) 1985 by Purdue Research Foundation
  19.  *
  20.  *    All rights reserved.
  21.  *
  22.  */
  23.  
  24. #define TRUE      1
  25. #define FALSE     0
  26. #define SST       101        /* size of hash table (symbol table)          */
  27. #define RSNMAX    5        /* size of a ruleset number character buffer */
  28. #define VALRSNMAX 9999        /* max value of ruleset number             */
  29.  
  30.  
  31. /* identifier types */
  32. #define ID_UNTYPED 0
  33. #define ID_MACRO   01
  34. #define ID_CLASS   02
  35. #define ID_RULESET 04
  36. #define ID_FIELD   010
  37. #define ID_PREC       020
  38. #define ID_MAILER  040
  39.  
  40. /* identifier type macros */
  41. #define ISTYPED(x) (x|ID_UNTYPED)
  42. #define ISMACRO(x) (x&ID_MACRO)
  43. #define ISCLASS(x) (x&ID_CLASS)
  44. #define ISRULESET(x) (x&ID_RULESET)
  45. #define ISFIELD(x) (x&ID_FIELD)
  46. #define ISPREC(x) (x&ID_PREC)
  47. #define ISMAILER(x) (x&ID_MAILER)
  48.  
  49. /* block definition types */
  50. enum bdefs {def_macro, def_class, def_option, def_prec, def_trusted, 
  51.         def_header, def_mailer, def_ruleset};
  52.  
  53. /* option types */
  54. enum opts {opt_A, opt_a, opt_B, opt_C, opt_c, opt_D, opt_d, opt_e, opt_F,
  55.        opt_f, opt_g, opt_H, opt_i, opt_L, opt_m, opt_N, opt_n, opt_o,
  56.        opt_P, opt_Q, opt_q, opt_r, opt_S, opt_s, opt_T, opt_t, opt_u,
  57.        opt_v, opt_W, opt_x, opt_X, opt_Y, opt_y, opt_Z, opt_z,
  58.        d_opt_i, d_opt_b, d_opt_q,
  59.        e_opt_p, e_opt_e, e_opt_m, e_opt_w, e_opt_z};
  60.  
  61. /* flag types */
  62. enum flgs {flg_f, flg_r, flg_S, flg_n, flg_l, flg_s, flg_m, flg_F, flg_D,
  63.        flg_M, flg_x, flg_P, flg_u, flg_h, flg_A, flg_U, flg_e, flg_X,
  64.        flg_L, flg_p, flg_I, flg_C, flg_E, flg_R};
  65.  
  66. /* mailer parameters */
  67. enum mats {mat_path, mat_flags, mat_sender, mat_recipient, mat_argv, 
  68.        mat_eol, mat_maxsize};
  69.  
  70. struct he {    /* hash entry structure for symbol table node     */
  71.     unsigned   idtype;    /* identifier type         */
  72.     unsigned   idd;          /* identifier definition flag     */
  73.     char      *psb;        /* identifier string buffer     */
  74.     union {
  75.         char rsn[RSNMAX];     /* ruleset number             */
  76.         int prec;          /* precedence value           */
  77.         char idc;        /* one char id representation */
  78.         char *fstring;        /* field string               */
  79.     } idval;
  80.     struct he *phe;        /* next hash entry         */
  81. };
  82.