475 * current_var_init_symbol private variables... |
475 * current_var_init_symbol private variables... |
476 */ |
476 */ |
477 update_var_type_symbol(symbol->array_spec_init); |
477 update_var_type_symbol(symbol->array_spec_init); |
478 |
478 |
479 declare_variables(symbol->var1_list); |
479 declare_variables(symbol->var1_list); |
480 |
480 |
481 /* Values no longer in scope, and therefore no longer used. |
481 /* Values no longer in scope, and therefore no longer used. |
482 * Make an effort to keep them set to NULL when not in use |
482 * Make an effort to keep them set to NULL when not in use |
483 * in order to catch bugs as soon as possible... |
483 * in order to catch bugs as soon as possible... |
484 */ |
484 */ |
485 reset_var_type_symbol(); |
485 reset_var_type_symbol(); |
486 |
486 |
487 return NULL; |
487 return NULL; |
|
488 } |
|
489 |
|
490 /* var1_list ':' array_specification */ |
|
491 //SYM_REF2(array_var_declaration_c, var1_list, array_specification) |
|
492 void *visit(array_var_declaration_c *symbol) { |
|
493 TRACE("array_var_declaration_c"); |
|
494 /* Start off by setting the current_var_type_symbol and |
|
495 * current_var_init_symbol private variables... |
|
496 */ |
|
497 update_var_type_symbol(symbol->array_specification); |
|
498 |
|
499 declare_variables(symbol->var1_list); |
|
500 |
|
501 /* Values no longer in scope, and therefore no longer used. |
|
502 * Make an effort to keep them set to NULL when not in use |
|
503 * in order to catch bugs as soon as possible... |
|
504 */ |
|
505 reset_var_type_symbol(); |
|
506 |
|
507 return NULL; |
488 } |
508 } |
489 |
509 |
490 /* var1_list ':' initialized_structure */ |
510 /* var1_list ':' initialized_structure */ |
491 // SYM_REF2(structured_var_init_decl_c, var1_list, initialized_structure) |
511 // SYM_REF2(structured_var_init_decl_c, var1_list, initialized_structure) |
492 void *visit(structured_var_init_decl_c *symbol) { |
512 void *visit(structured_var_init_decl_c *symbol) { |
507 * Make an effort to keep them set to NULL when not in use |
527 * Make an effort to keep them set to NULL when not in use |
508 * in order to catch bugs as soon as possible... |
528 * in order to catch bugs as soon as possible... |
509 */ |
529 */ |
510 reset_var_type_symbol(); |
530 reset_var_type_symbol(); |
511 |
531 |
|
532 return NULL; |
|
533 } |
|
534 |
|
535 /* var1_list ':' structure_type_name */ |
|
536 //SYM_REF2(structured_var_declaration_c, var1_list, structure_type_name) |
|
537 void *visit(structured_var_declaration_c *symbol) { |
|
538 TRACE("structured_var_declaration_c"); |
|
539 /* Please read the comments inside the var1_init_decl_c |
|
540 * visitor, as they apply here too. |
|
541 */ |
|
542 |
|
543 /* Start off by setting the current_var_type_symbol and |
|
544 * current_var_init_symbol private variables... |
|
545 */ |
|
546 update_var_type_symbol(symbol->structure_type_name); |
|
547 |
|
548 /* now to produce the c equivalent... */ |
|
549 declare_variables(symbol->var1_list); |
|
550 |
|
551 /* Values no longer in scope, and therefore no longer used. |
|
552 * Make an effort to keep them set to NULL when not in use |
|
553 * in order to catch bugs as soon as possible... |
|
554 */ |
|
555 reset_var_type_symbol(); |
|
556 |
|
557 return NULL; |
|
558 } |
|
559 |
|
560 /* enumerated_value_list ',' enumerated_value */ |
|
561 void *visit(enumerated_value_list_c *symbol) { |
|
562 this->current_var_type_name->accept(*this); |
512 return NULL; |
563 return NULL; |
513 } |
564 } |
514 |
565 |
515 /* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ |
566 /* fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ |
516 /* structure_initialization -> may be NULL ! */ |
567 /* structure_initialization -> may be NULL ! */ |