arm64: codea/abgabe_aa.0
[uebersetzerbau-ss10.git] / ag / symtable.h
1 #ifndef SYMTABLE_H
2 #define SYMTABLE_H
3
4 #define S_FIELD 0
5 #define S_VAR 1
6
7 #define SYMNULL (struct symbol *)NULL
8
9 struct symbol {
10         char *ident;
11         struct symbol *next;
12         short type;
13 };
14
15 struct symbol *tab_clone(struct symbol *tab);
16 struct symbol *tab_new(void);
17 struct symbol *tab_add_symbol(struct symbol *tab, char *ident, short type, short check);
18 struct symbol *tab_lookup(struct symbol *tab, char *ident, short type);
19 struct symbol *tab_remove_symbol(struct symbol *tab, char *ident, short type);
20 struct symbol *tab_merge(struct symbol *tab, struct symbol *to_add, short check);
21 void check(struct symbol *tab, char *ident, short type);
22
23 #endif