home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / coven / coven-utils-1.1.tgz / coven-utils-1.1.tar / utils / coven-module-parser / symbol.h < prev    next >
C/C++ Source or Header  |  2003-01-28  |  1KB  |  67 lines

  1. /*
  2.  * (C) 2001 Clemson University
  3.  *
  4.  * See COPYING in top-level directory.
  5.  */
  6.  
  7.  
  8. #ifndef _SYMBOL_H_
  9. #define _SYMBOL_H_
  10.  
  11. #ifndef lint
  12. static char symbol_h_rcsid[] = "$Header: /projects/cvsroot/coven-module-parser/symbol.h,v 1.3 2003/01/28 14:53:35 ndebard Exp $";
  13. #endif
  14.  
  15. /*
  16.  *    symbol.h --- declarations for all the public types
  17.  */
  18.  
  19. #define TYPE_MODULE 0x1
  20. #define TYPE_VARIABLE 0x2    
  21. #define TYPE_ARGUMENT 0x3    
  22. #define TYPE_TYPE 0x4
  23.  
  24. typedef struct argument_ent
  25. {
  26.     char *name;
  27.     int direction;
  28.     int mclass;
  29.     struct sym_ent *type;
  30. } argument_ent, *argument_ent_p;
  31.  
  32. typedef struct module_ent
  33. {
  34.     char *path;
  35.     struct sym_ent *args;
  36. } module_ent, *module_ent_p;
  37.  
  38. typedef struct variable_ent
  39. {
  40.     int vclass;
  41.     struct sym_ent *type;
  42. } variable_ent, *variable_ent_p;
  43.  
  44. typedef union type_ent
  45. {
  46.     void *v;
  47.     module_ent_p mod;
  48.     variable_ent_p var;
  49.     argument_ent_p arg;
  50. } type_ent, *type_ent_p;
  51.  
  52. typedef struct sym_ent
  53. {
  54.     char *name;        /* ptr to string table */
  55.     int type;
  56.     union type_ent value;    /* sybmol record */
  57.     struct sym_ent *next;    /* next in line */
  58. } sym_ent, *sym_ent_p;
  59.  
  60. sym_ent_p symenter(char *name, sym_ent_p context, int type);
  61. sym_ent_p symlook(char *name, sym_ent_p context, int type);
  62. sym_ent_p lookup_type(char *name);
  63. void init_symbol_table();
  64.  
  65. #endif
  66.  
  67.