1 #ifndef SYMBOL_H 2 #define SYMBOL_H 3 4 /** ********************************************************************** 5 ** Module: Symbol \file symbol.h 6 ** Description: This module implements the Symbol abstraction. 7 ** Constants: 8 ** SYMBOL_NULL - the null Symbol 9 ** 10 ************************************************************************/ 11 12 /* 13 * This software was developed by U.S. Government employees as part of 14 * their official duties and is not subject to copyright. 15 * 16 * $Log: symbol.h,v $ 17 * Revision 1.8 1997/01/21 19:17:11 dar 18 * made C++ compatible 19 * 20 * Revision 1.7 1994/05/11 19:51:05 libes 21 * numerous fixes 22 * 23 * Revision 1.6 1993/10/15 18:48:24 libes 24 * CADDETC certified 25 * 26 * Revision 1.5 1993/01/19 22:16:43 libes 27 * *** empty log message *** 28 * 29 * Revision 1.4 1992/08/18 17:12:41 libes 30 * rm'd extraneous error messages 31 * 32 * Revision 1.3 1992/05/31 23:31:49 libes 33 * implemented ALIAS resolution 34 */ 35 36 /*************/ 37 /* constants */ 38 /*************/ 39 40 #define SYMBOL_NULL (Symbol)NULL 41 42 /*****************/ 43 /* packages used */ 44 /*****************/ 45 46 #include <sc_export.h> 47 #include "basic.h" /* get basic definitions */ 48 #include "memory.h" 49 50 /************/ 51 /* typedefs */ 52 /************/ 53 54 typedef struct Symbol_ Symbol; 55 56 /***************************/ 57 /* hidden type definitions */ 58 /***************************/ 59 60 struct Symbol_ { 61 char * name; 62 const char * filename; 63 int line; 64 char resolved; 65 }; 66 67 /****************/ 68 /* modules used */ 69 /****************/ 70 71 /********************/ 72 /* global variables */ 73 /********************/ 74 75 extern SC_EXPRESS_EXPORT struct freelist_head SYMBOL_fl; 76 77 /******************************/ 78 /* macro function definitions */ 79 /******************************/ 80 81 #define SYMBOL_new() (struct Symbol_ *)MEM_new(&SYMBOL_fl) 82 #define SYMBOL_destroy(x) MEM_destroy(&SYMBOL_fl,(Freelist *)(Generic)x) 83 84 #define SYMBOLset(obj) obj->symbol.line = yylineno; \ 85 obj->symbol.filename = current_filename 86 87 /***********************/ 88 /* function prototypes */ 89 /***********************/ 90 91 extern SC_EXPRESS_EXPORT void SYMBOLinitialize PROTO( ( void ) ); 92 SC_EXPRESS_EXPORT Symbol * SYMBOLcreate( char * name, int line, const char * filename ); 93 94 #endif /* SYMBOL_H */ 95