1987-03-09 19:15:41 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
2019-05-10 17:17:24 +00:00
|
|
|
#ifndef LOOKUP_H_
|
|
|
|
#define LOOKUP_H_
|
1984-12-17 15:13:39 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
justlooking,mustexist,newsymbol,makeexist
|
|
|
|
} lookupstyle;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
symany,symkeyw,symconst,symsconst,symprop,symreg,symtok,symset,symproc
|
|
|
|
} symtype;
|
|
|
|
|
|
|
|
typedef struct symbol {
|
|
|
|
struct symbol *sy_next; /* pointer to hashchain */
|
|
|
|
char *sy_name; /* symbol */
|
|
|
|
symtype sy_type; /* type */
|
|
|
|
union {
|
|
|
|
long syv_cstval;
|
|
|
|
int syv_stringno;
|
|
|
|
int syv_keywno;
|
|
|
|
int syv_propno;
|
|
|
|
int syv_regno;
|
|
|
|
int syv_tokno;
|
|
|
|
int syv_setno;
|
|
|
|
int syv_procoff;
|
|
|
|
} sy_value;
|
|
|
|
} symbol;
|
|
|
|
|
|
|
|
#define NSYMHASH 61
|
|
|
|
extern symbol *symhash[NSYMHASH]; /* chained hashtable */
|
2019-05-10 17:17:24 +00:00
|
|
|
|
|
|
|
symbol *lookup(char *name, symtype type, lookupstyle style);
|
|
|
|
|
|
|
|
#endif /* LOOKUP_H_ */
|