105 public: |
105 public: |
106 /* WARNING: only use this method for debugging purposes!! */ |
106 /* WARNING: only use this method for debugging purposes!! */ |
107 virtual const char *absyntax_cname(void) {return "symbol_c";}; |
107 virtual const char *absyntax_cname(void) {return "symbol_c";}; |
108 |
108 |
109 /* |
109 /* |
110 * Line number for the purposes of error checking. |
110 * Annotations produced during stage 1_2 |
111 * Annotated (inserted) by stage1_2 |
111 */ |
112 */ |
112 /* Line number for the purposes of error checking. */ |
113 int first_line; |
113 int first_line; |
114 int first_column; |
114 int first_column; |
115 const char *first_file; /* filename referenced by first line/column */ |
115 const char *first_file; /* filename referenced by first line/column */ |
116 long int first_order; /* relative order in which it is read by lexcial analyser */ |
116 long int first_order; /* relative order in which it is read by lexcial analyser */ |
117 int last_line; |
117 int last_line; |
168 /*** Enumeration datatype checking ***/ |
168 /*** Enumeration datatype checking ***/ |
169 /* Not all symbols will contain the following anotations, which is why they are not declared here in symbol_c |
169 /* Not all symbols will contain the following anotations, which is why they are not declared here in symbol_c |
170 * They will be declared only inside the symbols that require them (have a look at absyntax.def) |
170 * They will be declared only inside the symbols that require them (have a look at absyntax.def) |
171 */ |
171 */ |
172 typedef std::multimap<std::string, symbol_c *, nocasecmp_c> enumvalue_symtable_t; |
172 typedef std::multimap<std::string, symbol_c *, nocasecmp_c> enumvalue_symtable_t; |
|
173 |
|
174 /* |
|
175 * Annotations produced during stage 4 |
|
176 */ |
|
177 /* Since we support several distinct stage_4 implementations, having explicit entries for each |
|
178 * possible use would quickly get out of hand. |
|
179 * We therefore simply add a map, that each stage 4 may use for all its needs. |
|
180 */ |
|
181 typedef std::map<std::string, symbol_c *> anotations_map_t; |
|
182 anotations_map_t anotations_map; |
173 |
183 |
174 |
184 |
175 public: |
185 public: |
176 /* default constructor */ |
186 /* default constructor */ |
177 symbol_c(int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */ |
187 symbol_c(int fl = 0, int fc = 0, const char *ffile = NULL /* filename */, long int forder=0, /* order in which it is read by lexcial analyser */ |