aboutsummaryrefslogtreecommitdiff
path: root/src/symbol_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/symbol_table.h')
-rw-r--r--src/symbol_table.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/symbol_table.h b/src/symbol_table.h
index fe0e35c..917e4f9 100644
--- a/src/symbol_table.h
+++ b/src/symbol_table.h
@@ -12,6 +12,7 @@
12 12
13#define MAXNAME 32 13#define MAXNAME 32
14#define MAXSYMBOLS 256 14#define MAXSYMBOLS 256
15#define MAXFUNCTIONS 256
15 16
16typedef enum type { 17typedef enum type {
17 INT, 18 INT,
@@ -30,6 +31,21 @@ typedef struct {
30 int size; 31 int size;
31} SymbolTable; 32} SymbolTable;
32 33
34typedef struct {
35 char name[MAXNAME];
36 int return_type;
37 int nb_parameters;
38} FTentry;
39
40typedef struct {
41 FTentry entries[MAXFUNCTIONS];
42 int maxsize;
43 int size;
44} FunctionTable;
45
46void fun_add(const char name[], int rt_type, int nb_par);
47void fun_display_table();
48int fun_lookup(const char name[], int nb_param);
33void glo_addVar(const char name[], int type); 49void glo_addVar(const char name[], int type);
34int glo_lookup(const char name[]); 50int glo_lookup(const char name[]);
35int glo_get_addr(const char name[]); 51int glo_get_addr(const char name[]);