12345678910111213141516171819202122232425 |
- #ifndef SYMBOL_TABLE_H_INCLUDED
- #define SYMBOL_TABLE_H_INCLUDED
-
- #define SYMBOL_TABLE_SIZE 100
-
- enum Type {
- TYPE_CONST,
- TYPE_INT
- };
-
- struct SymbolItem {
- enum Type type;
- char* name;
- int address;
- int init;
- };
-
- typedef struct SymbolTable {
- struct SymbolIte table[SYMBOL_TABLE_SIZE];
- int index;
- } SymbolTable;
-
- void add_symbol(SymbolTable table, enum Type type, char* name);
-
- #endif /* !SYMBOL_TABLE_H_INCLUDED */
|