aboutsummaryrefslogtreecommitdiff
path: root/sem3/osc/mm11/regn/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'sem3/osc/mm11/regn/symtab.h')
-rw-r--r--sem3/osc/mm11/regn/symtab.h20
1 files changed, 20 insertions, 0 deletions
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 <stdint.h>
+#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];