/*
 * (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"

#define	HASHSIZE	307	/* must be odd */

#define	STARTHASH()		(0)
#define	ENHASH(hs,ch)		((hs << 2) + ch)
#define	STOPHASH(hs)		((unsigned)hs % HASHSIZE)

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 */

#ifndef NOPP
struct dependency	{
	struct dependency *next;
	struct idf *dep_idf;
};

/* ALLOCDEF "dependency" 10 */
#endif /* NOPP */

extern struct idf *str2idf(), *idf_hashed();

extern int level;
extern struct idf *gen_idf();
