54 |
typedef struct symbol_s symbol_t; |
typedef struct symbol_s symbol_t; |
55 |
struct symbol_s |
struct symbol_s |
56 |
{ |
{ |
57 |
/* The key, name of the symbol. */ |
/* The key, name of the symbol. */ |
58 |
char *tag; |
char *tag; |
59 |
/* Its type. */ |
|
60 |
|
/* Its %type. */ |
61 |
char *type_name; |
char *type_name; |
62 |
|
|
63 |
/* The location of its first occurence. */ |
/* The location of its first occurence. */ |
64 |
location_t location; |
location_t location; |
65 |
|
|
66 |
symbol_number_t number; |
symbol_number_t number; |
107 |
|
|
108 |
/* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as |
/* Set the TYPE_NAME associated to SYMBOL. Does nothing if passed 0 as |
109 |
TYPE_NAME. */ |
TYPE_NAME. */ |
110 |
void symbol_type_set PARAMS ((symbol_t *symbol, char *type_name)); |
void symbol_type_set PARAMS ((symbol_t *symbol, location_t location, |
111 |
|
char *type_name)); |
112 |
|
|
113 |
/* Set the PRECEDENCE associated to SYMBOL. Ensures that SYMBOL is a |
/* Set the PRECEDENCE associated to SYMBOL. Ensures that SYMBOL is a |
114 |
terminal. Does nothing if invoked with UNDEF_ASSOC as ASSOC. */ |
terminal. Does nothing if invoked with UNDEF_ASSOC as ASSOC. */ |
115 |
void symbol_precedence_set PARAMS ((symbol_t *symbol, |
void symbol_precedence_set PARAMS ((symbol_t *symbol, location_t location, |
116 |
int prec, associativity assoc)); |
int prec, associativity assoc)); |
117 |
|
|
118 |
/* Set the CLASS associated to SYMBOL. */ |
/* Set the CLASS associated to SYMBOL. */ |