stage4/generate_c/generate_c_st.cc
changeset 1026 fe580c0c1911
parent 1012 1f2af384fb1f
child 1038 036f15e4041d
child 1041 56ebe2a31b5b
equal deleted inserted replaced
1022:0d4d3a502d82 1026:fe580c0c1911
   591   return NULL;
   591   return NULL;
   592 }
   592 }
   593 
   593 
   594 void *visit(xor_expression_c *symbol) {
   594 void *visit(xor_expression_c *symbol) {
   595   if (get_datatype_info_c::is_BOOL_compatible(symbol->datatype)) {
   595   if (get_datatype_info_c::is_BOOL_compatible(symbol->datatype)) {
   596     s4o.print("(");
   596     s4o.print("((");
   597     symbol->l_exp->accept(*this);
   597     symbol->l_exp->accept(*this);
   598     s4o.print(" && !");
   598     s4o.print(" && !");
   599     symbol->r_exp->accept(*this);
   599     symbol->r_exp->accept(*this);
   600     s4o.print(") || (!");
   600     s4o.print(") || (!");
   601     symbol->l_exp->accept(*this);
   601     symbol->l_exp->accept(*this);
   602     s4o.print(" && ");
   602     s4o.print(" && ");
   603     symbol->r_exp->accept(*this);
   603     symbol->r_exp->accept(*this);
   604     s4o.print(")");
   604     s4o.print("))");
   605     return NULL;
   605     return NULL;
   606   }
   606   }
   607   if (get_datatype_info_c::is_ANY_nBIT_compatible(symbol->datatype))
   607   if (get_datatype_info_c::is_ANY_nBIT_compatible(symbol->datatype))
   608     return print_binary_expression(symbol->l_exp, symbol->r_exp, " ^ ");
   608     return print_binary_expression(symbol->l_exp, symbol->r_exp, " ^ ");
   609   ERROR;
   609   ERROR;