home *** CD-ROM | disk | FTP | other *** search
/ ftptest.leeds.ac.uk / 2015.02.ftptest.leeds.ac.uk.tar / ftptest.leeds.ac.uk / bionet / CAE-GROUP / SCL-WIN3x / FED_PLUS.EXE / SYMBOL.H < prev    next >
C/C++ Source or Header  |  1994-07-23  |  3KB  |  113 lines

  1. #ifndef SYMBOL_H
  2. #define SYMBOL_H
  3.  
  4. /* $Id: symbol.h,v 1.7 1994/05/11 19:51:05 libes Exp $ */
  5.  
  6. /************************************************************************
  7. ** Module:    Symbol
  8. ** Description:    This module implements the Symbol abstraction.  
  9. ** Constants:
  10. **    SYMBOL_NULL    - the null Symbol
  11. **
  12. ************************************************************************/
  13.  
  14. /*
  15.  * This software was developed by U.S. Government employees as part of
  16.  * their official duties and is not subject to copyright.
  17.  *
  18.  * $Log: symbol.h,v $
  19.  * Revision 1.7  1994/05/11  19:51:05  libes
  20.  * numerous fixes
  21.  *
  22.  * Revision 1.6  1993/10/15  18:48:24  libes
  23.  * CADDETC certified
  24.  *
  25.  * Revision 1.5  1993/01/19  22:16:43  libes
  26.  * *** empty log message ***
  27.  *
  28.  * Revision 1.4  1992/08/18  17:12:41  libes
  29.  * rm'd extraneous error messages
  30.  *
  31.  * Revision 1.3  1992/05/31  23:31:49  libes
  32.  * implemented ALIAS resolution
  33.  */
  34.  
  35. /*************/
  36. /* constants */
  37. /*************/
  38.  
  39. #define SYMBOL_NULL        (Symbol)NULL
  40.  
  41. /*****************/
  42. /* packages used */
  43. /*****************/
  44.  
  45. #ifdef SYMBOL_C
  46. #endif    /*  SYMBOL_C  */
  47.  
  48. #include "basic.h"    /* get basic definitions */
  49. #include "memory.h"
  50.  
  51. /************/
  52. /* typedefs */
  53. /************/
  54.  
  55. typedef struct Symbol Symbol;
  56.  
  57. /***************************/
  58. /* hidden type definitions */
  59. /***************************/
  60.  
  61. struct Symbol {
  62.     char *name;
  63.     char *filename;
  64.     short line;
  65.     char resolved;
  66. };
  67.  
  68. /****************/
  69. /* modules used */
  70. /****************/
  71.  
  72. /********************/
  73. /* global variables */
  74. /********************/
  75.  
  76. #ifdef SYMBOL_C
  77. #include "defstart.h"
  78. #else
  79. #include "decstart.h"
  80. #endif    /*  SYMBOL_C  */
  81.  
  82. GLOBAL struct freelist_head SYMBOL_fl;
  83.  
  84. #include "de_end.h"
  85.  
  86. /******************************/
  87. /* macro function definitions */
  88. /******************************/
  89.  
  90. #define SYMBOL_new()        (struct Symbol *)MEM_new(&SYMBOL_fl)
  91. #define SYMBOL_destroy(x)    MEM_destroy(&SYMBOL_fl,(Freelist *)(Generic)x)
  92.  
  93. #define SYMBOLset(obj)        obj->symbol.line = yylineno; \
  94.                 obj->symbol.filename = current_filename
  95. /* for backwards compatibility only, no one should ever need this */
  96. #define SYMBOLget_name(sym)    ((sym)->name)
  97.  
  98. /***********************/
  99. /* function prototypes */
  100. /***********************/
  101.  
  102. extern void    SYMBOLinitialize PROTO((void));
  103. Symbol *SYMBOLcreate PROTO((char *, int, char *));
  104.  
  105. /********************/
  106. /* inline functions */
  107. /********************/
  108.  
  109. #if supports_inline_functions || defined(SYMBOL_C)
  110. #endif /* supports_inline_functions || defined(SYMBOL_C) */
  111.  
  112. #endif    /*  SYMBOL_H  */
  113.