// idsymtab.h // Define idSymbolTable class. #ifndef IDSYMTABH #define IDSYMTABH #include "pmglobs.h" const NUMOFKEYS = 101; const MAXCHARS = 1000; class idSymbolNode { friend class idSymbolTable; private: unsigned int firstChar, length, index; idSymbolNode* link; }; class idSymbolTable { private: // data members of the class idSymbolNode* idSymTab[NUMOFKEYS]; // an idSymbolNode array. struct stringTable { char str[MAXCHARS]; unsigned int freeIndex; } strTab; unsigned int idIndex; private: // member functions int idHash(char* w); public: // member functions idSymbolTable(); ~idSymbolTable(); void searchAndMaybeInsert(char* s, int& idIdx, bool& insertOk); void printStrTab(); void printIdSymTab(); }; #endif