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