Implementando a symbol_table
[toypasc.git] / symbol_table.h
blobd61866dc540b1ee65f931e221f686acd1eabca29
1 #ifndef SYMBOL_TABLE_H
2 #define SYMBOL_TABLE_H
4 typedef struct _symbol {
5 char *name;
6 int type;
8 union {
9 int integer;
10 int boolean;
11 char character;
12 } value;
14 struct _symbol *next;
15 } Symbol;
17 Symbol *symbol_table_new(void);
18 void symbol_table_destroy(void);
19 char *symbol_table_dump(void);
20 Symbol *symbol_insert(char const * name, int type);
21 Symbol *symbol_lookup(char const * name);
22 int symbol_exists(char const * name);
24 #endif // SYMBOL_TABLE_H