aboutsummaryrefslogtreecommitdiff
path: root/sem3/osc/mm11/regn/symtab.h
blob: c61f3a830fef513dfb289df669ac0846d48eb115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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];