home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / ease / part01 / src / symtab.h < prev   
Encoding:
C/C++ Source or Header  |  1987-07-09  |  2.3 KB  |  74 lines

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