aboutsummaryrefslogtreecommitdiff
path: root/sem3/osc/mm11/regn/symtab.h
blob: b7b93ecb065f47b8d79a295af0221ff2ccf9eb43 (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];