equal
deleted
inserted
replaced
70 * variable declaration, for e.g., in window.point.x, this would be |
70 * variable declaration, for e.g., in window.point.x, this would be |
71 * window! |
71 * window! |
72 */ |
72 */ |
73 symbol_c *var_name_part = decompose_var_instance_name->next_part(); |
73 symbol_c *var_name_part = decompose_var_instance_name->next_part(); |
74 if (NULL == var_name_part) ERROR; |
74 if (NULL == var_name_part) ERROR; |
75 |
75 |
76 /* Now we try to find the variable instance declaration, to determine its type... */ |
76 /* Now we try to find the variable instance declaration, to determine its type... */ |
77 symbol_c *var_decl = search_var_instance_decl.get_decl(var_name_part); |
77 symbol_c *var_decl = search_var_instance_decl.get_decl(var_name_part); |
78 if (NULL == var_decl) { |
78 if (NULL == var_decl) { |
79 /* variable instance declaration not found! */ |
79 /* variable instance declaration not found! */ |
80 return NULL; |
80 return NULL; |
183 } |
183 } |
184 |
184 |
185 /* array_specification [ASSIGN array_initialization} */ |
185 /* array_specification [ASSIGN array_initialization} */ |
186 /* array_initialization may be NULL ! */ |
186 /* array_initialization may be NULL ! */ |
187 void *visit(array_spec_init_c *symbol) { |
187 void *visit(array_spec_init_c *symbol) { |
|
188 symbol_c *var_name = decompose_var_instance_name->next_part(); |
|
189 if (NULL != var_name) |
|
190 current_structelement_name = var_name; |
188 return symbol->array_specification->accept(*this); |
191 return symbol->array_specification->accept(*this); |
189 } |
192 } |
190 |
193 |
191 /* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */ |
194 /* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */ |
192 void *visit(array_specification_c *symbol) { |
195 void *visit(array_specification_c *symbol) { |
|
196 symbol_c *var_name = decompose_var_instance_name->next_part(); |
|
197 if (NULL != var_name) |
|
198 current_structelement_name = var_name; |
193 return symbol->non_generic_type_name->accept(*this); |
199 return symbol->non_generic_type_name->accept(*this); |
194 } |
200 } |
195 |
201 |
196 /* structure_type_name ':' structure_specification */ |
202 /* structure_type_name ':' structure_specification */ |
197 void *visit(structure_type_declaration_c *symbol) { |
203 void *visit(structure_type_declaration_c *symbol) { |
239 } |
245 } |
240 |
246 |
241 /* helper symbol for structure_declaration */ |
247 /* helper symbol for structure_declaration */ |
242 /* structure_declaration: STRUCT structure_element_declaration_list END_STRUCT */ |
248 /* structure_declaration: STRUCT structure_element_declaration_list END_STRUCT */ |
243 /* structure_element_declaration_list structure_element_declaration ';' */ |
249 /* structure_element_declaration_list structure_element_declaration ';' */ |
244 void *visit(structure_element_declaration_list_c *symbol) {return visit_list(symbol);} |
250 void *visit(structure_element_declaration_list_c *symbol) { |
|
251 return visit_list(symbol); |
|
252 } |
245 |
253 |
246 /* structure_element_name ':' spec_init */ |
254 /* structure_element_name ':' spec_init */ |
247 void *visit(structure_element_declaration_c *symbol) { |
255 void *visit(structure_element_declaration_c *symbol) { |
248 if (NULL == current_structelement_name) ERROR; |
256 if (NULL == current_structelement_name) ERROR; |
249 |
257 |