diff options
Diffstat (limited to 'hash.h')
-rw-r--r-- | hash.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#ifndef SCOPE_H +#define SCOPE_H + +#define HASH_SIZE 211 + +typedef struct hash { + node* table[HASH_SIZE]; + struct hash *prev, *next; + char function_boundry; +} scope; + +scope* mkscope(scope*); +void free_scope(scope*); + +/*stack routines*/ +scope* pop_scope(scope*); +scope* push_scope(scope*); + +/*helpers*/ +node* scope_insert(scope*, char*); +node* scope_search_all(scope*, char*); +node* scope_search(scope*, char*); +node* scope_safe_search_all(scope*, char*); + +/*hash function*/ +int hash_pwj(char*); +#endif |