X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=uebersetzerbau-ss10.git;a=blobdiff_plain;f=gesamt_arm%2Fsymtable.h;fp=gesamt_arm%2Fsymtable.h;h=9892899a871ed7b692bd158535ec96911ee80a74;hp=0000000000000000000000000000000000000000;hb=67902869dbe033c80351a8e5d07bf55ed91b6c34;hpb=16705cf56da9f03c383319e63ffe3fe01613bd24 diff --git a/gesamt_arm/symtable.h b/gesamt_arm/symtable.h new file mode 100644 index 0000000..9892899 --- /dev/null +++ b/gesamt_arm/symtable.h @@ -0,0 +1,26 @@ +#ifndef SYMTABLE_H +#define SYMTABLE_H + +#define S_FIELD (1<<0) +#define S_VAR (1<<1) +#define S_PARM (1<<2) + +#define SYMNULL (struct symbol *)NULL + +struct symbol { + char *ident; + struct symbol *next; + short type; + int param_index; + int soffset; +}; + +struct symbol *tab_clone(struct symbol *tab); +struct symbol *tab_new(void); +struct symbol *tab_add_symbol(struct symbol *tab, char *ident, short type, short check, int param_index, int soffset); +struct symbol *tab_lookup(struct symbol *tab, char *ident, short type); +struct symbol *tab_remove_symbol(struct symbol *tab, char *ident, short type); +struct symbol *tab_merge(struct symbol *tab, struct symbol *to_add, short check); +void check(struct symbol *tab, char *ident, short type); + +#endif