From ad2bc056ae684f8de57f2ff880e51440d07ee04a Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 24 Oct 2019 07:51:51 +0200 Subject: Simple calculator assignment --- sem1/osc/mm11/regn/symtab.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sem1/osc/mm11/regn/symtab.h (limited to 'sem1/osc/mm11/regn/symtab.h') diff --git a/sem1/osc/mm11/regn/symtab.h b/sem1/osc/mm11/regn/symtab.h new file mode 100644 index 0000000..c61f3a8 --- /dev/null +++ b/sem1/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