diff -r b826f13c260e -r 7a11f9e9e703 absyntax_utils/search_type_code.c
--- a/absyntax_utils/search_type_code.c Wed Sep 07 19:28:10 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29800 +0,0 @@
-/*
- * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
- *
- * See COPYING and COPYING.LESSER files for copyright details.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- */
-
-/****
- * IEC 61131-3 standard function library
- * generated code, do not edit by hand
- */
-
-
-
-void *search_expression_type_c::compute_standard_function_default(function_invocation_c *st_symbol = NULL, il_formal_funct_call_c *il_symbol = NULL) {
- function_type_t current_function_type;
- function_call_param_iterator_c *tmp_function_call_param_iterator;
- if (st_symbol != NULL && il_symbol == NULL) {
- current_function_type = get_function_type((identifier_c *)st_symbol->function_name);
- tmp_function_call_param_iterator = new function_call_param_iterator_c(st_symbol);
- }
- else if (st_symbol == NULL && il_symbol != NULL) {
- current_function_type = get_function_type((identifier_c *)il_symbol->function_name);
- tmp_function_call_param_iterator = new function_call_param_iterator_c(il_symbol);
- }
- else
- ERROR;
- function_call_param_iterator_c function_call_param_iterator(*tmp_function_call_param_iterator);
- search_expression_type_c* search_expression_type = this;
-
- switch(current_function_type){
-
-/****
- *REAL_TO_SINT
- */
- case function_real_to_sint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_sint*/
- break;
-
-/****
- *REAL_TO_LINT
- */
- case function_real_to_lint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_lint*/
- break;
-
-/****
- *REAL_TO_DINT
- */
- case function_real_to_dint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_dint*/
- break;
-
-/****
- *REAL_TO_DATE
- */
- case function_real_to_date :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_date*/
- break;
-
-/****
- *REAL_TO_DWORD
- */
- case function_real_to_dword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_dword*/
- break;
-
-/****
- *REAL_TO_DT
- */
- case function_real_to_dt :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_dt*/
- break;
-
-/****
- *REAL_TO_TOD
- */
- case function_real_to_tod :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_tod*/
- break;
-
-/****
- *REAL_TO_UDINT
- */
- case function_real_to_udint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_udint*/
- break;
-
-/****
- *REAL_TO_WORD
- */
- case function_real_to_word :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_word*/
- break;
-
-/****
- *REAL_TO_STRING
- */
- case function_real_to_string :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_string*/
- break;
-
-/****
- *REAL_TO_LWORD
- */
- case function_real_to_lword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_lword*/
- break;
-
-/****
- *REAL_TO_UINT
- */
- case function_real_to_uint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_uint*/
- break;
-
-/****
- *REAL_TO_LREAL
- */
- case function_real_to_lreal :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_lreal*/
- break;
-
-/****
- *REAL_TO_BYTE
- */
- case function_real_to_byte :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_byte*/
- break;
-
-/****
- *REAL_TO_USINT
- */
- case function_real_to_usint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_usint*/
- break;
-
-/****
- *REAL_TO_ULINT
- */
- case function_real_to_ulint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_ulint*/
- break;
-
-/****
- *REAL_TO_BOOL
- */
- case function_real_to_bool :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_bool*/
- break;
-
-/****
- *REAL_TO_TIME
- */
- case function_real_to_time :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_time*/
- break;
-
-/****
- *REAL_TO_INT
- */
- case function_real_to_int :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::real_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_real_to_int*/
- break;
-
-/****
- *SINT_TO_REAL
- */
- case function_sint_to_real :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_real*/
- break;
-
-/****
- *SINT_TO_LINT
- */
- case function_sint_to_lint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_lint*/
- break;
-
-/****
- *SINT_TO_DINT
- */
- case function_sint_to_dint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_dint*/
- break;
-
-/****
- *SINT_TO_DATE
- */
- case function_sint_to_date :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_date*/
- break;
-
-/****
- *SINT_TO_DWORD
- */
- case function_sint_to_dword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_dword*/
- break;
-
-/****
- *SINT_TO_DT
- */
- case function_sint_to_dt :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_dt*/
- break;
-
-/****
- *SINT_TO_TOD
- */
- case function_sint_to_tod :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_tod*/
- break;
-
-/****
- *SINT_TO_UDINT
- */
- case function_sint_to_udint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_udint*/
- break;
-
-/****
- *SINT_TO_WORD
- */
- case function_sint_to_word :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_word*/
- break;
-
-/****
- *SINT_TO_STRING
- */
- case function_sint_to_string :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_string*/
- break;
-
-/****
- *SINT_TO_LWORD
- */
- case function_sint_to_lword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_lword*/
- break;
-
-/****
- *SINT_TO_UINT
- */
- case function_sint_to_uint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_uint*/
- break;
-
-/****
- *SINT_TO_LREAL
- */
- case function_sint_to_lreal :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_lreal*/
- break;
-
-/****
- *SINT_TO_BYTE
- */
- case function_sint_to_byte :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_byte*/
- break;
-
-/****
- *SINT_TO_USINT
- */
- case function_sint_to_usint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_usint*/
- break;
-
-/****
- *SINT_TO_ULINT
- */
- case function_sint_to_ulint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_ulint*/
- break;
-
-/****
- *SINT_TO_BOOL
- */
- case function_sint_to_bool :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_bool*/
- break;
-
-/****
- *SINT_TO_TIME
- */
- case function_sint_to_time :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_time*/
- break;
-
-/****
- *SINT_TO_INT
- */
- case function_sint_to_int :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::sint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_sint_to_int*/
- break;
-
-/****
- *LINT_TO_REAL
- */
- case function_lint_to_real :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_real*/
- break;
-
-/****
- *LINT_TO_SINT
- */
- case function_lint_to_sint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_sint*/
- break;
-
-/****
- *LINT_TO_DINT
- */
- case function_lint_to_dint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_dint*/
- break;
-
-/****
- *LINT_TO_DATE
- */
- case function_lint_to_date :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_date*/
- break;
-
-/****
- *LINT_TO_DWORD
- */
- case function_lint_to_dword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_dword*/
- break;
-
-/****
- *LINT_TO_DT
- */
- case function_lint_to_dt :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_dt*/
- break;
-
-/****
- *LINT_TO_TOD
- */
- case function_lint_to_tod :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_tod*/
- break;
-
-/****
- *LINT_TO_UDINT
- */
- case function_lint_to_udint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_udint*/
- break;
-
-/****
- *LINT_TO_WORD
- */
- case function_lint_to_word :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_word*/
- break;
-
-/****
- *LINT_TO_STRING
- */
- case function_lint_to_string :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_string*/
- break;
-
-/****
- *LINT_TO_LWORD
- */
- case function_lint_to_lword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_lword*/
- break;
-
-/****
- *LINT_TO_UINT
- */
- case function_lint_to_uint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_uint*/
- break;
-
-/****
- *LINT_TO_LREAL
- */
- case function_lint_to_lreal :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_lreal*/
- break;
-
-/****
- *LINT_TO_BYTE
- */
- case function_lint_to_byte :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_byte*/
- break;
-
-/****
- *LINT_TO_USINT
- */
- case function_lint_to_usint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_usint*/
- break;
-
-/****
- *LINT_TO_ULINT
- */
- case function_lint_to_ulint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_ulint*/
- break;
-
-/****
- *LINT_TO_BOOL
- */
- case function_lint_to_bool :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_bool*/
- break;
-
-/****
- *LINT_TO_TIME
- */
- case function_lint_to_time :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_time*/
- break;
-
-/****
- *LINT_TO_INT
- */
- case function_lint_to_int :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::lint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_lint_to_int*/
- break;
-
-/****
- *DINT_TO_REAL
- */
- case function_dint_to_real :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_real*/
- break;
-
-/****
- *DINT_TO_SINT
- */
- case function_dint_to_sint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_sint*/
- break;
-
-/****
- *DINT_TO_LINT
- */
- case function_dint_to_lint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_lint*/
- break;
-
-/****
- *DINT_TO_DATE
- */
- case function_dint_to_date :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_date*/
- break;
-
-/****
- *DINT_TO_DWORD
- */
- case function_dint_to_dword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_dword*/
- break;
-
-/****
- *DINT_TO_DT
- */
- case function_dint_to_dt :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_dt*/
- break;
-
-/****
- *DINT_TO_TOD
- */
- case function_dint_to_tod :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_tod*/
- break;
-
-/****
- *DINT_TO_UDINT
- */
- case function_dint_to_udint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_udint*/
- break;
-
-/****
- *DINT_TO_WORD
- */
- case function_dint_to_word :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_word*/
- break;
-
-/****
- *DINT_TO_STRING
- */
- case function_dint_to_string :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_string*/
- break;
-
-/****
- *DINT_TO_LWORD
- */
- case function_dint_to_lword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_lword*/
- break;
-
-/****
- *DINT_TO_UINT
- */
- case function_dint_to_uint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_uint*/
- break;
-
-/****
- *DINT_TO_LREAL
- */
- case function_dint_to_lreal :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_lreal*/
- break;
-
-/****
- *DINT_TO_BYTE
- */
- case function_dint_to_byte :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_byte*/
- break;
-
-/****
- *DINT_TO_USINT
- */
- case function_dint_to_usint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_usint*/
- break;
-
-/****
- *DINT_TO_ULINT
- */
- case function_dint_to_ulint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_ulint*/
- break;
-
-/****
- *DINT_TO_BOOL
- */
- case function_dint_to_bool :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_bool*/
- break;
-
-/****
- *DINT_TO_TIME
- */
- case function_dint_to_time :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_time*/
- break;
-
-/****
- *DINT_TO_INT
- */
- case function_dint_to_int :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::dint_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_dint_to_int*/
- break;
-
-/****
- *DATE_TO_REAL
- */
- case function_date_to_real :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_real*/
- break;
-
-/****
- *DATE_TO_SINT
- */
- case function_date_to_sint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_sint*/
- break;
-
-/****
- *DATE_TO_LINT
- */
- case function_date_to_lint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_lint*/
- break;
-
-/****
- *DATE_TO_DINT
- */
- case function_date_to_dint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_dint*/
- break;
-
-/****
- *DATE_TO_DWORD
- */
- case function_date_to_dword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_dword*/
- break;
-
-/****
- *DATE_TO_UDINT
- */
- case function_date_to_udint :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_udint*/
- break;
-
-/****
- *DATE_TO_WORD
- */
- case function_date_to_word :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_word*/
- break;
-
-/****
- *DATE_TO_STRING
- */
- case function_date_to_string :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo() style call */
- if (IN_param_value == NULL)
- IN_param_value = function_call_param_iterator.next_nf();
- if (IN_param_value != NULL) {
- IN_type_symbol = search_expression_type->get_type(IN_param_value);
- last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
- }
-
- if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
- {
-
- symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
- return return_type_symbol;
-
- }
-
-
- ERROR;
- }
-
- }/*function_date_to_string*/
- break;
-
-/****
- *DATE_TO_LWORD
- */
- case function_date_to_lword :
- {
- symbol_c *last_type_symbol = &search_constant_type_c::date_type_name;
-
- {
- symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
- /* Get the value from a foo( = ) style call */
- symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
- symbol_c *IN_type_symbol = NULL;
-
- /* Get the value from a foo(