stage4/generate_c/generate_c_il.cc
changeset 706 31553c22f318
parent 625 c0bda77b37a0
child 793 268bf4ca5fa1
equal deleted inserted replaced
705:f2323f79252e 706:31553c22f318
   439     }
   439     }
   440 
   440 
   441     void *print_getter(symbol_c *symbol) {
   441     void *print_getter(symbol_c *symbol) {
   442       unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   442       unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   443       if (wanted_variablegeneration == fparam_output_vg) {
   443       if (wanted_variablegeneration == fparam_output_vg) {
   444       	if (vartype == search_var_instance_decl_c::external_vt)
   444         if (vartype == search_var_instance_decl_c::external_vt) {
   445           s4o.print(GET_EXTERNAL_BY_REF);
   445           if (search_var_instance_decl->type_is_fb(symbol))
       
   446             s4o.print(GET_EXTERNAL_FB_BY_REF);
       
   447           else
       
   448             s4o.print(GET_EXTERNAL_BY_REF);
       
   449         }
   446         else if (vartype == search_var_instance_decl_c::located_vt)
   450         else if (vartype == search_var_instance_decl_c::located_vt)
   447           s4o.print(GET_LOCATED_BY_REF);
   451           s4o.print(GET_LOCATED_BY_REF);
   448         else
   452         else
   449           s4o.print(GET_VAR_BY_REF);
   453           s4o.print(GET_VAR_BY_REF);
   450       }
   454       }
   451       else {
   455       else {
   452     	if (vartype == search_var_instance_decl_c::external_vt)
   456         if (vartype == search_var_instance_decl_c::external_vt) {
   453     	  s4o.print(GET_EXTERNAL);
   457           if (search_var_instance_decl->type_is_fb(symbol))
   454     	else if (vartype == search_var_instance_decl_c::located_vt)
   458             s4o.print(GET_EXTERNAL_FB);
   455     	  s4o.print(GET_LOCATED);
   459           else
   456     	else
   460             s4o.print(GET_EXTERNAL);
   457     	  s4o.print(GET_VAR);
   461         }
       
   462         else if (vartype == search_var_instance_decl_c::located_vt)
       
   463           s4o.print(GET_LOCATED);
       
   464         else
       
   465           s4o.print(GET_VAR);
   458       }
   466       }
   459       s4o.print("(");
   467       s4o.print("(");
   460 
   468 
   461       variablegeneration_t old_wanted_variablegeneration = wanted_variablegeneration;
   469       variablegeneration_t old_wanted_variablegeneration = wanted_variablegeneration;
   462       wanted_variablegeneration = complextype_base_vg;
   470       wanted_variablegeneration = complextype_base_vg;
   469       wanted_variablegeneration = old_wanted_variablegeneration;
   477       wanted_variablegeneration = old_wanted_variablegeneration;
   470       return NULL;
   478       return NULL;
   471     }
   479     }
   472 
   480 
   473     void *print_setter(symbol_c* symbol,
   481     void *print_setter(symbol_c* symbol,
   474     		symbol_c* type,
   482             symbol_c* type,
   475     		symbol_c* value,
   483             symbol_c* value,
   476     		symbol_c* fb_symbol = NULL,
   484             symbol_c* fb_symbol = NULL,
   477     		symbol_c* fb_value = NULL,
   485             symbol_c* fb_value = NULL,
   478     		bool negative = false) {
   486             bool negative = false) {
   479 
   487 
   480       bool type_is_complex = false;
   488       bool type_is_complex = search_var_instance_decl->type_is_complex(symbol);
   481       if (fb_symbol == NULL) {
   489       if (fb_symbol == NULL) {
   482         unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   490         unsigned int vartype = search_var_instance_decl->get_vartype(symbol);
   483         type_is_complex = search_var_instance_decl->type_is_complex(symbol);
   491         if (vartype == search_var_instance_decl_c::external_vt) {
   484         if (vartype == search_var_instance_decl_c::external_vt)
   492           if (search_var_instance_decl->type_is_fb(symbol))
   485           s4o.print(SET_EXTERNAL);
   493             s4o.print(SET_EXTERNAL_FB);
       
   494           else
       
   495             s4o.print(SET_EXTERNAL);
       
   496         }
   486         else if (vartype == search_var_instance_decl_c::located_vt)
   497         else if (vartype == search_var_instance_decl_c::located_vt)
   487           s4o.print(SET_LOCATED);
   498           s4o.print(SET_LOCATED);
   488         else
   499         else
   489           s4o.print(SET_VAR);
   500           s4o.print(SET_VAR);
   490       }
   501       }
   491       else
   502       else {
   492         s4o.print(SET_VAR);
   503         unsigned int vartype = search_var_instance_decl->get_vartype(fb_symbol);
       
   504         if (vartype == search_var_instance_decl_c::external_vt)
       
   505           s4o.print(SET_EXTERNAL_FB);
       
   506         else
       
   507           s4o.print(SET_VAR);
       
   508       }
   493       s4o.print("(");
   509       s4o.print("(");
   494 
   510 
   495       if (fb_symbol != NULL) {
   511       if (fb_symbol != NULL) {
   496         print_variable_prefix();
   512         print_variable_prefix();
   497         fb_symbol->accept(*this);
   513         fb_symbol->accept(*this);
   503         wanted_variablegeneration = assignment_vg;
   519         wanted_variablegeneration = assignment_vg;
   504 
   520 
   505       symbol->accept(*this);
   521       symbol->accept(*this);
   506       s4o.print(",");
   522       s4o.print(",");
   507       if (negative) {
   523       if (negative) {
   508 	    if (search_expression_type->is_bool_type(this->current_operand_type))
   524         if (search_expression_type->is_bool_type(this->current_operand_type))
   509 		  s4o.print("!");
   525           s4o.print("!");
   510 	    else
   526         else
   511 		  s4o.print("~");
   527           s4o.print("~");
   512       }
   528       }
   513       wanted_variablegeneration = expression_vg;
   529       wanted_variablegeneration = expression_vg;
   514       print_check_function(type, value, fb_value);
   530       print_check_function(type, value, fb_value);
   515       if (type_is_complex) {
   531       if (type_is_complex) {
   516         s4o.print(",");
   532         s4o.print(",");
   586       break;
   602       break;
   587     case complextype_base_vg:
   603     case complextype_base_vg:
   588       generate_c_base_c::visit(symbol);
   604       generate_c_base_c::visit(symbol);
   589       break;
   605       break;
   590     case complextype_suffix_vg:
   606     case complextype_suffix_vg:
   591 	  break;
   607       break;
   592     default:
   608     default:
   593       if (this->is_variable_prefix_null()) {
   609       if (this->is_variable_prefix_null()) {
   594 	    vartype = search_var_instance_decl->get_vartype(symbol);
   610         vartype = search_var_instance_decl->get_vartype(symbol);
   595         if (wanted_variablegeneration == fparam_output_vg) {
   611         if (wanted_variablegeneration == fparam_output_vg) {
   596           s4o.print("&(");
   612           s4o.print("&(");
   597           generate_c_base_c::visit(symbol);
   613           generate_c_base_c::visit(symbol);
   598           s4o.print(")");
   614           s4o.print(")");
   599         }
   615         }
   616   TRACE("direct_variable_c");
   632   TRACE("direct_variable_c");
   617   /* Do not use print_token() as it will change everything into uppercase */
   633   /* Do not use print_token() as it will change everything into uppercase */
   618   if (strlen(symbol->value) == 0) ERROR;
   634   if (strlen(symbol->value) == 0) ERROR;
   619   if (this->is_variable_prefix_null()) {
   635   if (this->is_variable_prefix_null()) {
   620     if (wanted_variablegeneration != fparam_output_vg)
   636     if (wanted_variablegeneration != fparam_output_vg)
   621 	  s4o.print("*(");
   637       s4o.print("*(");
   622   }
   638   }
   623   else {
   639   else {
   624     switch (wanted_variablegeneration) {
   640     switch (wanted_variablegeneration) {
   625       case expression_vg:
   641       case expression_vg:
   626   	    s4o.print(GET_LOCATED);
   642         s4o.print(GET_LOCATED);
   627   	    s4o.print("(");
   643         s4o.print("(");
   628   	    break;
   644         break;
   629       case fparam_output_vg:
   645       case fparam_output_vg:
   630         s4o.print(GET_LOCATED_BY_REF);
   646         s4o.print(GET_LOCATED_BY_REF);
   631         s4o.print("(");
   647         s4o.print("(");
   632         break;
   648         break;
   633       default:
   649       default:
   635     }
   651     }
   636   }
   652   }
   637   this->print_variable_prefix();
   653   this->print_variable_prefix();
   638   s4o.printlocation(symbol->value + 1);
   654   s4o.printlocation(symbol->value + 1);
   639   if ((this->is_variable_prefix_null() && wanted_variablegeneration != fparam_output_vg) ||
   655   if ((this->is_variable_prefix_null() && wanted_variablegeneration != fparam_output_vg) ||
   640 	  wanted_variablegeneration != assignment_vg)
   656       wanted_variablegeneration != assignment_vg)
   641     s4o.print(")");
   657     s4o.print(")");
   642   return NULL;
   658   return NULL;
   643 }
   659 }
   644 
   660 
   645 /*************************************/
   661 /*************************************/
   658         s4o.print(".");
   674         s4o.print(".");
   659         symbol->field_selector->accept(*this);
   675         symbol->field_selector->accept(*this);
   660       }
   676       }
   661       break;
   677       break;
   662     case complextype_suffix_vg:
   678     case complextype_suffix_vg:
   663 	  symbol->record_variable->accept(*this);
   679       symbol->record_variable->accept(*this);
   664 	  if (type_is_complex) {
   680       if (type_is_complex) {
   665 		s4o.print(".");
   681         s4o.print(".");
   666 		symbol->field_selector->accept(*this);
   682         symbol->field_selector->accept(*this);
   667 	  }
   683       }
   668 	  break;
   684       break;
   669 	case assignment_vg:
   685     case assignment_vg:
   670 	  symbol->record_variable->accept(*this);
   686       symbol->record_variable->accept(*this);
   671 	  s4o.print(".");
   687       s4o.print(".");
   672 	  symbol->field_selector->accept(*this);
   688       symbol->field_selector->accept(*this);
   673 	  break;
   689       break;
   674     default:
   690     default:
   675       if (this->is_variable_prefix_null()) {
   691       if (this->is_variable_prefix_null()) {
   676     	symbol->record_variable->accept(*this);
   692         symbol->record_variable->accept(*this);
   677     	s4o.print(".");
   693         s4o.print(".");
   678     	symbol->field_selector->accept(*this);
   694         symbol->field_selector->accept(*this);
   679       }
   695       }
   680       else
   696       else
   681     	print_getter(symbol);
   697         print_getter(symbol);
   682       break;
   698       break;
   683   }
   699   }
   684   return NULL;
   700   return NULL;
   685 }
   701 }
   686 
   702 
   714         symbol->subscript_list->accept(*this);
   730         symbol->subscript_list->accept(*this);
   715 
   731 
   716         current_array_type = NULL;
   732         current_array_type = NULL;
   717       }
   733       }
   718       else
   734       else
   719     	print_getter(symbol);
   735         print_getter(symbol);
   720       break;
   736       break;
   721   }
   737   }
   722   return NULL;
   738   return NULL;
   723 }
   739 }
   724 
   740 
   725 /* subscript_list ',' subscript */
   741 /* subscript_list ',' subscript */
   726 void *visit(subscript_list_c *symbol) {
   742 void *visit(subscript_list_c *symbol) {
   727   array_dimension_iterator_c* array_dimension_iterator = new array_dimension_iterator_c(current_array_type);
   743   array_dimension_iterator_c* array_dimension_iterator = new array_dimension_iterator_c(current_array_type);
   728   for (int i =  0; i < symbol->n; i++) {
   744   for (int i =  0; i < symbol->n; i++) {
   729     symbol_c* dimension = array_dimension_iterator->next();
   745     symbol_c* dimension = array_dimension_iterator->next();
   730 	if (dimension == NULL) ERROR;
   746     if (dimension == NULL) ERROR;
   731 
   747 
   732 	s4o.print("[(");
   748     s4o.print("[(");
   733     symbol->elements[i]->accept(*this);
   749     symbol->elements[i]->accept(*this);
   734     s4o.print(") - (");
   750     s4o.print(") - (");
   735     dimension->accept(*this);
   751     dimension->accept(*this);
   736     s4o.print(")]");
   752     s4o.print(")]");
   737   }
   753   }
   966     s4o.print("(");
   982     s4o.print("(");
   967     search_expression_type->default_literal_type(function_type_prefix)->accept(*this);
   983     search_expression_type->default_literal_type(function_type_prefix)->accept(*this);
   968     s4o.print(")");
   984     s4o.print(")");
   969   }
   985   }
   970   if (function_type_suffix != NULL) {
   986   if (function_type_suffix != NULL) {
   971   	function_type_suffix = search_expression_type->default_literal_type(function_type_suffix);
   987     function_type_suffix = search_expression_type->default_literal_type(function_type_suffix);
   972   }
   988   }
   973   if (has_output_params) {
   989   if (has_output_params) {
   974     fcall_number++;
   990     fcall_number++;
   975     s4o.print("__");
   991     s4o.print("__");
   976     fbname->accept(*this);
   992     fbname->accept(*this);
   991             /* function being called is overloaded! */
  1007             /* function being called is overloaded! */
   992             s4o.print("__");
  1008             s4o.print("__");
   993             print_function_parameter_data_types_c overloaded_func_suf(&s4o);
  1009             print_function_parameter_data_types_c overloaded_func_suf(&s4o);
   994             f_decl->accept(overloaded_func_suf);
  1010             f_decl->accept(overloaded_func_suf);
   995           }
  1011           }
   996     }	  
  1012     }
   997     if (function_type_suffix != NULL)
  1013     if (function_type_suffix != NULL)
   998       function_type_suffix->accept(*this);
  1014       function_type_suffix->accept(*this);
   999   }
  1015   }
  1000   s4o.print("(");
  1016   s4o.print("(");
  1001   s4o.indent_right();
  1017   s4o.indent_right();
  1167     
  1183     
  1168         /* now output the value assignment */
  1184         /* now output the value assignment */
  1169     if (param_value != NULL)
  1185     if (param_value != NULL)
  1170       if ((param_direction == function_param_iterator_c::direction_in) ||
  1186       if ((param_direction == function_param_iterator_c::direction_in) ||
  1171           (param_direction == function_param_iterator_c::direction_inout)) {
  1187           (param_direction == function_param_iterator_c::direction_inout)) {
  1172     	if (this->is_variable_prefix_null()) {
  1188         if (this->is_variable_prefix_null()) {
  1173     	  symbol->fb_name->accept(*this);
  1189           symbol->fb_name->accept(*this);
  1174           s4o.print(".");
  1190           s4o.print(".");
  1175           param_name->accept(*this);
  1191           param_name->accept(*this);
  1176           s4o.print(" = ");
  1192           s4o.print(" = ");
  1177           print_check_function(param_type, param_value);
  1193           print_check_function(param_type, param_value);
  1178     	}
  1194         }
  1179         else {
  1195         else {
  1180           print_setter(param_name, param_type, param_value, symbol->fb_name);
  1196           print_setter(param_name, param_type, param_value, symbol->fb_name);
  1181         }
  1197         }
  1182         s4o.print(";\n" + s4o.indent_spaces);
  1198         s4o.print(";\n" + s4o.indent_spaces);
  1183       }
  1199       }
  1184   } /* for(...) */
  1200   } /* for(...) */
  1185 
  1201 
  1186   /* now call the function... */
  1202   /* now call the function... */
  1187   function_block_type_name->accept(*this);
  1203   function_block_type_name->accept(*this);
  1188   s4o.print(FB_FUNCTION_SUFFIX);
  1204   s4o.print(FB_FUNCTION_SUFFIX);
  1189   s4o.print("(&");
  1205   s4o.print("(");
       
  1206   if (search_var_instance_decl->get_vartype(symbol->fb_name) != search_var_instance_decl_c::external_vt)
       
  1207     s4o.print("&");
  1190   print_variable_prefix();
  1208   print_variable_prefix();
  1191   symbol->fb_name->accept(*this);
  1209   symbol->fb_name->accept(*this);
  1192   s4o.print(")");
  1210   s4o.print(")");
  1193 
  1211 
  1194   /* loop through each function parameter, find the variable to which
  1212   /* loop through each function parameter, find the variable to which
  1215           (param_direction == function_param_iterator_c::direction_inout)) {
  1233           (param_direction == function_param_iterator_c::direction_inout)) {
  1216         symbol_c *param_type = search_varfb_instance_type->get_type_id(param_value);
  1234         symbol_c *param_type = search_varfb_instance_type->get_type_id(param_value);
  1217         s4o.print(";\n" + s4o.indent_spaces);
  1235         s4o.print(";\n" + s4o.indent_spaces);
  1218         if (this->is_variable_prefix_null()) {
  1236         if (this->is_variable_prefix_null()) {
  1219           param_value->accept(*this);
  1237           param_value->accept(*this);
  1220 		  s4o.print(" = ");
  1238           s4o.print(" = ");
  1221 		  print_check_function(param_type, param_name, symbol->fb_name);
  1239           print_check_function(param_type, param_name, symbol->fb_name);
  1222 		}
  1240         }
  1223 		else {
  1241         else {
  1224 		  print_setter(param_value, param_type, param_name, NULL, symbol->fb_name);
  1242           print_setter(param_value, param_type, param_name, NULL, symbol->fb_name);
  1225 		}
  1243         }
  1226       }
  1244       }
  1227   } /* for(...) */
  1245   } /* for(...) */
  1228 
  1246 
  1229   s4o.print(";\n");
  1247   s4o.print(";\n");
  1230   s4o.indent_left();
  1248   s4o.indent_left();
  1374     s4o.print("(");
  1392     s4o.print("(");
  1375     search_expression_type->default_literal_type(function_type_prefix)->accept(*this);
  1393     search_expression_type->default_literal_type(function_type_prefix)->accept(*this);
  1376     s4o.print(")");
  1394     s4o.print(")");
  1377   }
  1395   }
  1378   if (function_type_suffix != NULL) {
  1396   if (function_type_suffix != NULL) {
  1379   	function_type_suffix = search_expression_type->default_literal_type(function_type_suffix);
  1397     function_type_suffix = search_expression_type->default_literal_type(function_type_suffix);
  1380   }
  1398   }
  1381   if (has_output_params) {
  1399   if (has_output_params) {
  1382     fcall_number++;
  1400     fcall_number++;
  1383     s4o.print("__");
  1401     s4o.print("__");
  1384     fbname->accept(*this);
  1402     fbname->accept(*this);
  1572   s4o.print(s4o.indent_spaces);
  1590   s4o.print(s4o.indent_spaces);
  1573   return NULL;
  1591   return NULL;
  1574 }
  1592 }
  1575 
  1593 
  1576 // SYM_REF1(il_simple_instruction_c, il_simple_instruction, symbol_c *prev_il_instruction;)
  1594 // SYM_REF1(il_simple_instruction_c, il_simple_instruction, symbol_c *prev_il_instruction;)
  1577 void *visit(il_simple_instruction_c *symbol)	{
  1595 void *visit(il_simple_instruction_c *symbol) {
  1578   return symbol->il_simple_instruction->accept(*this);
  1596   return symbol->il_simple_instruction->accept(*this);
  1579 }
  1597 }
  1580 
  1598 
  1581 
  1599 
  1582 /* | il_initial_param_list il_param_instruction */
  1600 /* | il_initial_param_list il_param_instruction */
  1595 
  1613 
  1596 /*******************/
  1614 /*******************/
  1597 /* B 2.2 Operators */
  1615 /* B 2.2 Operators */
  1598 /*******************/
  1616 /*******************/
  1599 
  1617 
  1600 void *visit(LD_operator_c *symbol)	{
  1618 void *visit(LD_operator_c *symbol) {
  1601   if (wanted_variablegeneration != expression_vg) {
  1619   if (wanted_variablegeneration != expression_vg) {
  1602     s4o.print("LD");
  1620     s4o.print("LD");
  1603     return NULL;
  1621     return NULL;
  1604   }
  1622   }
  1605 
  1623 
  1607   this->default_variable_name.current_type = this->current_operand_type;
  1625   this->default_variable_name.current_type = this->current_operand_type;
  1608   XXX_operator(&(this->default_variable_name), " = ", this->current_operand);
  1626   XXX_operator(&(this->default_variable_name), " = ", this->current_operand);
  1609   return NULL;
  1627   return NULL;
  1610 }
  1628 }
  1611 
  1629 
  1612 void *visit(LDN_operator_c *symbol)	{
  1630 void *visit(LDN_operator_c *symbol) {
  1613   /* the data type resulting from this operation... */
  1631   /* the data type resulting from this operation... */
  1614   this->default_variable_name.current_type = this->current_operand_type;
  1632   this->default_variable_name.current_type = this->current_operand_type;
  1615   XXX_operator(&(this->default_variable_name),
  1633   XXX_operator(&(this->default_variable_name),
  1616                search_expression_type->is_bool_type(this->current_operand_type)?" = !":" = ~",
  1634                search_expression_type->is_bool_type(this->current_operand_type)?" = !":" = ~",
  1617                this->current_operand);
  1635                this->current_operand);
  1618   return NULL;
  1636   return NULL;
  1619 }
  1637 }
  1620 
  1638 
  1621 void *visit(ST_operator_c *symbol)	{
  1639 void *visit(ST_operator_c *symbol) {
  1622   symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand);
  1640   symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand);
  1623   if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type) ||
  1641   if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type) ||
  1624   	  search_expression_type->is_literal_real_type(this->default_variable_name.current_type))
  1642       search_expression_type->is_literal_real_type(this->default_variable_name.current_type))
  1625       this->default_variable_name.current_type = this->current_operand_type;
  1643       this->default_variable_name.current_type = this->current_operand_type;
  1626   if (this->is_variable_prefix_null()) {
  1644   if (this->is_variable_prefix_null()) {
  1627     this->current_operand->accept(*this);
  1645     this->current_operand->accept(*this);
  1628     s4o.print(" = ");
  1646     s4o.print(" = ");
  1629     print_check_function(operand_type, (symbol_c*)&(this->default_variable_name));
  1647     print_check_function(operand_type, (symbol_c*)&(this->default_variable_name));
  1630   }
  1648   }
  1631   else {
  1649   else {
  1632 	print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name));
  1650     print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name));
  1633   }
  1651   }
  1634   /* the data type resulting from this operation is unchanged. */
  1652   /* the data type resulting from this operation is unchanged. */
  1635   return NULL;
  1653   return NULL;
  1636 }
  1654 }
  1637 
  1655 
  1638 void *visit(STN_operator_c *symbol)	{
  1656 void *visit(STN_operator_c *symbol) {
  1639   symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand);
  1657   symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand);
  1640   if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type))
  1658   if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type))
  1641 	this->default_variable_name.current_type = this->current_operand_type;
  1659     this->default_variable_name.current_type = this->current_operand_type;
  1642   
  1660   
  1643   if (this->is_variable_prefix_null()) {
  1661   if (this->is_variable_prefix_null()) {
  1644     this->current_operand->accept(*this);
  1662     this->current_operand->accept(*this);
  1645     s4o.print(" = ");
  1663     s4o.print(" = ");
  1646     if (search_expression_type->is_bool_type(this->current_operand_type))
  1664     if (search_expression_type->is_bool_type(this->current_operand_type))
  1647       s4o.print("!");
  1665       s4o.print("!");
  1648     else
  1666     else
  1649 	  s4o.print("~");
  1667       s4o.print("~");
  1650     this->default_variable_name.accept(*this);
  1668     this->default_variable_name.accept(*this);
  1651   }
  1669   }
  1652   else {
  1670   else {
  1653 	print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name), NULL, NULL, true);
  1671     print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name), NULL, NULL, true);
  1654   }
  1672   }
  1655   /* the data type resulting from this operation is unchanged. */
  1673   /* the data type resulting from this operation is unchanged. */
  1656   return NULL;
  1674   return NULL;
  1657 }
  1675 }
  1658 
  1676 
  1659 void *visit(NOT_operator_c *symbol)	{
  1677 void *visit(NOT_operator_c *symbol) {
  1660   /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand>
  1678   /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand>
  1661    *              NOT [<il_operand>]
  1679    *              NOT [<il_operand>]
  1662    *       However, it does not define the semantic of the NOT operation when the <il_operand> is specified.
  1680    *       However, it does not define the semantic of the NOT operation when the <il_operand> is specified.
  1663    *       We therefore consider it an error if an il_operand is specified!
  1681    *       We therefore consider it an error if an il_operand is specified!
  1664    *       The error is caught in stage 3!
  1682    *       The error is caught in stage 3!
  1669                &(this->default_variable_name));
  1687                &(this->default_variable_name));
  1670   /* the data type resulting from this operation is unchanged. */
  1688   /* the data type resulting from this operation is unchanged. */
  1671   return NULL;
  1689   return NULL;
  1672 }
  1690 }
  1673 
  1691 
  1674 void *visit(S_operator_c *symbol)	{
  1692 void *visit(S_operator_c *symbol) {
  1675   if (wanted_variablegeneration != expression_vg) {
  1693   if (wanted_variablegeneration != expression_vg) {
  1676     s4o.print("LD");
  1694     s4o.print("LD");
  1677     return NULL;
  1695     return NULL;
  1678   }
  1696   }
  1679 
  1697 
  1692     ERROR;
  1710     ERROR;
  1693   /* the data type resulting from this operation is unchanged! */
  1711   /* the data type resulting from this operation is unchanged! */
  1694   return NULL;
  1712   return NULL;
  1695 }
  1713 }
  1696 
  1714 
  1697 void *visit(R_operator_c *symbol)	{
  1715 void *visit(R_operator_c *symbol) {
  1698   if (wanted_variablegeneration != expression_vg) {
  1716   if (wanted_variablegeneration != expression_vg) {
  1699     s4o.print("LD");
  1717     s4o.print("LD");
  1700     return NULL;
  1718     return NULL;
  1701   }
  1719   }
  1702 
  1720 
  1724 void *visit(CD_operator_c *symbol)	{return XXX_CAL_operator("CD", this->current_operand);}
  1742 void *visit(CD_operator_c *symbol)	{return XXX_CAL_operator("CD", this->current_operand);}
  1725 void *visit(PV_operator_c *symbol)	{return XXX_CAL_operator("PV", this->current_operand);}
  1743 void *visit(PV_operator_c *symbol)	{return XXX_CAL_operator("PV", this->current_operand);}
  1726 void *visit(IN_operator_c *symbol)	{return XXX_CAL_operator("IN", this->current_operand);}
  1744 void *visit(IN_operator_c *symbol)	{return XXX_CAL_operator("IN", this->current_operand);}
  1727 void *visit(PT_operator_c *symbol)	{return XXX_CAL_operator("PT", this->current_operand);}
  1745 void *visit(PT_operator_c *symbol)	{return XXX_CAL_operator("PT", this->current_operand);}
  1728 
  1746 
  1729 void *visit(AND_operator_c *symbol)	{
  1747 void *visit(AND_operator_c *symbol) {
  1730   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1748   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1731       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1749       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1732 	BYTE_operator_result_type();
  1750     BYTE_operator_result_type();
  1733 	XXX_operator(&(this->default_variable_name), " &= ", this->current_operand);
  1751     XXX_operator(&(this->default_variable_name), " &= ", this->current_operand);
  1734     /* the data type resulting from this operation... */
  1752     /* the data type resulting from this operation... */
  1735     this->default_variable_name.current_type = this->current_operand_type;
  1753     this->default_variable_name.current_type = this->current_operand_type;
  1736   }
  1754   }
  1737   else {ERROR;}
  1755   else {ERROR;}
  1738   return NULL;
  1756   return NULL;
  1739 }
  1757 }
  1740 
  1758 
  1741 void *visit(OR_operator_c *symbol)	{
  1759 void *visit(OR_operator_c *symbol) {
  1742   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1760   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1743       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1761       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1744 	BYTE_operator_result_type();
  1762     BYTE_operator_result_type();
  1745 	XXX_operator(&(this->default_variable_name), " |= ", this->current_operand);
  1763     XXX_operator(&(this->default_variable_name), " |= ", this->current_operand);
  1746     /* the data type resulting from this operation... */
  1764     /* the data type resulting from this operation... */
  1747     this->default_variable_name.current_type = this->current_operand_type;
  1765     this->default_variable_name.current_type = this->current_operand_type;
  1748   }
  1766   }
  1749   else {ERROR;}
  1767   else {ERROR;}
  1750   return NULL;
  1768   return NULL;
  1751 }
  1769 }
  1752 
  1770 
  1753 void *visit(XOR_operator_c *symbol)	{
  1771 void *visit(XOR_operator_c *symbol) {
  1754   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1772   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1755       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1773       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1756 	BYTE_operator_result_type();
  1774     BYTE_operator_result_type();
  1757 	// '^' is a bit by bit exclusive OR !! Also seems to work with boolean types!
  1775     // '^' is a bit by bit exclusive OR !! Also seems to work with boolean types!
  1758     XXX_operator(&(this->default_variable_name), " ^= ", this->current_operand);
  1776     XXX_operator(&(this->default_variable_name), " ^= ", this->current_operand);
  1759     /* the data type resulting from this operation... */
  1777     /* the data type resulting from this operation... */
  1760     this->default_variable_name.current_type = this->current_operand_type;
  1778     this->default_variable_name.current_type = this->current_operand_type;
  1761   }
  1779   }
  1762   else {ERROR;}
  1780   else {ERROR;}
  1763   return NULL;
  1781   return NULL;
  1764 }
  1782 }
  1765 
  1783 
  1766 void *visit(ANDN_operator_c *symbol)	{
  1784 void *visit(ANDN_operator_c *symbol) {
  1767   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1785   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1768       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1786       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1769 	BYTE_operator_result_type();
  1787     BYTE_operator_result_type();
  1770 	XXX_operator(&(this->default_variable_name),
  1788     XXX_operator(&(this->default_variable_name),
  1771                  search_expression_type->is_bool_type(this->current_operand_type)?" &= !":" &= ~",
  1789                  search_expression_type->is_bool_type(this->current_operand_type)?" &= !":" &= ~",
  1772                  this->current_operand);
  1790                  this->current_operand);
  1773     /* the data type resulting from this operation... */
  1791     /* the data type resulting from this operation... */
  1774     this->default_variable_name.current_type = this->current_operand_type;
  1792     this->default_variable_name.current_type = this->current_operand_type;
  1775   }
  1793   }
  1776   else {ERROR;}
  1794   else {ERROR;}
  1777   return NULL;
  1795   return NULL;
  1778 }
  1796 }
  1779 
  1797 
  1780 void *visit(ORN_operator_c *symbol)	{
  1798 void *visit(ORN_operator_c *symbol) {
  1781   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1799   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1782       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1800       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1783 	BYTE_operator_result_type();
  1801     BYTE_operator_result_type();
  1784 	XXX_operator(&(this->default_variable_name),
  1802     XXX_operator(&(this->default_variable_name),
  1785                  search_expression_type->is_bool_type(this->current_operand_type)?" |= !":" |= ~",
  1803                  search_expression_type->is_bool_type(this->current_operand_type)?" |= !":" |= ~",
  1786                  this->current_operand);
  1804                  this->current_operand);
  1787     /* the data type resulting from this operation... */
  1805     /* the data type resulting from this operation... */
  1788     this->default_variable_name.current_type = this->current_operand_type;
  1806     this->default_variable_name.current_type = this->current_operand_type;
  1789   }
  1807   }
  1790   else {ERROR;}
  1808   else {ERROR;}
  1791   return NULL;
  1809   return NULL;
  1792 }
  1810 }
  1793 
  1811 
  1794 void *visit(XORN_operator_c *symbol)	{
  1812 void *visit(XORN_operator_c *symbol) {
  1795   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1813   if (search_expression_type->is_binary_type(this->default_variable_name.current_type) &&
  1796       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1814       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1797 	BYTE_operator_result_type();
  1815     BYTE_operator_result_type();
  1798 	XXX_operator(&(this->default_variable_name),
  1816     XXX_operator(&(this->default_variable_name),
  1799                  // bit by bit exclusive OR !! Also seems to work with boolean types!
  1817                  // bit by bit exclusive OR !! Also seems to work with boolean types!
  1800                  search_expression_type->is_bool_type(this->current_operand_type)?" ^= !":" ^= ~",
  1818                  search_expression_type->is_bool_type(this->current_operand_type)?" ^= !":" ^= ~",
  1801                  this->current_operand);
  1819                  this->current_operand);
  1802     /* the data type resulting from this operation... */
  1820     /* the data type resulting from this operation... */
  1803     this->default_variable_name.current_type = this->current_operand_type;
  1821     this->default_variable_name.current_type = this->current_operand_type;
  1804   }
  1822   }
  1805   else {ERROR;}
  1823   else {ERROR;}
  1806   return NULL;
  1824   return NULL;
  1807 }
  1825 }
  1808 
  1826 
  1809 void *visit(ADD_operator_c *symbol)	{
  1827 void *visit(ADD_operator_c *symbol) {
  1810   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1828   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1811       search_expression_type->is_time_type(this->current_operand_type)) {
  1829       search_expression_type->is_time_type(this->current_operand_type)) {
  1812     XXX_function("__time_add", &(this->default_variable_name), this->current_operand);
  1830     XXX_function("__time_add", &(this->default_variable_name), this->current_operand);
  1813     /* the data type resulting from this operation... */
  1831     /* the data type resulting from this operation... */
  1814     this->default_variable_name.current_type = this->current_operand_type;
  1832     this->default_variable_name.current_type = this->current_operand_type;
  1815   }
  1833   }
  1816   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1834   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1817       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1835       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1818 	NUM_operator_result_type();
  1836     NUM_operator_result_type();
  1819 	XXX_operator(&(this->default_variable_name), " += ", this->current_operand);
  1837     XXX_operator(&(this->default_variable_name), " += ", this->current_operand);
  1820     /* the data type resulting from this operation... */
  1838     /* the data type resulting from this operation... */
  1821     this->default_variable_name.current_type = this->current_operand_type;
  1839     this->default_variable_name.current_type = this->current_operand_type;
  1822   }
  1840   }
  1823   else {ERROR;}
  1841   else {ERROR;}
  1824   return NULL;
  1842   return NULL;
  1825 }
  1843 }
  1826 
  1844 
  1827 void *visit(SUB_operator_c *symbol)	{
  1845 void *visit(SUB_operator_c *symbol) {
  1828   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1846   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1829       search_expression_type->is_time_type(this->current_operand_type)) {
  1847       search_expression_type->is_time_type(this->current_operand_type)) {
  1830     XXX_function("__time_sub", &(this->default_variable_name), this->current_operand);
  1848     XXX_function("__time_sub", &(this->default_variable_name), this->current_operand);
  1831     /* the data type resulting from this operation... */
  1849     /* the data type resulting from this operation... */
  1832     this->default_variable_name.current_type = this->current_operand_type;
  1850     this->default_variable_name.current_type = this->current_operand_type;
  1833   }
  1851   }
  1834   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1852   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1835       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1853       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1836 	NUM_operator_result_type();
  1854     NUM_operator_result_type();
  1837 	XXX_operator(&(this->default_variable_name), " -= ", this->current_operand);
  1855     XXX_operator(&(this->default_variable_name), " -= ", this->current_operand);
  1838     /* the data type resulting from this operation... */
  1856     /* the data type resulting from this operation... */
  1839     this->default_variable_name.current_type = this->current_operand_type;
  1857     this->default_variable_name.current_type = this->current_operand_type;
  1840   }
  1858   }
  1841   else {ERROR;}
  1859   else {ERROR;}
  1842   return NULL;
  1860   return NULL;
  1843 }
  1861 }
  1844 
  1862 
  1845 void *visit(MUL_operator_c *symbol)	{
  1863 void *visit(MUL_operator_c *symbol) {
  1846   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1864   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1847       search_expression_type->is_integer_type(this->current_operand_type)) {
  1865       search_expression_type->is_integer_type(this->current_operand_type)) {
  1848     XXX_function("__time_mul", &(this->default_variable_name), this->current_operand);
  1866     XXX_function("__time_mul", &(this->default_variable_name), this->current_operand);
  1849     /* the data type resulting from this operation is unchanged! */
  1867     /* the data type resulting from this operation is unchanged! */
  1850   }
  1868   }
  1851   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1869   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1852       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1870       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1853 	NUM_operator_result_type();
  1871     NUM_operator_result_type();
  1854     XXX_operator(&(this->default_variable_name), " *= ", this->current_operand);
  1872     XXX_operator(&(this->default_variable_name), " *= ", this->current_operand);
  1855     /* the data type resulting from this operation... */
  1873     /* the data type resulting from this operation... */
  1856     this->default_variable_name.current_type = this->current_operand_type;
  1874     this->default_variable_name.current_type = this->current_operand_type;
  1857   }
  1875   }
  1858   else {ERROR;}
  1876   else {ERROR;}
  1859   return NULL;
  1877   return NULL;
  1860 }
  1878 }
  1861 
  1879 
  1862 void *visit(DIV_operator_c *symbol)	{
  1880 void *visit(DIV_operator_c *symbol) {
  1863   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1881   if (search_expression_type->is_time_type(this->default_variable_name.current_type) &&
  1864       search_expression_type->is_integer_type(this->current_operand_type)) {
  1882       search_expression_type->is_integer_type(this->current_operand_type)) {
  1865     XXX_function("__time_div", &(this->default_variable_name), this->current_operand);
  1883     XXX_function("__time_div", &(this->default_variable_name), this->current_operand);
  1866     /* the data type resulting from this operation is unchanged! */
  1884     /* the data type resulting from this operation is unchanged! */
  1867   }
  1885   }
  1868   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1886   else if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1869       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1887       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1870 	NUM_operator_result_type();
  1888     NUM_operator_result_type();
  1871 	XXX_operator(&(this->default_variable_name), " /= ", this->current_operand);
  1889     XXX_operator(&(this->default_variable_name), " /= ", this->current_operand);
  1872     /* the data type resulting from this operation... */
  1890     /* the data type resulting from this operation... */
  1873     this->default_variable_name.current_type = this->current_operand_type;
  1891     this->default_variable_name.current_type = this->current_operand_type;
  1874     return NULL;
  1892     return NULL;
  1875   }
  1893   }
  1876   else {ERROR;}
  1894   else {ERROR;}
  1877   return NULL;
  1895   return NULL;
  1878 }
  1896 }
  1879 
  1897 
  1880 void *visit(MOD_operator_c *symbol)	{
  1898 void *visit(MOD_operator_c *symbol) {
  1881   if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1899   if (search_expression_type->is_num_type(this->default_variable_name.current_type) &&
  1882       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1900       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1883 	NUM_operator_result_type();
  1901     NUM_operator_result_type();
  1884 	XXX_operator(&(this->default_variable_name), " %= ", this->current_operand);
  1902     XXX_operator(&(this->default_variable_name), " %= ", this->current_operand);
  1885     /* the data type resulting from this operation... */
  1903     /* the data type resulting from this operation... */
  1886     this->default_variable_name.current_type = this->current_operand_type;
  1904     this->default_variable_name.current_type = this->current_operand_type;
  1887   }
  1905   }
  1888   else {ERROR;}
  1906   else {ERROR;}
  1889   return NULL;
  1907   return NULL;
  1890 }
  1908 }
  1891 
  1909 
  1892 void *visit(GT_operator_c *symbol)	{
  1910 void *visit(GT_operator_c *symbol) {
  1893   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1911   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1894       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1912       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1895     CMP_operator(this->current_operand, "GT_");
  1913     CMP_operator(this->current_operand, "GT_");
  1896   } else {
  1914   } else {
  1897     ERROR;
  1915     ERROR;
  1898   }
  1916   }
  1899   return NULL;
  1917   return NULL;
  1900 }
  1918 }
  1901 
  1919 
  1902 void *visit(GE_operator_c *symbol)	{
  1920 void *visit(GE_operator_c *symbol) {
  1903   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1921   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1904       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1922       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1905     CMP_operator(this->current_operand, "GE_");
  1923     CMP_operator(this->current_operand, "GE_");
  1906   } else {
  1924   } else {
  1907     ERROR;
  1925     ERROR;
  1908   }
  1926   }
  1909   return NULL;
  1927   return NULL;
  1910 }
  1928 }
  1911 
  1929 
  1912 void *visit(EQ_operator_c *symbol)	{
  1930 void *visit(EQ_operator_c *symbol) {
  1913   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1931   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1914     CMP_operator(this->current_operand, "EQ_");
  1932     CMP_operator(this->current_operand, "EQ_");
  1915   } else {
  1933   } else {
  1916     ERROR;
  1934     ERROR;
  1917   }
  1935   }
  1918   return NULL;
  1936   return NULL;
  1919 }
  1937 }
  1920 
  1938 
  1921 void *visit(LT_operator_c *symbol)	{
  1939 void *visit(LT_operator_c *symbol) {
  1922   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1940   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1923       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1941       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1924     CMP_operator(this->current_operand, "LT_");
  1942     CMP_operator(this->current_operand, "LT_");
  1925   } else {
  1943   } else {
  1926     ERROR;
  1944     ERROR;
  1927   }
  1945   }
  1928   return NULL;
  1946   return NULL;
  1929 }
  1947 }
  1930 
  1948 
  1931 void *visit(LE_operator_c *symbol)	{
  1949 void *visit(LE_operator_c *symbol) {
  1932   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1950   if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) &&
  1933       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1951       search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1934     CMP_operator(this->current_operand, "LE_");
  1952     CMP_operator(this->current_operand, "LE_");
  1935   } else {
  1953   } else {
  1936     ERROR;
  1954     ERROR;
  1937   }
  1955   }
  1938   return NULL;
  1956   return NULL;
  1939 }
  1957 }
  1940 
  1958 
  1941 void *visit(NE_operator_c *symbol)	{
  1959 void *visit(NE_operator_c *symbol) {
  1942   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1960   if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) {
  1943     CMP_operator(this->current_operand, "NE_");
  1961     CMP_operator(this->current_operand, "NE_");
  1944   } else {
  1962   } else {
  1945     ERROR;
  1963     ERROR;
  1946   }
  1964   }
  1990   s4o.print("goto ");s4o.print(END_LABEL);
  2008   s4o.print("goto ");s4o.print(END_LABEL);
  1991   return NULL;
  2009   return NULL;
  1992 }
  2010 }
  1993 
  2011 
  1994 //SYM_REF0(JMP_operator_c)
  2012 //SYM_REF0(JMP_operator_c)
  1995 void *visit(JMP_operator_c *symbol)	{
  2013 void *visit(JMP_operator_c *symbol) {
  1996   if (NULL == this->jump_label) ERROR;
  2014   if (NULL == this->jump_label) ERROR;
  1997 
  2015 
  1998   s4o.print("goto ");
  2016   s4o.print("goto ");
  1999   this->jump_label->accept(*this);
  2017   this->jump_label->accept(*this);
  2000   /* the data type resulting from this operation is unchanged! */
  2018   /* the data type resulting from this operation is unchanged! */
  2001   return NULL;
  2019   return NULL;
  2002 }
  2020 }
  2003 
  2021 
  2004 // SYM_REF0(JMPC_operator_c)
  2022 // SYM_REF0(JMPC_operator_c)
  2005 void *visit(JMPC_operator_c *symbol)	{
  2023 void *visit(JMPC_operator_c *symbol) {
  2006   if (NULL == this->jump_label) ERROR;
  2024   if (NULL == this->jump_label) ERROR;
  2007 
  2025 
  2008   C_modifier();
  2026   C_modifier();
  2009   s4o.print("goto ");
  2027   s4o.print("goto ");
  2010   this->jump_label->accept(*this);
  2028   this->jump_label->accept(*this);
  2011   /* the data type resulting from this operation is unchanged! */
  2029   /* the data type resulting from this operation is unchanged! */
  2012   return NULL;
  2030   return NULL;
  2013 }
  2031 }
  2014 
  2032 
  2015 // SYM_REF0(JMPCN_operator_c)
  2033 // SYM_REF0(JMPCN_operator_c)
  2016 void *visit(JMPCN_operator_c *symbol)	{
  2034 void *visit(JMPCN_operator_c *symbol) {
  2017   if (NULL == this->jump_label) ERROR;
  2035   if (NULL == this->jump_label) ERROR;
  2018 
  2036 
  2019   CN_modifier();
  2037   CN_modifier();
  2020   s4o.print("goto ");
  2038   s4o.print("goto ");
  2021   this->jump_label->accept(*this);
  2039   this->jump_label->accept(*this);