4 #define SYMBOL_TYPE_FIELD 1
5 #define SYMBOL_TYPE_VAR 2
6 #define SYMBOL_TYPE_PARAM 3
10 struct symbol_t *next;
13 int param_index; /* -1 if not a parameter */
16 struct symbol_t *clone_table(struct symbol_t *table);
17 struct symbol_t *new_table(void);
18 struct symbol_t *table_add_symbol(struct symbol_t *table, char *identifier, short type, short check, int stack_offset);
19 struct symbol_t *table_add_param(struct symbol_t *table, char *identifier, int param_index);
20 struct symbol_t *table_lookup(struct symbol_t *table, char *identifier);
21 struct symbol_t *table_remove_symbol(struct symbol_t *table, char *identifier);
22 struct symbol_t *table_merge(struct symbol_t *table, struct symbol_t *to_add, short check);
23 void check_variable(struct symbol_t *table, char *identifier);
24 void check_field(struct symbol_t *table, char *identifier);
26 #endif /* SYMBOL_TABLE_H */