etisserant@33: etisserant@33: /**** etisserant@33: * IEC 61131-3 standard function lib etisserant@33: * generated code, do not edit by hand etisserant@33: */ etisserant@33: switch(current_function_type){ etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_REAL etisserant@33: */ etisserant@33: case function_real_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_SINT etisserant@33: */ etisserant@33: case function_real_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_LINT etisserant@33: */ etisserant@33: case function_real_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_DINT etisserant@33: */ etisserant@33: case function_real_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_DATE etisserant@33: */ etisserant@33: case function_real_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_DWORD etisserant@33: */ etisserant@33: case function_real_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_DT etisserant@33: */ etisserant@33: case function_real_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_TOD etisserant@33: */ etisserant@33: case function_real_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_UDINT etisserant@33: */ etisserant@33: case function_real_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_WORD etisserant@33: */ etisserant@33: case function_real_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_WSTRING etisserant@33: */ etisserant@33: case function_real_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_STRING etisserant@33: */ etisserant@33: case function_real_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_LWORD etisserant@33: */ etisserant@33: case function_real_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_UINT etisserant@33: */ etisserant@33: case function_real_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_LREAL etisserant@33: */ etisserant@33: case function_real_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_BYTE etisserant@33: */ etisserant@33: case function_real_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_USINT etisserant@33: */ etisserant@33: case function_real_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_ULINT etisserant@33: */ etisserant@33: case function_real_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_BOOL etisserant@33: */ etisserant@33: case function_real_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_TIME etisserant@33: */ etisserant@33: case function_real_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REAL_TO_INT etisserant@33: */ etisserant@33: case function_real_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(real_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_real_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_REAL etisserant@33: */ etisserant@33: case function_sint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_SINT etisserant@33: */ etisserant@33: case function_sint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_LINT etisserant@33: */ etisserant@33: case function_sint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_DINT etisserant@33: */ etisserant@33: case function_sint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_DATE etisserant@33: */ etisserant@33: case function_sint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_DWORD etisserant@33: */ etisserant@33: case function_sint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_DT etisserant@33: */ etisserant@33: case function_sint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_TOD etisserant@33: */ etisserant@33: case function_sint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_UDINT etisserant@33: */ etisserant@33: case function_sint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_WORD etisserant@33: */ etisserant@33: case function_sint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_sint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_STRING etisserant@33: */ etisserant@33: case function_sint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_LWORD etisserant@33: */ etisserant@33: case function_sint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_UINT etisserant@33: */ etisserant@33: case function_sint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_LREAL etisserant@33: */ etisserant@33: case function_sint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_BYTE etisserant@33: */ etisserant@33: case function_sint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_USINT etisserant@33: */ etisserant@33: case function_sint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_ULINT etisserant@33: */ etisserant@33: case function_sint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_BOOL etisserant@33: */ etisserant@33: case function_sint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_TIME etisserant@33: */ etisserant@33: case function_sint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_INT etisserant@33: */ etisserant@33: case function_sint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_REAL etisserant@33: */ etisserant@33: case function_lint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_SINT etisserant@33: */ etisserant@33: case function_lint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_LINT etisserant@33: */ etisserant@33: case function_lint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_DINT etisserant@33: */ etisserant@33: case function_lint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_DATE etisserant@33: */ etisserant@33: case function_lint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_DWORD etisserant@33: */ etisserant@33: case function_lint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_DT etisserant@33: */ etisserant@33: case function_lint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_TOD etisserant@33: */ etisserant@33: case function_lint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_UDINT etisserant@33: */ etisserant@33: case function_lint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_WORD etisserant@33: */ etisserant@33: case function_lint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_lint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_STRING etisserant@33: */ etisserant@33: case function_lint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_LWORD etisserant@33: */ etisserant@33: case function_lint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_UINT etisserant@33: */ etisserant@33: case function_lint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_LREAL etisserant@33: */ etisserant@33: case function_lint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_BYTE etisserant@33: */ etisserant@33: case function_lint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_USINT etisserant@33: */ etisserant@33: case function_lint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_ULINT etisserant@33: */ etisserant@33: case function_lint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_BOOL etisserant@33: */ etisserant@33: case function_lint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_TIME etisserant@33: */ etisserant@33: case function_lint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_INT etisserant@33: */ etisserant@33: case function_lint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_REAL etisserant@33: */ etisserant@33: case function_dint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_SINT etisserant@33: */ etisserant@33: case function_dint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_LINT etisserant@33: */ etisserant@33: case function_dint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_DINT etisserant@33: */ etisserant@33: case function_dint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_DATE etisserant@33: */ etisserant@33: case function_dint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_DWORD etisserant@33: */ etisserant@33: case function_dint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_DT etisserant@33: */ etisserant@33: case function_dint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_TOD etisserant@33: */ etisserant@33: case function_dint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_UDINT etisserant@33: */ etisserant@33: case function_dint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_WORD etisserant@33: */ etisserant@33: case function_dint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_dint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_STRING etisserant@33: */ etisserant@33: case function_dint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_LWORD etisserant@33: */ etisserant@33: case function_dint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_UINT etisserant@33: */ etisserant@33: case function_dint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_LREAL etisserant@33: */ etisserant@33: case function_dint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_BYTE etisserant@33: */ etisserant@33: case function_dint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_USINT etisserant@33: */ etisserant@33: case function_dint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_ULINT etisserant@33: */ etisserant@33: case function_dint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_BOOL etisserant@33: */ etisserant@33: case function_dint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_TIME etisserant@33: */ etisserant@33: case function_dint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_INT etisserant@33: */ etisserant@33: case function_dint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_REAL etisserant@33: */ etisserant@33: case function_date_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_SINT etisserant@33: */ etisserant@33: case function_date_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_LINT etisserant@33: */ etisserant@33: case function_date_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_DINT etisserant@33: */ etisserant@33: case function_date_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_DATE etisserant@33: */ etisserant@33: case function_date_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_DWORD etisserant@33: */ etisserant@33: case function_date_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_DT etisserant@33: */ etisserant@33: case function_date_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_TOD etisserant@33: */ etisserant@33: case function_date_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_UDINT etisserant@33: */ etisserant@33: case function_date_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_WORD etisserant@33: */ etisserant@33: case function_date_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_WSTRING etisserant@33: */ etisserant@33: case function_date_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_STRING etisserant@33: */ etisserant@33: case function_date_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_LWORD etisserant@33: */ etisserant@33: case function_date_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_UINT etisserant@33: */ etisserant@33: case function_date_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_LREAL etisserant@33: */ etisserant@33: case function_date_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_BYTE etisserant@33: */ etisserant@33: case function_date_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_USINT etisserant@33: */ etisserant@33: case function_date_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_ULINT etisserant@33: */ etisserant@33: case function_date_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_BOOL etisserant@33: */ etisserant@33: case function_date_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_TIME etisserant@33: */ etisserant@33: case function_date_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_TO_INT etisserant@33: */ etisserant@33: case function_date_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_REAL etisserant@33: */ etisserant@33: case function_dword_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_SINT etisserant@33: */ etisserant@33: case function_dword_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_LINT etisserant@33: */ etisserant@33: case function_dword_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_DINT etisserant@33: */ etisserant@33: case function_dword_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_DATE etisserant@33: */ etisserant@33: case function_dword_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_DWORD etisserant@33: */ etisserant@33: case function_dword_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_DT etisserant@33: */ etisserant@33: case function_dword_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_TOD etisserant@33: */ etisserant@33: case function_dword_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_UDINT etisserant@33: */ etisserant@33: case function_dword_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_WORD etisserant@33: */ etisserant@33: case function_dword_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_WSTRING etisserant@33: */ etisserant@33: case function_dword_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_STRING etisserant@33: */ etisserant@33: case function_dword_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_LWORD etisserant@33: */ etisserant@33: case function_dword_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_UINT etisserant@33: */ etisserant@33: case function_dword_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_LREAL etisserant@33: */ etisserant@33: case function_dword_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_BYTE etisserant@33: */ etisserant@33: case function_dword_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_USINT etisserant@33: */ etisserant@33: case function_dword_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_ULINT etisserant@33: */ etisserant@33: case function_dword_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_BOOL etisserant@33: */ etisserant@33: case function_dword_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_TIME etisserant@33: */ etisserant@33: case function_dword_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DWORD_TO_INT etisserant@33: */ etisserant@33: case function_dword_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dword_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_REAL etisserant@33: */ etisserant@33: case function_dt_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_SINT etisserant@33: */ etisserant@33: case function_dt_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_LINT etisserant@33: */ etisserant@33: case function_dt_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_DINT etisserant@33: */ etisserant@33: case function_dt_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_DATE etisserant@33: */ etisserant@33: case function_dt_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_DWORD etisserant@33: */ etisserant@33: case function_dt_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_DT etisserant@33: */ etisserant@33: case function_dt_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_TOD etisserant@33: */ etisserant@33: case function_dt_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_UDINT etisserant@33: */ etisserant@33: case function_dt_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_WORD etisserant@33: */ etisserant@33: case function_dt_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_WSTRING etisserant@33: */ etisserant@33: case function_dt_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_STRING etisserant@33: */ etisserant@33: case function_dt_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_LWORD etisserant@33: */ etisserant@33: case function_dt_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_UINT etisserant@33: */ etisserant@33: case function_dt_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_LREAL etisserant@33: */ etisserant@33: case function_dt_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_BYTE etisserant@33: */ etisserant@33: case function_dt_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_USINT etisserant@33: */ etisserant@33: case function_dt_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_ULINT etisserant@33: */ etisserant@33: case function_dt_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_BOOL etisserant@33: */ etisserant@33: case function_dt_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_TIME etisserant@33: */ etisserant@33: case function_dt_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DT_TO_INT etisserant@33: */ etisserant@33: case function_dt_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dt_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_REAL etisserant@33: */ etisserant@33: case function_tod_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_SINT etisserant@33: */ etisserant@33: case function_tod_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_LINT etisserant@33: */ etisserant@33: case function_tod_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_DINT etisserant@33: */ etisserant@33: case function_tod_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_DATE etisserant@33: */ etisserant@33: case function_tod_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_DWORD etisserant@33: */ etisserant@33: case function_tod_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_DT etisserant@33: */ etisserant@33: case function_tod_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_TOD etisserant@33: */ etisserant@33: case function_tod_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_UDINT etisserant@33: */ etisserant@33: case function_tod_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_WORD etisserant@33: */ etisserant@33: case function_tod_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_WSTRING etisserant@33: */ etisserant@33: case function_tod_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_STRING etisserant@33: */ etisserant@33: case function_tod_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_LWORD etisserant@33: */ etisserant@33: case function_tod_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_UINT etisserant@33: */ etisserant@33: case function_tod_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_LREAL etisserant@33: */ etisserant@33: case function_tod_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_BYTE etisserant@33: */ etisserant@33: case function_tod_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_USINT etisserant@33: */ etisserant@33: case function_tod_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_ULINT etisserant@33: */ etisserant@33: case function_tod_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_BOOL etisserant@33: */ etisserant@33: case function_tod_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_TIME etisserant@33: */ etisserant@33: case function_tod_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TOD_TO_INT etisserant@33: */ etisserant@33: case function_tod_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tod_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_REAL etisserant@33: */ etisserant@33: case function_udint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_SINT etisserant@33: */ etisserant@33: case function_udint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_LINT etisserant@33: */ etisserant@33: case function_udint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_DINT etisserant@33: */ etisserant@33: case function_udint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_DATE etisserant@33: */ etisserant@33: case function_udint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_DWORD etisserant@33: */ etisserant@33: case function_udint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_DT etisserant@33: */ etisserant@33: case function_udint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_TOD etisserant@33: */ etisserant@33: case function_udint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_UDINT etisserant@33: */ etisserant@33: case function_udint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_WORD etisserant@33: */ etisserant@33: case function_udint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_udint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_STRING etisserant@33: */ etisserant@33: case function_udint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_LWORD etisserant@33: */ etisserant@33: case function_udint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_UINT etisserant@33: */ etisserant@33: case function_udint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_LREAL etisserant@33: */ etisserant@33: case function_udint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_BYTE etisserant@33: */ etisserant@33: case function_udint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_USINT etisserant@33: */ etisserant@33: case function_udint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_ULINT etisserant@33: */ etisserant@33: case function_udint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_BOOL etisserant@33: */ etisserant@33: case function_udint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_TIME etisserant@33: */ etisserant@33: case function_udint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_INT etisserant@33: */ etisserant@33: case function_udint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_REAL etisserant@33: */ etisserant@33: case function_word_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_SINT etisserant@33: */ etisserant@33: case function_word_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_LINT etisserant@33: */ etisserant@33: case function_word_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_DINT etisserant@33: */ etisserant@33: case function_word_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_DATE etisserant@33: */ etisserant@33: case function_word_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_DWORD etisserant@33: */ etisserant@33: case function_word_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_DT etisserant@33: */ etisserant@33: case function_word_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_TOD etisserant@33: */ etisserant@33: case function_word_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_UDINT etisserant@33: */ etisserant@33: case function_word_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_WORD etisserant@33: */ etisserant@33: case function_word_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_WSTRING etisserant@33: */ etisserant@33: case function_word_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_STRING etisserant@33: */ etisserant@33: case function_word_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_LWORD etisserant@33: */ etisserant@33: case function_word_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_UINT etisserant@33: */ etisserant@33: case function_word_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_LREAL etisserant@33: */ etisserant@33: case function_word_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_BYTE etisserant@33: */ etisserant@33: case function_word_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_USINT etisserant@33: */ etisserant@33: case function_word_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_ULINT etisserant@33: */ etisserant@33: case function_word_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_BOOL etisserant@33: */ etisserant@33: case function_word_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_TIME etisserant@33: */ etisserant@33: case function_word_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WORD_TO_INT etisserant@33: */ etisserant@33: case function_word_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(word_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_word_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_REAL etisserant@33: */ etisserant@33: case function_wstring_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_SINT etisserant@33: */ etisserant@33: case function_wstring_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_LINT etisserant@33: */ etisserant@33: case function_wstring_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_DINT etisserant@33: */ etisserant@33: case function_wstring_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_DATE etisserant@33: */ etisserant@33: case function_wstring_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_DWORD etisserant@33: */ etisserant@33: case function_wstring_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_DT etisserant@33: */ etisserant@33: case function_wstring_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_TOD etisserant@33: */ etisserant@33: case function_wstring_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_UDINT etisserant@33: */ etisserant@33: case function_wstring_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_WORD etisserant@33: */ etisserant@33: case function_wstring_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_WSTRING etisserant@33: */ etisserant@33: case function_wstring_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_STRING etisserant@33: */ etisserant@33: case function_wstring_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_LWORD etisserant@33: */ etisserant@33: case function_wstring_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_UINT etisserant@33: */ etisserant@33: case function_wstring_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_LREAL etisserant@33: */ etisserant@33: case function_wstring_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_BYTE etisserant@33: */ etisserant@33: case function_wstring_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_USINT etisserant@33: */ etisserant@33: case function_wstring_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_ULINT etisserant@33: */ etisserant@33: case function_wstring_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_BOOL etisserant@33: */ etisserant@33: case function_wstring_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_TIME etisserant@33: */ etisserant@33: case function_wstring_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *WSTRING_TO_INT etisserant@33: */ etisserant@33: case function_wstring_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(wstring_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_wstring_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_REAL etisserant@33: */ etisserant@33: case function_string_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_SINT etisserant@33: */ etisserant@33: case function_string_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_LINT etisserant@33: */ etisserant@33: case function_string_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_DINT etisserant@33: */ etisserant@33: case function_string_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_DATE etisserant@33: */ etisserant@33: case function_string_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_DWORD etisserant@33: */ etisserant@33: case function_string_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_DT etisserant@33: */ etisserant@33: case function_string_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_TOD etisserant@33: */ etisserant@33: case function_string_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_UDINT etisserant@33: */ etisserant@33: case function_string_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_WORD etisserant@33: */ etisserant@33: case function_string_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_WSTRING etisserant@33: */ etisserant@33: case function_string_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_STRING etisserant@33: */ etisserant@33: case function_string_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_LWORD etisserant@33: */ etisserant@33: case function_string_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_UINT etisserant@33: */ etisserant@33: case function_string_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_LREAL etisserant@33: */ etisserant@33: case function_string_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_BYTE etisserant@33: */ etisserant@33: case function_string_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_USINT etisserant@33: */ etisserant@33: case function_string_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_ULINT etisserant@33: */ etisserant@33: case function_string_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_BOOL etisserant@33: */ etisserant@33: case function_string_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_TIME etisserant@33: */ etisserant@33: case function_string_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *STRING_TO_INT etisserant@33: */ etisserant@33: case function_string_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_string_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_REAL etisserant@33: */ etisserant@33: case function_lword_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_SINT etisserant@33: */ etisserant@33: case function_lword_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_LINT etisserant@33: */ etisserant@33: case function_lword_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_DINT etisserant@33: */ etisserant@33: case function_lword_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_DATE etisserant@33: */ etisserant@33: case function_lword_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_DWORD etisserant@33: */ etisserant@33: case function_lword_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_DT etisserant@33: */ etisserant@33: case function_lword_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_TOD etisserant@33: */ etisserant@33: case function_lword_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_UDINT etisserant@33: */ etisserant@33: case function_lword_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_WORD etisserant@33: */ etisserant@33: case function_lword_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_WSTRING etisserant@33: */ etisserant@33: case function_lword_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_STRING etisserant@33: */ etisserant@33: case function_lword_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_LWORD etisserant@33: */ etisserant@33: case function_lword_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_UINT etisserant@33: */ etisserant@33: case function_lword_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_LREAL etisserant@33: */ etisserant@33: case function_lword_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_BYTE etisserant@33: */ etisserant@33: case function_lword_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_USINT etisserant@33: */ etisserant@33: case function_lword_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_ULINT etisserant@33: */ etisserant@33: case function_lword_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_BOOL etisserant@33: */ etisserant@33: case function_lword_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_TIME etisserant@33: */ etisserant@33: case function_lword_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LWORD_TO_INT etisserant@33: */ etisserant@33: case function_lword_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lword_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lword_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_REAL etisserant@33: */ etisserant@33: case function_uint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_SINT etisserant@33: */ etisserant@33: case function_uint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_LINT etisserant@33: */ etisserant@33: case function_uint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_DINT etisserant@33: */ etisserant@33: case function_uint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_DATE etisserant@33: */ etisserant@33: case function_uint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_DWORD etisserant@33: */ etisserant@33: case function_uint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_DT etisserant@33: */ etisserant@33: case function_uint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_TOD etisserant@33: */ etisserant@33: case function_uint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_UDINT etisserant@33: */ etisserant@33: case function_uint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_WORD etisserant@33: */ etisserant@33: case function_uint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_uint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_STRING etisserant@33: */ etisserant@33: case function_uint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_LWORD etisserant@33: */ etisserant@33: case function_uint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_UINT etisserant@33: */ etisserant@33: case function_uint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_LREAL etisserant@33: */ etisserant@33: case function_uint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_BYTE etisserant@33: */ etisserant@33: case function_uint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_USINT etisserant@33: */ etisserant@33: case function_uint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_ULINT etisserant@33: */ etisserant@33: case function_uint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_BOOL etisserant@33: */ etisserant@33: case function_uint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_TIME etisserant@33: */ etisserant@33: case function_uint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_INT etisserant@33: */ etisserant@33: case function_uint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_REAL etisserant@33: */ etisserant@33: case function_lreal_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_SINT etisserant@33: */ etisserant@33: case function_lreal_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_LINT etisserant@33: */ etisserant@33: case function_lreal_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_DINT etisserant@33: */ etisserant@33: case function_lreal_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_DATE etisserant@33: */ etisserant@33: case function_lreal_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_DWORD etisserant@33: */ etisserant@33: case function_lreal_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_DT etisserant@33: */ etisserant@33: case function_lreal_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_TOD etisserant@33: */ etisserant@33: case function_lreal_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_UDINT etisserant@33: */ etisserant@33: case function_lreal_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_WORD etisserant@33: */ etisserant@33: case function_lreal_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_WSTRING etisserant@33: */ etisserant@33: case function_lreal_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_STRING etisserant@33: */ etisserant@33: case function_lreal_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_LWORD etisserant@33: */ etisserant@33: case function_lreal_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_UINT etisserant@33: */ etisserant@33: case function_lreal_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_LREAL etisserant@33: */ etisserant@33: case function_lreal_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_BYTE etisserant@33: */ etisserant@33: case function_lreal_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_USINT etisserant@33: */ etisserant@33: case function_lreal_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_ULINT etisserant@33: */ etisserant@33: case function_lreal_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_BOOL etisserant@33: */ etisserant@33: case function_lreal_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_TIME etisserant@33: */ etisserant@33: case function_lreal_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LREAL_TO_INT etisserant@33: */ etisserant@33: case function_lreal_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lreal_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lreal_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_REAL etisserant@33: */ etisserant@33: case function_byte_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_SINT etisserant@33: */ etisserant@33: case function_byte_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_LINT etisserant@33: */ etisserant@33: case function_byte_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_DINT etisserant@33: */ etisserant@33: case function_byte_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_DATE etisserant@33: */ etisserant@33: case function_byte_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_DWORD etisserant@33: */ etisserant@33: case function_byte_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_DT etisserant@33: */ etisserant@33: case function_byte_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_TOD etisserant@33: */ etisserant@33: case function_byte_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_UDINT etisserant@33: */ etisserant@33: case function_byte_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_WORD etisserant@33: */ etisserant@33: case function_byte_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_WSTRING etisserant@33: */ etisserant@33: case function_byte_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_STRING etisserant@33: */ etisserant@33: case function_byte_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_LWORD etisserant@33: */ etisserant@33: case function_byte_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_UINT etisserant@33: */ etisserant@33: case function_byte_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_LREAL etisserant@33: */ etisserant@33: case function_byte_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_BYTE etisserant@33: */ etisserant@33: case function_byte_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_USINT etisserant@33: */ etisserant@33: case function_byte_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_ULINT etisserant@33: */ etisserant@33: case function_byte_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_BOOL etisserant@33: */ etisserant@33: case function_byte_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_TIME etisserant@33: */ etisserant@33: case function_byte_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BYTE_TO_INT etisserant@33: */ etisserant@33: case function_byte_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(byte_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_byte_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_REAL etisserant@33: */ etisserant@33: case function_usint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_SINT etisserant@33: */ etisserant@33: case function_usint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_LINT etisserant@33: */ etisserant@33: case function_usint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_DINT etisserant@33: */ etisserant@33: case function_usint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_DATE etisserant@33: */ etisserant@33: case function_usint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_DWORD etisserant@33: */ etisserant@33: case function_usint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_DT etisserant@33: */ etisserant@33: case function_usint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_TOD etisserant@33: */ etisserant@33: case function_usint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_UDINT etisserant@33: */ etisserant@33: case function_usint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_WORD etisserant@33: */ etisserant@33: case function_usint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_usint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_STRING etisserant@33: */ etisserant@33: case function_usint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_LWORD etisserant@33: */ etisserant@33: case function_usint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_UINT etisserant@33: */ etisserant@33: case function_usint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_LREAL etisserant@33: */ etisserant@33: case function_usint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_BYTE etisserant@33: */ etisserant@33: case function_usint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_USINT etisserant@33: */ etisserant@33: case function_usint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_ULINT etisserant@33: */ etisserant@33: case function_usint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_BOOL etisserant@33: */ etisserant@33: case function_usint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_TIME etisserant@33: */ etisserant@33: case function_usint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_INT etisserant@33: */ etisserant@33: case function_usint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_REAL etisserant@33: */ etisserant@33: case function_ulint_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_SINT etisserant@33: */ etisserant@33: case function_ulint_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_LINT etisserant@33: */ etisserant@33: case function_ulint_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_DINT etisserant@33: */ etisserant@33: case function_ulint_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_DATE etisserant@33: */ etisserant@33: case function_ulint_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_DWORD etisserant@33: */ etisserant@33: case function_ulint_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_DT etisserant@33: */ etisserant@33: case function_ulint_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_TOD etisserant@33: */ etisserant@33: case function_ulint_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_UDINT etisserant@33: */ etisserant@33: case function_ulint_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_WORD etisserant@33: */ etisserant@33: case function_ulint_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_WSTRING etisserant@33: */ etisserant@33: case function_ulint_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_STRING etisserant@33: */ etisserant@33: case function_ulint_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_LWORD etisserant@33: */ etisserant@33: case function_ulint_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_UINT etisserant@33: */ etisserant@33: case function_ulint_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_LREAL etisserant@33: */ etisserant@33: case function_ulint_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_BYTE etisserant@33: */ etisserant@33: case function_ulint_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_USINT etisserant@33: */ etisserant@33: case function_ulint_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_ULINT etisserant@33: */ etisserant@33: case function_ulint_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_BOOL etisserant@33: */ etisserant@33: case function_ulint_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_TIME etisserant@33: */ etisserant@33: case function_ulint_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_INT etisserant@33: */ etisserant@33: case function_ulint_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_REAL etisserant@33: */ etisserant@33: case function_bool_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_SINT etisserant@33: */ etisserant@33: case function_bool_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_LINT etisserant@33: */ etisserant@33: case function_bool_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_DINT etisserant@33: */ etisserant@33: case function_bool_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_DATE etisserant@33: */ etisserant@33: case function_bool_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_DWORD etisserant@33: */ etisserant@33: case function_bool_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_DT etisserant@33: */ etisserant@33: case function_bool_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_TOD etisserant@33: */ etisserant@33: case function_bool_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_UDINT etisserant@33: */ etisserant@33: case function_bool_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_WORD etisserant@33: */ etisserant@33: case function_bool_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_WSTRING etisserant@33: */ etisserant@33: case function_bool_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_STRING etisserant@33: */ etisserant@33: case function_bool_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_LWORD etisserant@33: */ etisserant@33: case function_bool_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_UINT etisserant@33: */ etisserant@33: case function_bool_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_LREAL etisserant@33: */ etisserant@33: case function_bool_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_BYTE etisserant@33: */ etisserant@33: case function_bool_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_USINT etisserant@33: */ etisserant@33: case function_bool_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_ULINT etisserant@33: */ etisserant@33: case function_bool_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_BOOL etisserant@33: */ etisserant@33: case function_bool_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_TIME etisserant@33: */ etisserant@33: case function_bool_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BOOL_TO_INT etisserant@33: */ etisserant@33: case function_bool_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bool_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_REAL etisserant@33: */ etisserant@33: case function_time_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_SINT etisserant@33: */ etisserant@33: case function_time_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_LINT etisserant@33: */ etisserant@33: case function_time_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_DINT etisserant@33: */ etisserant@33: case function_time_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_DATE etisserant@33: */ etisserant@33: case function_time_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_DWORD etisserant@33: */ etisserant@33: case function_time_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_DT etisserant@33: */ etisserant@33: case function_time_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_TOD etisserant@33: */ etisserant@33: case function_time_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_UDINT etisserant@33: */ etisserant@33: case function_time_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_WORD etisserant@33: */ etisserant@33: case function_time_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_WSTRING etisserant@33: */ etisserant@33: case function_time_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_STRING etisserant@33: */ etisserant@33: case function_time_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_LWORD etisserant@33: */ etisserant@33: case function_time_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_UINT etisserant@33: */ etisserant@33: case function_time_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_LREAL etisserant@33: */ etisserant@33: case function_time_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_BYTE etisserant@33: */ etisserant@33: case function_time_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_USINT etisserant@33: */ etisserant@33: case function_time_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_ULINT etisserant@33: */ etisserant@33: case function_time_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_BOOL etisserant@33: */ etisserant@33: case function_time_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_TIME etisserant@33: */ etisserant@33: case function_time_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TIME_TO_INT etisserant@33: */ etisserant@33: case function_time_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_time_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_REAL etisserant@33: */ etisserant@33: case function_int_to_real : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_real*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_SINT etisserant@33: */ etisserant@33: case function_int_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_LINT etisserant@33: */ etisserant@33: case function_int_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_DINT etisserant@33: */ etisserant@33: case function_int_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_DATE etisserant@33: */ etisserant@33: case function_int_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_DWORD etisserant@33: */ etisserant@33: case function_int_to_dword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_dword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_DT etisserant@33: */ etisserant@33: case function_int_to_dt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_dt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_TOD etisserant@33: */ etisserant@33: case function_int_to_tod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_tod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_UDINT etisserant@33: */ etisserant@33: case function_int_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_WORD etisserant@33: */ etisserant@33: case function_int_to_word : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_word*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_WSTRING etisserant@33: */ etisserant@33: case function_int_to_wstring : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::wstring_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_wstring*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_STRING etisserant@33: */ etisserant@33: case function_int_to_string : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_string*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_LWORD etisserant@33: */ etisserant@33: case function_int_to_lword : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_lword*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_UINT etisserant@33: */ etisserant@33: case function_int_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_LREAL etisserant@33: */ etisserant@33: case function_int_to_lreal : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_lreal*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_BYTE etisserant@33: */ etisserant@33: case function_int_to_byte : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_byte*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_USINT etisserant@33: */ etisserant@33: case function_int_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_ULINT etisserant@33: */ etisserant@33: case function_int_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_BOOL etisserant@33: */ etisserant@33: case function_int_to_bool : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_bool*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_TIME etisserant@33: */ etisserant@33: case function_int_to_time : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_time*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_INT etisserant@33: */ etisserant@33: case function_int_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TRUNC etisserant@33: */ etisserant@33: case function_trunc : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_trunc*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_SINT etisserant@33: */ etisserant@33: case function_bcd_to_sint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_sint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_LINT etisserant@33: */ etisserant@33: case function_bcd_to_lint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_lint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_DINT etisserant@33: */ etisserant@33: case function_bcd_to_dint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_dint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_UDINT etisserant@33: */ etisserant@33: case function_bcd_to_udint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_udint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_UINT etisserant@33: */ etisserant@33: case function_bcd_to_uint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_uint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_USINT etisserant@33: */ etisserant@33: case function_bcd_to_usint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_usint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_ULINT etisserant@33: */ etisserant@33: case function_bcd_to_ulint : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_ulint*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *BCD_TO_INT etisserant@33: */ etisserant@33: case function_bcd_to_int : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_bcd_to_int*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SINT_TO_BCD etisserant@33: */ etisserant@33: case function_sint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(sint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LINT_TO_BCD etisserant@33: */ etisserant@33: case function_lint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(lint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DINT_TO_BCD etisserant@33: */ etisserant@33: case function_dint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_dint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UDINT_TO_BCD etisserant@33: */ etisserant@33: case function_udint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(udint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_udint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *UINT_TO_BCD etisserant@33: */ etisserant@33: case function_uint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_uint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *USINT_TO_BCD etisserant@33: */ etisserant@33: case function_usint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(usint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_usint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ULINT_TO_BCD etisserant@33: */ etisserant@33: case function_ulint_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(ulint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ulint_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INT_TO_BCD etisserant@33: */ etisserant@33: case function_int_to_bcd : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(int_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_int_to_bcd*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_AND_TIME_TO_TIME_OF_DAY etisserant@33: */ etisserant@33: case function_date_and_time_to_time_of_day : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_and_time_to_time_of_day*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DATE_AND_TIME_TO_DATE etisserant@33: */ etisserant@33: case function_date_and_time_to_date : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_date_and_time_to_date*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ABS etisserant@33: */ etisserant@33: case function_abs : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_abs*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SQRT etisserant@33: */ etisserant@33: case function_sqrt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sqrt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LN etisserant@33: */ etisserant@33: case function_ln : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ln*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LOG etisserant@33: */ etisserant@33: case function_log : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_log*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *EXP etisserant@33: */ etisserant@33: case function_exp : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_exp*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SIN etisserant@33: */ etisserant@33: case function_sin : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sin*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *COS etisserant@33: */ etisserant@33: case function_cos : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_cos*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *TAN etisserant@33: */ etisserant@33: case function_tan : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_tan*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ASIN etisserant@33: */ etisserant@33: case function_asin : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_asin*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ACOS etisserant@33: */ etisserant@33: case function_acos : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_acos*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ATAN etisserant@33: */ etisserant@33: case function_atan : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_real_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_atan*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ADD etisserant@33: */ etisserant@33: case function_add : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_add*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MUL etisserant@33: */ etisserant@33: case function_mul : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_mul*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SUB etisserant@33: */ etisserant@33: case function_sub : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(dt_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sub*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DIV etisserant@33: */ etisserant@33: case function_div : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(time_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_div*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MOD etisserant@33: */ etisserant@33: case function_mod : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_mod*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *EXPT etisserant@33: */ etisserant@33: case function_expt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_expt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MOVE etisserant@33: */ etisserant@33: case function_move : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_num_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_move*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SHL etisserant@33: */ etisserant@33: case function_shl : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("N"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (N_param_value == NULL) etisserant@33: N_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_shl*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SHR etisserant@33: */ etisserant@33: case function_shr : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("N"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (N_param_value == NULL) etisserant@33: N_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_shr*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ROR etisserant@33: */ etisserant@33: case function_ror : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("N"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (N_param_value == NULL) etisserant@33: N_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ror*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *ROL etisserant@33: */ etisserant@33: case function_rol : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("N"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (N_param_value == NULL) etisserant@33: N_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_rol*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *AND etisserant@33: */ etisserant@33: case function_and : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_and*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *OR etisserant@33: */ etisserant@33: case function_or : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_or*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *XOR etisserant@33: */ etisserant@33: case function_xor : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN1_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN2_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_xor*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *NOT etisserant@33: */ etisserant@33: case function_not : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_binary_type(IN_param_value)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_not*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *SEL etisserant@33: */ etisserant@33: case function_sel : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("G"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *G_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (G_param_value == NULL) etisserant@33: G_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(bool_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN0"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN0_param_value == NULL) etisserant@33: IN0_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_sel*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MAX etisserant@33: */ etisserant@33: case function_max : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_max*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MIN etisserant@33: */ etisserant@33: case function_min : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_min*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LIMIT etisserant@33: */ etisserant@33: case function_limit : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("MN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *MN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (MN_param_value == NULL) etisserant@33: MN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("MX"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (MX_param_value == NULL) etisserant@33: MX_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = IN_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_limit*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MUX etisserant@33: */ etisserant@33: case function_mux : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("K"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *K_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (K_param_value == NULL) etisserant@33: K_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ; etisserant@33: etisserant@33: if(search_expression_type->is_integer_type(K_param_value)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN0"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN0_param_value == NULL) etisserant@33: IN0_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = last_type_symbol; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_mux*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *GT etisserant@33: */ etisserant@33: case function_gt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_gt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *GE etisserant@33: */ etisserant@33: case function_ge : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ge*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *EQ etisserant@33: */ etisserant@33: case function_eq : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_eq*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LT etisserant@33: */ etisserant@33: case function_lt : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_lt*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LE etisserant@33: */ etisserant@33: case function_le : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_le*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *NE etisserant@33: */ etisserant@33: case function_ne : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_ne*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LEN etisserant@33: */ etisserant@33: case function_len : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_len*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *LEFT etisserant@33: */ etisserant@33: case function_left : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("L"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (L_param_value == NULL) etisserant@33: L_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_left*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *RIGHT etisserant@33: */ etisserant@33: case function_right : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("L"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (L_param_value == NULL) etisserant@33: L_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_right*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *MID etisserant@33: */ etisserant@33: case function_mid : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("L"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (L_param_value == NULL) etisserant@33: L_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("P"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (P_param_value == NULL) etisserant@33: P_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_mid*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *CONCAT etisserant@33: */ etisserant@33: case function_concat : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(date_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(tod_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_concat*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *INSERT etisserant@33: */ etisserant@33: case function_insert : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("P"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (P_param_value == NULL) etisserant@33: P_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_insert*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *DELETE etisserant@33: */ etisserant@33: case function_delete : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN_param_value == NULL) etisserant@33: IN_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("L"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (L_param_value == NULL) etisserant@33: L_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("P"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (P_param_value == NULL) etisserant@33: P_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_delete*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *REPLACE etisserant@33: */ etisserant@33: case function_replace : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("L"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (L_param_value == NULL) etisserant@33: L_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("P"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (P_param_value == NULL) etisserant@33: P_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(uint_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_replace*/ etisserant@33: break; etisserant@33: etisserant@33: /**** etisserant@33: *FIND etisserant@33: */ etisserant@33: case function_find : etisserant@33: { etisserant@33: symbol_c *last_type_symbol = NULL; etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN1"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN1_param_value == NULL) etisserant@33: IN1_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: { etisserant@33: identifier_c param_name("IN2"); etisserant@33: /* Get the value from a foo( = ) style call */ etisserant@33: symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); etisserant@33: etisserant@33: /* Get the value from a foo() style call */ etisserant@33: if (IN2_param_value == NULL) etisserant@33: IN2_param_value = function_call_param_iterator.next(); etisserant@33: symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); etisserant@33: last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; etisserant@33: etisserant@33: if (typeid(*last_type_symbol) == typeid(string_type_name_c)) etisserant@33: { etisserant@33: etisserant@33: symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; etisserant@33: return return_type_symbol; etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: } etisserant@33: etisserant@33: ERROR; etisserant@33: } etisserant@33: etisserant@33: }/*function_find*/ etisserant@33: break; etisserant@33: etisserant@33: case function_none : etisserant@33: ERROR; etisserant@33: } etisserant@33: return NULL;