diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 12:55:31 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 12:55:31 -0400 |
commit | 0e835d9b8f97087810dddb9743aa84b6431ff3a7 (patch) | |
tree | db1b9e4b40cff6240fa15b903d539980ab977494 /scope.h | |
parent | e0e828e2c2f2032d1c9616950d0208f2aab6fcb8 (diff) |
Rename hash.* -> scope.*
Diffstat (limited to 'scope.h')
-rw-r--r-- | scope.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 |