From 6db1a2cdd3b96731f2e092d55d8c2136eabc52d0 Mon Sep 17 00:00:00 2001 From: Julian T Date: Tue, 11 Feb 2020 12:24:56 +0100 Subject: Rename and cleanup --- sem3/osc/mm11/regn/symtab.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sem3/osc/mm11/regn/symtab.h (limited to 'sem3/osc/mm11/regn/symtab.h') diff --git a/sem3/osc/mm11/regn/symtab.h b/sem3/osc/mm11/regn/symtab.h new file mode 100644 index 0000000..c61f3a8 --- /dev/null +++ b/sem3/osc/mm11/regn/symtab.h @@ -0,0 +1,20 @@ +#include +#define HASHSIZE 100 + +typedef struct symnode_struct { + char *name; + struct symnode_struct *next; + double value; +} symnode_t; + +symnode_t *sym_insert(char *var); +symnode_t *sym_lookup(char *var); + +struct symnode { + struct symnode *next; + char *name; + int type; + double value; +}; + +symnode_t *symbolarray[HASHSIZE]; -- cgit v1.2.3