AeInstHash.h 501 Bytes
#ifndef	__AeInstHash__
#define __AeInstHash__


#define	kTableSize	1024	     // must be a power of 2
#define M1		71


class AeInstID;


class AeInstHash
{
public:
                        AeInstHash (void);
    virtual		~AeInstHash (void);

    AeInstID *		Enter (int lextype, char *, int len);

private:
    int			hash (char *);
    AeInstID *		appendNewEntry (int h, int lextype, char *, int len);
    AeInstID *		resolveCollision (int h, char *);

    AeInstID *		hashtable[kTableSize];
};


#endif