1989-02-07 11:04:05 +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".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
/* IDENTIFIER DESCRIPTOR */
|
|
|
|
|
|
|
|
#include "nopp.h"
|
|
|
|
|
1989-10-26 16:16:35 +00:00
|
|
|
#define HASHSIZE 307 /* must be odd */
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
#define STARTHASH() (0)
|
1989-10-26 16:16:35 +00:00
|
|
|
#define ENHASH(hs,ch) ((hs << 2) + ch)
|
|
|
|
#define STOPHASH(hs) ((unsigned)hs % HASHSIZE)
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
struct idf {
|
|
|
|
struct idf *next;
|
|
|
|
char *id_text;
|
|
|
|
#ifndef NOPP
|
|
|
|
struct macro *id_macro;
|
|
|
|
int id_resmac; /* if nonzero: keyword of macroproc. */
|
|
|
|
#endif NOPP
|
|
|
|
int id_reserved; /* non-zero for reserved words */
|
|
|
|
char *id_file; /* file containing the occurrence */
|
|
|
|
unsigned int id_line; /* line number of the occurrence */
|
|
|
|
struct def *id_def; /* variables, typedefs, enum-constants */
|
|
|
|
struct sdef *id_sdef; /* selector tags */
|
|
|
|
struct tag *id_struct; /* struct and union tags */
|
|
|
|
struct tag *id_enum; /* enum tags */
|
|
|
|
int id_special; /* special action needed at occurrence */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ALLOCDEF "idf" 50 */
|
|
|
|
|
|
|
|
extern struct idf *str2idf(), *idf_hashed();
|
|
|
|
|
|
|
|
extern int level;
|
|
|
|
extern struct idf *gen_idf();
|