Go to the source code of this file.
Typedefs | |
typedef TABLE * | table_t |
Functions | |
table_t | init_table () |
void | free_table (table_t t) |
int | find (const table_t t, const char *s, int *val) |
int | add_symbole (table_t t, const char *s, int val) |
void | print_table (const table_t t) |
Definition in file table.h.
|
Definition du type table_t representant une table de symboles. Toute variable table_t doit etre initialisee a NULL tant qu'on n'a pas appele init_table() Definition at line 17 of file table.h. Referenced by add_symbole(), find(), free_table(), init_table(), and print_table(). |
|
Ajoute un symbole a la table, avec une valeur si le symbole est deja dans la table_t, celle-ci est inchangee, sinon, le symbole est ajoute avec sa valeur. En cas d'echec, num_erreur est fixe a E_EXISTS
Definition at line 69 of file table.c. References find(), and table_t. Referenced by traiteConstante(). |
|
Verifie si un symbole est dans la table; si le symbole est trouve, *val contient la valeur associee. En cas d'echec, num_erreur est fixe a E_NOT_FOUND
Definition at line 57 of file table.c. References table_t. Referenced by add_symbole(), and recupereArgument(). |
|
Libere la memoire allouee pour la table
Definition at line 46 of file table.c. References table_t. Referenced by end(). |
|
Initialise une nouvelle table
Definition at line 41 of file table.c. References table_t. Referenced by traiteConstante(). |
|
Affiche la table des symboles
Definition at line 85 of file table.c. References table_t. |