2 #include "symbol_table.h"
5 symbol_table_destroy(Symbol
* table
)
7 Symbol
* first
, second
;
24 symbol_table_dump(Symbol table
)
32 printf("%s\n", temp
->name
);
33 printf("%d\n", temp
->type
);
43 symbol_insert(Symbol
* table
, char const * name
, int type
)
46 Symbol
* symbol
= (Symbol
*) malloc (sizeof(Symbol
));
48 strcpy (symbol
->name
,name
);
55 symbol_lookup(Symbol
* table
, char const * name
)
61 while(strcmp (temp
->name
,name
) && temp
!= NULL
){
72 symbol_exists(Symbol
* table
, char const * name
)
80 if(strcmp (temp
->name
,name
)){