absyntax_utils/search_type_code.c
changeset 279 c0453b7f99df
parent 265 4d222f46f8cc
child 314 41d4ac0b4821
equal deleted inserted replaced
278:050d31dd7c74 279:c0453b7f99df
     1 /*
     1 /*
     2  *  matiec - a compiler for the programming languages defined in IEC 61131-3
     2  * Copyright (C) 2007-2011: Edouard TISSERANT and Laurent BESSARD
     3  *
     3  *
     4  *  Copyright (C) 2008 Edouard TISSERANT
     4  * See COPYING and COPYING.LESSER files for copyright details.
     5  *
     5  *
     6  *  This program is free software: you can redistribute it and/or modify
     6  * This program is free software: you can redistribute it and/or modify
     7  *  it under the terms of the GNU General Public License as published by
     7  * it under the terms of the GNU General Public License as published by
     8  *  the Free Software Foundation, either version 3 of the License, or
     8  * the Free Software Foundation, either version 3 of the License, or
     9  *  (at your option) any later version.
     9  * (at your option) any later version.
    10  *
    10  *
    11  *  This program is distributed in the hope that it will be useful,
    11  * This program is distributed in the hope that it will be useful,
    12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  *  GNU General Public License for more details.
    14  * GNU General Public License for more details.
    15  *
    15  *
    16  *  You should have received a copy of the GNU General Public License
    16  * You should have received a copy of the GNU General Public License
    17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    18  *
       
    19  *
       
    20  * This code is made available on the understanding that it will not be
       
    21  * used in safety-critical situations without a full and competent review.
       
    22  */
       
    23 
       
    24 /*
       
    25  * An IEC 61131-3 compiler.
       
    26  *
       
    27  * Based on the
       
    28  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
       
    29  *
    18  *
    30  */
    19  */
    31 
    20 
    32 /****
    21 /****
    33  * IEC 61131-3 standard function library
    22  * IEC 61131-3 standard function library
 14101         
 14090         
 14102     }/*function_add*/
 14091     }/*function_add*/
 14103     break;
 14092     break;
 14104 
 14093 
 14105 /****
 14094 /****
 14106  *MUL
 14095  *ADD_TIME
 14107  */
 14096  */
 14108     case function_mul :
 14097     case function_add_time :
 14109     {
 14098     {
 14110         symbol_c *last_type_symbol = NULL;
 14099         symbol_c *last_type_symbol = NULL;
 14111 
 14100 
 14112         {
 14101         {
 14113             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14102             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14121             if (IN1_param_value != NULL) {
 14110             if (IN1_param_value != NULL) {
 14122               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14111               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14123               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14112               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14124             }
 14113             }
 14125             
 14114             
 14126             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14115             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14127             {
 14116             {
 14128         
 14117         
 14129                 {
 14118                 {
 14130                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14119                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14131                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14120                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14138                     if (IN2_param_value != NULL) {
 14127                     if (IN2_param_value != NULL) {
 14139                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14128                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14140                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14129                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14141                     }
 14130                     }
 14142                     
 14131                     
 14143                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14132                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14144                     {
 14133                     {
 14145                 
 14134                 
 14146                         symbol_c * return_type_symbol = last_type_symbol;
 14135                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14147                         return return_type_symbol;
 14136                         return return_type_symbol;
 14148                         
 14137                         
 14149                     }
 14138                     }
 14150                     
 14139                     
 14151                     
 14140                     
 14152                     ERROR;
 14141                     ERROR;
 14153                 }
 14142                 }
 14154                 
 14143                 
 14155             }
 14144             }
 14156             
 14145             
 14157             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14146             
       
 14147             ERROR;
       
 14148         }
       
 14149         
       
 14150     }/*function_add_time*/
       
 14151     break;
       
 14152 
       
 14153 /****
       
 14154  *ADD_TOD_TIME
       
 14155  */
       
 14156     case function_add_tod_time :
       
 14157     {
       
 14158         symbol_c *last_type_symbol = NULL;
       
 14159 
       
 14160         {
       
 14161             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14162             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14163             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14164             symbol_c *IN1_type_symbol = NULL;
       
 14165             
       
 14166             /* Get the value from a foo(<param_value>) style call */
       
 14167             if (IN1_param_value == NULL)
       
 14168               IN1_param_value = function_call_param_iterator.next_nf();
       
 14169             if (IN1_param_value != NULL) {
       
 14170               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14171               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14172             }
       
 14173             
       
 14174             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14158             {
 14175             {
 14159         
 14176         
 14160                 {
 14177                 {
 14161                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14178                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14162                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14179                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14169                     if (IN2_param_value != NULL) {
 14186                     if (IN2_param_value != NULL) {
 14170                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14187                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14171                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14188                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14172                     }
 14189                     }
 14173                     
 14190                     
 14174                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14191                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14175                     {
 14192                     {
 14176                 
 14193                 
 14177                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14194                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14178                         return return_type_symbol;
 14195                         return return_type_symbol;
 14179                         
 14196                         
 14180                     }
 14197                     }
 14181                     
 14198                     
 14182                     
 14199                     
 14187             
 14204             
 14188             
 14205             
 14189             ERROR;
 14206             ERROR;
 14190         }
 14207         }
 14191         
 14208         
 14192     }/*function_mul*/
 14209     }/*function_add_tod_time*/
 14193     break;
 14210     break;
 14194 
 14211 
 14195 /****
 14212 /****
 14196  *SUB
 14213  *ADD_DT_TIME
 14197  */
 14214  */
 14198     case function_sub :
 14215     case function_add_dt_time :
 14199     {
 14216     {
 14200         symbol_c *last_type_symbol = NULL;
 14217         symbol_c *last_type_symbol = NULL;
 14201 
 14218 
 14202         {
 14219         {
 14203             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14220             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14211             if (IN1_param_value != NULL) {
 14228             if (IN1_param_value != NULL) {
 14212               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14229               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14213               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14230               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14214             }
 14231             }
 14215             
 14232             
 14216             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14233             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14217             {
 14234             {
 14218         
 14235         
 14219                 {
 14236                 {
 14220                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14237                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14221                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14238                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14228                     if (IN2_param_value != NULL) {
 14245                     if (IN2_param_value != NULL) {
 14229                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14246                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14230                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14247                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14231                     }
 14248                     }
 14232                     
 14249                     
 14233                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14250                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14234                     {
 14251                     {
 14235                 
 14252                 
 14236                         symbol_c * return_type_symbol = last_type_symbol;
 14253                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14237                         return return_type_symbol;
 14254                         return return_type_symbol;
 14238                         
 14255                         
 14239                     }
 14256                     }
 14240                     
 14257                     
 14241                     
 14258                     
 14242                     ERROR;
 14259                     ERROR;
 14243                 }
 14260                 }
 14244                 
 14261                 
 14245             }
 14262             }
 14246             
 14263             
 14247             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14264             
       
 14265             ERROR;
       
 14266         }
       
 14267         
       
 14268     }/*function_add_dt_time*/
       
 14269     break;
       
 14270 
       
 14271 /****
       
 14272  *MUL
       
 14273  */
       
 14274     case function_mul :
       
 14275     {
       
 14276         symbol_c *last_type_symbol = NULL;
       
 14277 
       
 14278         {
       
 14279             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14281             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14282             symbol_c *IN1_type_symbol = NULL;
       
 14283             
       
 14284             /* Get the value from a foo(<param_value>) style call */
       
 14285             if (IN1_param_value == NULL)
       
 14286               IN1_param_value = function_call_param_iterator.next_nf();
       
 14287             if (IN1_param_value != NULL) {
       
 14288               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14289               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14290             }
       
 14291             
       
 14292             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14248             {
 14293             {
 14249         
 14294         
 14250                 {
 14295                 {
 14251                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14296                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14252                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14297                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14259                     if (IN2_param_value != NULL) {
 14304                     if (IN2_param_value != NULL) {
 14260                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14305                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14261                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14306                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14262                     }
 14307                     }
 14263                     
 14308                     
 14264                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14309                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14265                     {
 14310                     {
 14266                 
 14311                 
 14267                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14312                         symbol_c * return_type_symbol = last_type_symbol;
 14268                         return return_type_symbol;
 14313                         return return_type_symbol;
 14269                         
 14314                         
 14270                     }
 14315                     }
 14271                     
 14316                     
 14272                     
 14317                     
 14273                     ERROR;
 14318                     ERROR;
 14274                 }
 14319                 }
 14275                 
 14320                 
 14276             }
 14321             }
 14277             
 14322             
 14278             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14323             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14279             {
 14324             {
 14280         
 14325         
 14281                 {
 14326                 {
 14282                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14327                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14283                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14328                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14290                     if (IN2_param_value != NULL) {
 14335                     if (IN2_param_value != NULL) {
 14291                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14336                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14292                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14337                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14293                     }
 14338                     }
 14294                     
 14339                     
 14295                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14340                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14296                     {
 14341                     {
 14297                 
 14342                 
 14298                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14343                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14299                         return return_type_symbol;
 14344                         return return_type_symbol;
 14300                         
 14345                         
 14301                     }
 14346                     }
 14302                     
 14347                     
 14303                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14304                     {
       
 14305                 
       
 14306                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14307                         return return_type_symbol;
       
 14308                         
       
 14309                     }
       
 14310                     
       
 14311                     
 14348                     
 14312                     ERROR;
 14349                     ERROR;
 14313                 }
 14350                 }
 14314                 
 14351                 
 14315             }
 14352             }
 14316             
 14353             
 14317             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14354             
       
 14355             ERROR;
       
 14356         }
       
 14357         
       
 14358     }/*function_mul*/
       
 14359     break;
       
 14360 
       
 14361 /****
       
 14362  *MULTIME
       
 14363  */
       
 14364     case function_multime :
       
 14365     {
       
 14366         symbol_c *last_type_symbol = NULL;
       
 14367 
       
 14368         {
       
 14369             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14370             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14371             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14372             symbol_c *IN1_type_symbol = NULL;
       
 14373             
       
 14374             /* Get the value from a foo(<param_value>) style call */
       
 14375             if (IN1_param_value == NULL)
       
 14376               IN1_param_value = function_call_param_iterator.next_nf();
       
 14377             if (IN1_param_value != NULL) {
       
 14378               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14379               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14380             }
       
 14381             
       
 14382             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14318             {
 14383             {
 14319         
 14384         
 14320                 {
 14385                 {
 14321                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14386                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14322                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14387                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14329                     if (IN2_param_value != NULL) {
 14394                     if (IN2_param_value != NULL) {
 14330                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14395                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14331                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14396                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14332                     }
 14397                     }
 14333                     
 14398                     
 14334                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14399                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14335                     {
 14400                     {
 14336                 
 14401                 
 14337                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14402                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14338                         return return_type_symbol;
 14403                         return return_type_symbol;
 14339                         
 14404                         
 14340                     }
 14405                     }
 14341                     
 14406                     
 14342                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14343                     {
       
 14344                 
       
 14345                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14346                         return return_type_symbol;
       
 14347                         
       
 14348                     }
       
 14349                     
       
 14350                     
 14407                     
 14351                     ERROR;
 14408                     ERROR;
 14352                 }
 14409                 }
 14353                 
 14410                 
 14354             }
 14411             }
 14355             
 14412             
 14356             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14413             
       
 14414             ERROR;
       
 14415         }
       
 14416         
       
 14417     }/*function_multime*/
       
 14418     break;
       
 14419 
       
 14420 /****
       
 14421  *SUB
       
 14422  */
       
 14423     case function_sub :
       
 14424     {
       
 14425         symbol_c *last_type_symbol = NULL;
       
 14426 
       
 14427         {
       
 14428             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14429             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14430             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14431             symbol_c *IN1_type_symbol = NULL;
       
 14432             
       
 14433             /* Get the value from a foo(<param_value>) style call */
       
 14434             if (IN1_param_value == NULL)
       
 14435               IN1_param_value = function_call_param_iterator.next_nf();
       
 14436             if (IN1_param_value != NULL) {
       
 14437               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14438               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14439             }
       
 14440             
       
 14441             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14357             {
 14442             {
 14358         
 14443         
 14359                 {
 14444                 {
 14360                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14445                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14361                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14446                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14368                     if (IN2_param_value != NULL) {
 14453                     if (IN2_param_value != NULL) {
 14369                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14454                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14370                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14455                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14371                     }
 14456                     }
 14372                     
 14457                     
 14373                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14458                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14374                     {
 14459                     {
 14375                 
 14460                 
 14376                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14461                         symbol_c * return_type_symbol = last_type_symbol;
 14377                         return return_type_symbol;
 14462                         return return_type_symbol;
 14378                         
 14463                         
 14379                     }
 14464                     }
 14380                     
 14465                     
 14381                     
 14466                     
 14382                     ERROR;
 14467                     ERROR;
 14383                 }
 14468                 }
 14384                 
 14469                 
 14385             }
 14470             }
 14386             
 14471             
 14387             
 14472             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14388             ERROR;
       
 14389         }
       
 14390         
       
 14391     }/*function_sub*/
       
 14392     break;
       
 14393 
       
 14394 /****
       
 14395  *DIV
       
 14396  */
       
 14397     case function_div :
       
 14398     {
       
 14399         symbol_c *last_type_symbol = NULL;
       
 14400 
       
 14401         {
       
 14402             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14403             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14404             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14405             symbol_c *IN1_type_symbol = NULL;
       
 14406             
       
 14407             /* Get the value from a foo(<param_value>) style call */
       
 14408             if (IN1_param_value == NULL)
       
 14409               IN1_param_value = function_call_param_iterator.next_nf();
       
 14410             if (IN1_param_value != NULL) {
       
 14411               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14412               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14413             }
       
 14414             
       
 14415             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14416             {
 14473             {
 14417         
 14474         
 14418                 {
 14475                 {
 14419                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14476                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14420                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14477                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14427                     if (IN2_param_value != NULL) {
 14484                     if (IN2_param_value != NULL) {
 14428                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14485                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14429                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14486                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14430                     }
 14487                     }
 14431                     
 14488                     
 14432                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14489                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14433                     {
 14490                     {
 14434                 
 14491                 
 14435                         symbol_c * return_type_symbol = last_type_symbol;
 14492                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14436                         return return_type_symbol;
 14493                         return return_type_symbol;
 14437                         
 14494                         
 14438                     }
 14495                     }
 14439                     
 14496                     
 14440                     
 14497                     
 14441                     ERROR;
 14498                     ERROR;
 14442                 }
 14499                 }
 14443                 
 14500                 
 14444             }
 14501             }
 14445             
 14502             
 14446             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14503             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14447             {
 14504             {
 14448         
 14505         
 14449                 {
 14506                 {
 14450                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14507                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14451                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14508                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14458                     if (IN2_param_value != NULL) {
 14515                     if (IN2_param_value != NULL) {
 14459                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14516                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14460                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14517                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14461                     }
 14518                     }
 14462                     
 14519                     
 14463                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14520                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14464                     {
 14521                     {
 14465                 
 14522                 
 14466                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14523                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14467                         return return_type_symbol;
 14524                         return return_type_symbol;
 14468                         
 14525                         
 14469                     }
 14526                     }
 14470                     
 14527                     
       
 14528                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14529                     {
       
 14530                 
       
 14531                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14532                         return return_type_symbol;
       
 14533                         
       
 14534                     }
       
 14535                     
 14471                     
 14536                     
 14472                     ERROR;
 14537                     ERROR;
 14473                 }
 14538                 }
 14474                 
 14539                 
 14475             }
 14540             }
 14476             
 14541             
       
 14542             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14543             {
       
 14544         
       
 14545                 {
       
 14546                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14547                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14548                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14549                     symbol_c *IN2_type_symbol = NULL;
       
 14550                     
       
 14551                     /* Get the value from a foo(<param_value>) style call */
       
 14552                     if (IN2_param_value == NULL)
       
 14553                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14554                     if (IN2_param_value != NULL) {
       
 14555                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14556                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14557                     }
       
 14558                     
       
 14559                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14560                     {
       
 14561                 
       
 14562                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14563                         return return_type_symbol;
       
 14564                         
       
 14565                     }
       
 14566                     
       
 14567                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14568                     {
       
 14569                 
       
 14570                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14571                         return return_type_symbol;
       
 14572                         
       
 14573                     }
       
 14574                     
       
 14575                     
       
 14576                     ERROR;
       
 14577                 }
       
 14578                 
       
 14579             }
       
 14580             
       
 14581             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14582             {
       
 14583         
       
 14584                 {
       
 14585                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14586                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14587                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14588                     symbol_c *IN2_type_symbol = NULL;
       
 14589                     
       
 14590                     /* Get the value from a foo(<param_value>) style call */
       
 14591                     if (IN2_param_value == NULL)
       
 14592                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14593                     if (IN2_param_value != NULL) {
       
 14594                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14595                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14596                     }
       
 14597                     
       
 14598                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14599                     {
       
 14600                 
       
 14601                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14602                         return return_type_symbol;
       
 14603                         
       
 14604                     }
       
 14605                     
       
 14606                     
       
 14607                     ERROR;
       
 14608                 }
       
 14609                 
       
 14610             }
       
 14611             
       
 14612             
       
 14613             ERROR;
       
 14614         }
       
 14615         
       
 14616     }/*function_sub*/
       
 14617     break;
       
 14618 
       
 14619 /****
       
 14620  *SUB_TIME
       
 14621  */
       
 14622     case function_sub_time :
       
 14623     {
       
 14624         symbol_c *last_type_symbol = NULL;
       
 14625 
       
 14626         {
       
 14627             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14628             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14629             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14630             symbol_c *IN1_type_symbol = NULL;
       
 14631             
       
 14632             /* Get the value from a foo(<param_value>) style call */
       
 14633             if (IN1_param_value == NULL)
       
 14634               IN1_param_value = function_call_param_iterator.next_nf();
       
 14635             if (IN1_param_value != NULL) {
       
 14636               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14637               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14638             }
       
 14639             
       
 14640             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14641             {
       
 14642         
       
 14643                 {
       
 14644                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14645                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14646                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14647                     symbol_c *IN2_type_symbol = NULL;
       
 14648                     
       
 14649                     /* Get the value from a foo(<param_value>) style call */
       
 14650                     if (IN2_param_value == NULL)
       
 14651                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14652                     if (IN2_param_value != NULL) {
       
 14653                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14654                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14655                     }
       
 14656                     
       
 14657                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14658                     {
       
 14659                 
       
 14660                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14661                         return return_type_symbol;
       
 14662                         
       
 14663                     }
       
 14664                     
       
 14665                     
       
 14666                     ERROR;
       
 14667                 }
       
 14668                 
       
 14669             }
       
 14670             
       
 14671             
       
 14672             ERROR;
       
 14673         }
       
 14674         
       
 14675     }/*function_sub_time*/
       
 14676     break;
       
 14677 
       
 14678 /****
       
 14679  *SUB_DATE_DATE
       
 14680  */
       
 14681     case function_sub_date_date :
       
 14682     {
       
 14683         symbol_c *last_type_symbol = NULL;
       
 14684 
       
 14685         {
       
 14686             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14687             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14688             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14689             symbol_c *IN1_type_symbol = NULL;
       
 14690             
       
 14691             /* Get the value from a foo(<param_value>) style call */
       
 14692             if (IN1_param_value == NULL)
       
 14693               IN1_param_value = function_call_param_iterator.next_nf();
       
 14694             if (IN1_param_value != NULL) {
       
 14695               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14696               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14697             }
       
 14698             
       
 14699             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 14700             {
       
 14701         
       
 14702                 {
       
 14703                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14704                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14705                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14706                     symbol_c *IN2_type_symbol = NULL;
       
 14707                     
       
 14708                     /* Get the value from a foo(<param_value>) style call */
       
 14709                     if (IN2_param_value == NULL)
       
 14710                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14711                     if (IN2_param_value != NULL) {
       
 14712                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14713                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14714                     }
       
 14715                     
       
 14716                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 14717                     {
       
 14718                 
       
 14719                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14720                         return return_type_symbol;
       
 14721                         
       
 14722                     }
       
 14723                     
       
 14724                     
       
 14725                     ERROR;
       
 14726                 }
       
 14727                 
       
 14728             }
       
 14729             
       
 14730             
       
 14731             ERROR;
       
 14732         }
       
 14733         
       
 14734     }/*function_sub_date_date*/
       
 14735     break;
       
 14736 
       
 14737 /****
       
 14738  *SUB_TOD_TIME
       
 14739  */
       
 14740     case function_sub_tod_time :
       
 14741     {
       
 14742         symbol_c *last_type_symbol = NULL;
       
 14743 
       
 14744         {
       
 14745             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14746             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14747             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14748             symbol_c *IN1_type_symbol = NULL;
       
 14749             
       
 14750             /* Get the value from a foo(<param_value>) style call */
       
 14751             if (IN1_param_value == NULL)
       
 14752               IN1_param_value = function_call_param_iterator.next_nf();
       
 14753             if (IN1_param_value != NULL) {
       
 14754               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14755               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14756             }
       
 14757             
       
 14758             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14759             {
       
 14760         
       
 14761                 {
       
 14762                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14763                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14764                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14765                     symbol_c *IN2_type_symbol = NULL;
       
 14766                     
       
 14767                     /* Get the value from a foo(<param_value>) style call */
       
 14768                     if (IN2_param_value == NULL)
       
 14769                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14770                     if (IN2_param_value != NULL) {
       
 14771                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14772                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14773                     }
       
 14774                     
       
 14775                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14776                     {
       
 14777                 
       
 14778                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14779                         return return_type_symbol;
       
 14780                         
       
 14781                     }
       
 14782                     
       
 14783                     
       
 14784                     ERROR;
       
 14785                 }
       
 14786                 
       
 14787             }
       
 14788             
       
 14789             
       
 14790             ERROR;
       
 14791         }
       
 14792         
       
 14793     }/*function_sub_tod_time*/
       
 14794     break;
       
 14795 
       
 14796 /****
       
 14797  *SUB_TOD_TOD
       
 14798  */
       
 14799     case function_sub_tod_tod :
       
 14800     {
       
 14801         symbol_c *last_type_symbol = NULL;
       
 14802 
       
 14803         {
       
 14804             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14805             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14806             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14807             symbol_c *IN1_type_symbol = NULL;
       
 14808             
       
 14809             /* Get the value from a foo(<param_value>) style call */
       
 14810             if (IN1_param_value == NULL)
       
 14811               IN1_param_value = function_call_param_iterator.next_nf();
       
 14812             if (IN1_param_value != NULL) {
       
 14813               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14814               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14815             }
       
 14816             
       
 14817             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14818             {
       
 14819         
       
 14820                 {
       
 14821                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14822                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14823                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14824                     symbol_c *IN2_type_symbol = NULL;
       
 14825                     
       
 14826                     /* Get the value from a foo(<param_value>) style call */
       
 14827                     if (IN2_param_value == NULL)
       
 14828                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14829                     if (IN2_param_value != NULL) {
       
 14830                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14831                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14832                     }
       
 14833                     
       
 14834                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14835                     {
       
 14836                 
       
 14837                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14838                         return return_type_symbol;
       
 14839                         
       
 14840                     }
       
 14841                     
       
 14842                     
       
 14843                     ERROR;
       
 14844                 }
       
 14845                 
       
 14846             }
       
 14847             
       
 14848             
       
 14849             ERROR;
       
 14850         }
       
 14851         
       
 14852     }/*function_sub_tod_tod*/
       
 14853     break;
       
 14854 
       
 14855 /****
       
 14856  *SUB_DT_TIME
       
 14857  */
       
 14858     case function_sub_dt_time :
       
 14859     {
       
 14860         symbol_c *last_type_symbol = NULL;
       
 14861 
       
 14862         {
       
 14863             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14865             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14866             symbol_c *IN1_type_symbol = NULL;
       
 14867             
       
 14868             /* Get the value from a foo(<param_value>) style call */
       
 14869             if (IN1_param_value == NULL)
       
 14870               IN1_param_value = function_call_param_iterator.next_nf();
       
 14871             if (IN1_param_value != NULL) {
       
 14872               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14873               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14874             }
       
 14875             
       
 14876             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 14877             {
       
 14878         
       
 14879                 {
       
 14880                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14881                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14882                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14883                     symbol_c *IN2_type_symbol = NULL;
       
 14884                     
       
 14885                     /* Get the value from a foo(<param_value>) style call */
       
 14886                     if (IN2_param_value == NULL)
       
 14887                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14888                     if (IN2_param_value != NULL) {
       
 14889                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14890                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14891                     }
       
 14892                     
       
 14893                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 14894                     {
       
 14895                 
       
 14896                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14897                         return return_type_symbol;
       
 14898                         
       
 14899                     }
       
 14900                     
       
 14901                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14902                     {
       
 14903                 
       
 14904                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14905                         return return_type_symbol;
       
 14906                         
       
 14907                     }
       
 14908                     
       
 14909                     
       
 14910                     ERROR;
       
 14911                 }
       
 14912                 
       
 14913             }
       
 14914             
       
 14915             
       
 14916             ERROR;
       
 14917         }
       
 14918         
       
 14919     }/*function_sub_dt_time*/
       
 14920     break;
       
 14921 
       
 14922 /****
       
 14923  *DIV
       
 14924  */
       
 14925     case function_div :
       
 14926     {
       
 14927         symbol_c *last_type_symbol = NULL;
       
 14928 
       
 14929         {
       
 14930             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14932             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14933             symbol_c *IN1_type_symbol = NULL;
       
 14934             
       
 14935             /* Get the value from a foo(<param_value>) style call */
       
 14936             if (IN1_param_value == NULL)
       
 14937               IN1_param_value = function_call_param_iterator.next_nf();
       
 14938             if (IN1_param_value != NULL) {
       
 14939               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14940               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14941             }
       
 14942             
       
 14943             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14944             {
       
 14945         
       
 14946                 {
       
 14947                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14948                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14949                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14950                     symbol_c *IN2_type_symbol = NULL;
       
 14951                     
       
 14952                     /* Get the value from a foo(<param_value>) style call */
       
 14953                     if (IN2_param_value == NULL)
       
 14954                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14955                     if (IN2_param_value != NULL) {
       
 14956                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14957                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14958                     }
       
 14959                     
       
 14960                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14961                     {
       
 14962                 
       
 14963                         symbol_c * return_type_symbol = last_type_symbol;
       
 14964                         return return_type_symbol;
       
 14965                         
       
 14966                     }
       
 14967                     
       
 14968                     
       
 14969                     ERROR;
       
 14970                 }
       
 14971                 
       
 14972             }
       
 14973             
       
 14974             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14975             {
       
 14976         
       
 14977                 {
       
 14978                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 14979                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14980                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 14981                     symbol_c *IN2_type_symbol = NULL;
       
 14982                     
       
 14983                     /* Get the value from a foo(<param_value>) style call */
       
 14984                     if (IN2_param_value == NULL)
       
 14985                       IN2_param_value = function_call_param_iterator.next_nf();
       
 14986                     if (IN2_param_value != NULL) {
       
 14987                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14988                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14989                     }
       
 14990                     
       
 14991                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14992                     {
       
 14993                 
       
 14994                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14995                         return return_type_symbol;
       
 14996                         
       
 14997                     }
       
 14998                     
       
 14999                     
       
 15000                     ERROR;
       
 15001                 }
       
 15002                 
       
 15003             }
       
 15004             
 14477             
 15005             
 14478             ERROR;
 15006             ERROR;
 14479         }
 15007         }
 14480         
 15008         
 14481     }/*function_div*/
 15009     }/*function_div*/
       
 15010     break;
       
 15011 
       
 15012 /****
       
 15013  *DIVTIME
       
 15014  */
       
 15015     case function_divtime :
       
 15016     {
       
 15017         symbol_c *last_type_symbol = NULL;
       
 15018 
       
 15019         {
       
 15020             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 15021             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15022             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 15023             symbol_c *IN1_type_symbol = NULL;
       
 15024             
       
 15025             /* Get the value from a foo(<param_value>) style call */
       
 15026             if (IN1_param_value == NULL)
       
 15027               IN1_param_value = function_call_param_iterator.next_nf();
       
 15028             if (IN1_param_value != NULL) {
       
 15029               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15030               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15031             }
       
 15032             
       
 15033             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 15034             {
       
 15035         
       
 15036                 {
       
 15037                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 15038                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15039                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 15040                     symbol_c *IN2_type_symbol = NULL;
       
 15041                     
       
 15042                     /* Get the value from a foo(<param_value>) style call */
       
 15043                     if (IN2_param_value == NULL)
       
 15044                       IN2_param_value = function_call_param_iterator.next_nf();
       
 15045                     if (IN2_param_value != NULL) {
       
 15046                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15047                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15048                     }
       
 15049                     
       
 15050                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 15051                     {
       
 15052                 
       
 15053                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15054                         return return_type_symbol;
       
 15055                         
       
 15056                     }
       
 15057                     
       
 15058                     
       
 15059                     ERROR;
       
 15060                 }
       
 15061                 
       
 15062             }
       
 15063             
       
 15064             
       
 15065             ERROR;
       
 15066         }
       
 15067         
       
 15068     }/*function_divtime*/
 14482     break;
 15069     break;
 14483 
 15070 
 14484 /****
 15071 /****
 14485  *MOD
 15072  *MOD
 14486  */
 15073  */
 16057             if (IN1_param_value != NULL) {
 16644             if (IN1_param_value != NULL) {
 16058               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16645               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 16059               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 16646               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 16060             }
 16647             }
 16061             
 16648             
 16062             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 16649             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16063             {
 16650             {
 16064         
 16651         
 16065                 {
 16652                 {
 16066                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 16653                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 16067                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16654                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16074                     if (IN2_param_value != NULL) {
 16661                     if (IN2_param_value != NULL) {
 16075                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16662                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16076                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 16663                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 16077                     }
 16664                     }
 16078                     
 16665                     
 16079                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 16666                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16080                     {
 16667                     {
 16081                 
 16668                 
 16082                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16669                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16083                         return return_type_symbol;
 16670                         return return_type_symbol;
 16084                         
 16671                         
 16085                     }
 16672                     }
 16086                     
 16673                     
 16087                     
 16674                     
 16088                     ERROR;
 16675                     ERROR;
 16089                 }
 16676                 }
 16090                 
 16677                 
 16091             }
 16678             }
 16092             
 16679             
 16093             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16680             
       
 16681             ERROR;
       
 16682         }
       
 16683         
       
 16684     }/*function_concat*/
       
 16685     break;
       
 16686 
       
 16687 /****
       
 16688  *CONCAT_DAT_TOD
       
 16689  */
       
 16690     case function_concat_dat_tod :
       
 16691     {
       
 16692         symbol_c *last_type_symbol = NULL;
       
 16693 
       
 16694         {
       
 16695             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 16696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16697             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 16698             symbol_c *IN1_type_symbol = NULL;
       
 16699             
       
 16700             /* Get the value from a foo(<param_value>) style call */
       
 16701             if (IN1_param_value == NULL)
       
 16702               IN1_param_value = function_call_param_iterator.next_nf();
       
 16703             if (IN1_param_value != NULL) {
       
 16704               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16705               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16706             }
       
 16707             
       
 16708             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 16094             {
 16709             {
 16095         
 16710         
 16096                 {
 16711                 {
 16097                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 16712                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 16098                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16713                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 16105                     if (IN2_param_value != NULL) {
 16720                     if (IN2_param_value != NULL) {
 16106                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16721                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 16107                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 16722                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 16108                     }
 16723                     }
 16109                     
 16724                     
 16110                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 16725                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 16111                     {
 16726                     {
 16112                 
 16727                 
 16113                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16728                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16114                         return return_type_symbol;
 16729                         return return_type_symbol;
 16115                         
 16730                         
 16116                     }
 16731                     }
 16117                     
 16732                     
 16118                     
 16733                     
 16123             
 16738             
 16124             
 16739             
 16125             ERROR;
 16740             ERROR;
 16126         }
 16741         }
 16127         
 16742         
 16128     }/*function_concat*/
 16743     }/*function_concat_dat_tod*/
 16129     break;
 16744     break;
 16130 
 16745 
 16131 /****
 16746 /****
 16132  *INSERT
 16747  *INSERT
 16133  */
 16748  */
 26647         
 27262         
 26648     }/*function_add*/
 27263     }/*function_add*/
 26649     break;
 27264     break;
 26650 
 27265 
 26651 /****
 27266 /****
 26652  *MUL
 27267  *ADD_TIME
 26653  */
 27268  */
 26654     case function_mul :
 27269     case function_add_time :
 26655     {
 27270     {
 26656         symbol_c *last_type_symbol = NULL;
 27271         symbol_c *last_type_symbol = NULL;
 26657 
 27272 
 26658         {
 27273         {
 26659             symbol_c *IN1_type_symbol = param_data_type;
 27274             symbol_c *IN1_type_symbol = param_data_type;
 26660             last_type_symbol = param_data_type;
 27275             last_type_symbol = param_data_type;
 26661             
 27276             
 26662             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27277             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26663             {
 27278             {
 26664         
 27279         
 26665                 {
 27280                 {
 26666                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27281                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26667                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27282                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26674                     if (IN2_param_value != NULL) {
 27289                     if (IN2_param_value != NULL) {
 26675                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27290                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26676                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27291                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26677                     }
 27292                     }
 26678                     
 27293                     
 26679                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27294                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26680                     {
 27295                     {
 26681                 
 27296                 
 26682                         symbol_c * return_type_symbol = last_type_symbol;
 27297                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 26683                         return return_type_symbol;
 27298                         return return_type_symbol;
 26684                         
 27299                         
 26685                     }
 27300                     }
 26686                     
 27301                     
 26687                     
 27302                     
 26688                     ERROR;
 27303                     ERROR;
 26689                 }
 27304                 }
 26690                 
 27305                 
 26691             }
 27306             }
 26692             
 27307             
 26693             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27308             
       
 27309             ERROR;
       
 27310         }
       
 27311         
       
 27312     }/*function_add_time*/
       
 27313     break;
       
 27314 
       
 27315 /****
       
 27316  *ADD_TOD_TIME
       
 27317  */
       
 27318     case function_add_tod_time :
       
 27319     {
       
 27320         symbol_c *last_type_symbol = NULL;
       
 27321 
       
 27322         {
       
 27323             symbol_c *IN1_type_symbol = param_data_type;
       
 27324             last_type_symbol = param_data_type;
       
 27325             
       
 27326             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 26694             {
 27327             {
 26695         
 27328         
 26696                 {
 27329                 {
 26697                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27330                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26698                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27331                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26705                     if (IN2_param_value != NULL) {
 27338                     if (IN2_param_value != NULL) {
 26706                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27339                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26707                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27340                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26708                     }
 27341                     }
 26709                     
 27342                     
 26710                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27343                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26711                     {
 27344                     {
 26712                 
 27345                 
 26713                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27346                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 26714                         return return_type_symbol;
 27347                         return return_type_symbol;
 26715                         
 27348                         
 26716                     }
 27349                     }
 26717                     
 27350                     
 26718                     
 27351                     
 26723             
 27356             
 26724             
 27357             
 26725             ERROR;
 27358             ERROR;
 26726         }
 27359         }
 26727         
 27360         
 26728     }/*function_mul*/
 27361     }/*function_add_tod_time*/
 26729     break;
 27362     break;
 26730 
 27363 
 26731 /****
 27364 /****
 26732  *SUB
 27365  *ADD_DT_TIME
 26733  */
 27366  */
 26734     case function_sub :
 27367     case function_add_dt_time :
 26735     {
 27368     {
 26736         symbol_c *last_type_symbol = NULL;
 27369         symbol_c *last_type_symbol = NULL;
 26737 
 27370 
 26738         {
 27371         {
 26739             symbol_c *IN1_type_symbol = param_data_type;
 27372             symbol_c *IN1_type_symbol = param_data_type;
 26740             last_type_symbol = param_data_type;
 27373             last_type_symbol = param_data_type;
 26741             
 27374             
 26742             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27375             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 26743             {
 27376             {
 26744         
 27377         
 26745                 {
 27378                 {
 26746                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27379                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26747                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27380                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26754                     if (IN2_param_value != NULL) {
 27387                     if (IN2_param_value != NULL) {
 26755                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27388                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26756                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27389                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26757                     }
 27390                     }
 26758                     
 27391                     
 26759                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27392                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26760                     {
 27393                     {
 26761                 
 27394                 
 26762                         symbol_c * return_type_symbol = last_type_symbol;
 27395                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 26763                         return return_type_symbol;
 27396                         return return_type_symbol;
 26764                         
 27397                         
 26765                     }
 27398                     }
 26766                     
 27399                     
 26767                     
 27400                     
 26768                     ERROR;
 27401                     ERROR;
 26769                 }
 27402                 }
 26770                 
 27403                 
 26771             }
 27404             }
 26772             
 27405             
 26773             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27406             
       
 27407             ERROR;
       
 27408         }
       
 27409         
       
 27410     }/*function_add_dt_time*/
       
 27411     break;
       
 27412 
       
 27413 /****
       
 27414  *MUL
       
 27415  */
       
 27416     case function_mul :
       
 27417     {
       
 27418         symbol_c *last_type_symbol = NULL;
       
 27419 
       
 27420         {
       
 27421             symbol_c *IN1_type_symbol = param_data_type;
       
 27422             last_type_symbol = param_data_type;
       
 27423             
       
 27424             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 26774             {
 27425             {
 26775         
 27426         
 26776                 {
 27427                 {
 26777                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27428                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26778                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27429                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26785                     if (IN2_param_value != NULL) {
 27436                     if (IN2_param_value != NULL) {
 26786                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27437                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26787                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27438                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26788                     }
 27439                     }
 26789                     
 27440                     
 26790                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27441                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 26791                     {
 27442                     {
 26792                 
 27443                 
 26793                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27444                         symbol_c * return_type_symbol = last_type_symbol;
 26794                         return return_type_symbol;
 27445                         return return_type_symbol;
 26795                         
 27446                         
 26796                     }
 27447                     }
 26797                     
 27448                     
 26798                     
 27449                     
 26799                     ERROR;
 27450                     ERROR;
 26800                 }
 27451                 }
 26801                 
 27452                 
 26802             }
 27453             }
 26803             
 27454             
 26804             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27455             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26805             {
 27456             {
 26806         
 27457         
 26807                 {
 27458                 {
 26808                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27459                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26809                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26816                     if (IN2_param_value != NULL) {
 27467                     if (IN2_param_value != NULL) {
 26817                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27468                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26818                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27469                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26819                     }
 27470                     }
 26820                     
 27471                     
 26821                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27472                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 26822                     {
 27473                     {
 26823                 
 27474                 
 26824                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27475                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 26825                         return return_type_symbol;
 27476                         return return_type_symbol;
 26826                         
 27477                         
 26827                     }
 27478                     }
 26828                     
 27479                     
 26829                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26830                     {
       
 26831                 
       
 26832                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 26833                         return return_type_symbol;
       
 26834                         
       
 26835                     }
       
 26836                     
       
 26837                     
 27480                     
 26838                     ERROR;
 27481                     ERROR;
 26839                 }
 27482                 }
 26840                 
 27483                 
 26841             }
 27484             }
 26842             
 27485             
 26843             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27486             
       
 27487             ERROR;
       
 27488         }
       
 27489         
       
 27490     }/*function_mul*/
       
 27491     break;
       
 27492 
       
 27493 /****
       
 27494  *MULTIME
       
 27495  */
       
 27496     case function_multime :
       
 27497     {
       
 27498         symbol_c *last_type_symbol = NULL;
       
 27499 
       
 27500         {
       
 27501             symbol_c *IN1_type_symbol = param_data_type;
       
 27502             last_type_symbol = param_data_type;
       
 27503             
       
 27504             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 26844             {
 27505             {
 26845         
 27506         
 26846                 {
 27507                 {
 26847                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27508                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26848                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27509                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26855                     if (IN2_param_value != NULL) {
 27516                     if (IN2_param_value != NULL) {
 26856                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27517                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26857                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27518                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26858                     }
 27519                     }
 26859                     
 27520                     
 26860                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27521                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 26861                     {
 27522                     {
 26862                 
 27523                 
 26863                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27524                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 26864                         return return_type_symbol;
 27525                         return return_type_symbol;
 26865                         
 27526                         
 26866                     }
 27527                     }
 26867                     
 27528                     
 26868                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26869                     {
       
 26870                 
       
 26871                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 26872                         return return_type_symbol;
       
 26873                         
       
 26874                     }
       
 26875                     
       
 26876                     
 27529                     
 26877                     ERROR;
 27530                     ERROR;
 26878                 }
 27531                 }
 26879                 
 27532                 
 26880             }
 27533             }
 26881             
 27534             
 26882             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27535             
       
 27536             ERROR;
       
 27537         }
       
 27538         
       
 27539     }/*function_multime*/
       
 27540     break;
       
 27541 
       
 27542 /****
       
 27543  *SUB
       
 27544  */
       
 27545     case function_sub :
       
 27546     {
       
 27547         symbol_c *last_type_symbol = NULL;
       
 27548 
       
 27549         {
       
 27550             symbol_c *IN1_type_symbol = param_data_type;
       
 27551             last_type_symbol = param_data_type;
       
 27552             
       
 27553             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 26883             {
 27554             {
 26884         
 27555         
 26885                 {
 27556                 {
 26886                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27557                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26887                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27558                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26894                     if (IN2_param_value != NULL) {
 27565                     if (IN2_param_value != NULL) {
 26895                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27566                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26896                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27567                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26897                     }
 27568                     }
 26898                     
 27569                     
 26899                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27570                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 26900                     {
 27571                     {
 26901                 
 27572                 
 26902                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27573                         symbol_c * return_type_symbol = last_type_symbol;
 26903                         return return_type_symbol;
 27574                         return return_type_symbol;
 26904                         
 27575                         
 26905                     }
 27576                     }
 26906                     
 27577                     
 26907                     
 27578                     
 26908                     ERROR;
 27579                     ERROR;
 26909                 }
 27580                 }
 26910                 
 27581                 
 26911             }
 27582             }
 26912             
 27583             
 26913             
 27584             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 26914             ERROR;
       
 26915         }
       
 26916         
       
 26917     }/*function_sub*/
       
 26918     break;
       
 26919 
       
 26920 /****
       
 26921  *DIV
       
 26922  */
       
 26923     case function_div :
       
 26924     {
       
 26925         symbol_c *last_type_symbol = NULL;
       
 26926 
       
 26927         {
       
 26928             symbol_c *IN1_type_symbol = param_data_type;
       
 26929             last_type_symbol = param_data_type;
       
 26930             
       
 26931             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 26932             {
 27585             {
 26933         
 27586         
 26934                 {
 27587                 {
 26935                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27588                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26936                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27589                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26943                     if (IN2_param_value != NULL) {
 27596                     if (IN2_param_value != NULL) {
 26944                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27597                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26945                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27598                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26946                     }
 27599                     }
 26947                     
 27600                     
 26948                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27601                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 26949                     {
 27602                     {
 26950                 
 27603                 
 26951                         symbol_c * return_type_symbol = last_type_symbol;
 27604                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 26952                         return return_type_symbol;
 27605                         return return_type_symbol;
 26953                         
 27606                         
 26954                     }
 27607                     }
 26955                     
 27608                     
 26956                     
 27609                     
 26957                     ERROR;
 27610                     ERROR;
 26958                 }
 27611                 }
 26959                 
 27612                 
 26960             }
 27613             }
 26961             
 27614             
 26962             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27615             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 26963             {
 27616             {
 26964         
 27617         
 26965                 {
 27618                 {
 26966                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27619                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 26967                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27620                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26974                     if (IN2_param_value != NULL) {
 27627                     if (IN2_param_value != NULL) {
 26975                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27628                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26976                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 27629                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26977                     }
 27630                     }
 26978                     
 27631                     
 26979                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27632                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 26980                     {
 27633                     {
 26981                 
 27634                 
 26982                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27635                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 26983                         return return_type_symbol;
 27636                         return return_type_symbol;
 26984                         
 27637                         
 26985                     }
 27638                     }
 26986                     
 27639                     
       
 27640                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27641                     {
       
 27642                 
       
 27643                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 27644                         return return_type_symbol;
       
 27645                         
       
 27646                     }
       
 27647                     
 26987                     
 27648                     
 26988                     ERROR;
 27649                     ERROR;
 26989                 }
 27650                 }
 26990                 
 27651                 
 26991             }
 27652             }
 26992             
 27653             
       
 27654             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 27655             {
       
 27656         
       
 27657                 {
       
 27658                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27659                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27660                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27661                     symbol_c *IN2_type_symbol = NULL;
       
 27662                     
       
 27663                     /* Get the value from a foo(<param_value>) style call */
       
 27664                     if (IN2_param_value == NULL)
       
 27665                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27666                     if (IN2_param_value != NULL) {
       
 27667                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27668                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27669                     }
       
 27670                     
       
 27671                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 27672                     {
       
 27673                 
       
 27674                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27675                         return return_type_symbol;
       
 27676                         
       
 27677                     }
       
 27678                     
       
 27679                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27680                     {
       
 27681                 
       
 27682                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 27683                         return return_type_symbol;
       
 27684                         
       
 27685                     }
       
 27686                     
       
 27687                     
       
 27688                     ERROR;
       
 27689                 }
       
 27690                 
       
 27691             }
       
 27692             
       
 27693             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27694             {
       
 27695         
       
 27696                 {
       
 27697                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27698                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27699                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27700                     symbol_c *IN2_type_symbol = NULL;
       
 27701                     
       
 27702                     /* Get the value from a foo(<param_value>) style call */
       
 27703                     if (IN2_param_value == NULL)
       
 27704                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27705                     if (IN2_param_value != NULL) {
       
 27706                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27707                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27708                     }
       
 27709                     
       
 27710                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27711                     {
       
 27712                 
       
 27713                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27714                         return return_type_symbol;
       
 27715                         
       
 27716                     }
       
 27717                     
       
 27718                     
       
 27719                     ERROR;
       
 27720                 }
       
 27721                 
       
 27722             }
       
 27723             
       
 27724             
       
 27725             ERROR;
       
 27726         }
       
 27727         
       
 27728     }/*function_sub*/
       
 27729     break;
       
 27730 
       
 27731 /****
       
 27732  *SUB_TIME
       
 27733  */
       
 27734     case function_sub_time :
       
 27735     {
       
 27736         symbol_c *last_type_symbol = NULL;
       
 27737 
       
 27738         {
       
 27739             symbol_c *IN1_type_symbol = param_data_type;
       
 27740             last_type_symbol = param_data_type;
       
 27741             
       
 27742             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27743             {
       
 27744         
       
 27745                 {
       
 27746                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27747                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27748                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27749                     symbol_c *IN2_type_symbol = NULL;
       
 27750                     
       
 27751                     /* Get the value from a foo(<param_value>) style call */
       
 27752                     if (IN2_param_value == NULL)
       
 27753                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27754                     if (IN2_param_value != NULL) {
       
 27755                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27756                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27757                     }
       
 27758                     
       
 27759                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27760                     {
       
 27761                 
       
 27762                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27763                         return return_type_symbol;
       
 27764                         
       
 27765                     }
       
 27766                     
       
 27767                     
       
 27768                     ERROR;
       
 27769                 }
       
 27770                 
       
 27771             }
       
 27772             
       
 27773             
       
 27774             ERROR;
       
 27775         }
       
 27776         
       
 27777     }/*function_sub_time*/
       
 27778     break;
       
 27779 
       
 27780 /****
       
 27781  *SUB_DATE_DATE
       
 27782  */
       
 27783     case function_sub_date_date :
       
 27784     {
       
 27785         symbol_c *last_type_symbol = NULL;
       
 27786 
       
 27787         {
       
 27788             symbol_c *IN1_type_symbol = param_data_type;
       
 27789             last_type_symbol = param_data_type;
       
 27790             
       
 27791             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 27792             {
       
 27793         
       
 27794                 {
       
 27795                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27796                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27797                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27798                     symbol_c *IN2_type_symbol = NULL;
       
 27799                     
       
 27800                     /* Get the value from a foo(<param_value>) style call */
       
 27801                     if (IN2_param_value == NULL)
       
 27802                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27803                     if (IN2_param_value != NULL) {
       
 27804                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27805                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27806                     }
       
 27807                     
       
 27808                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 27809                     {
       
 27810                 
       
 27811                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27812                         return return_type_symbol;
       
 27813                         
       
 27814                     }
       
 27815                     
       
 27816                     
       
 27817                     ERROR;
       
 27818                 }
       
 27819                 
       
 27820             }
       
 27821             
       
 27822             
       
 27823             ERROR;
       
 27824         }
       
 27825         
       
 27826     }/*function_sub_date_date*/
       
 27827     break;
       
 27828 
       
 27829 /****
       
 27830  *SUB_TOD_TIME
       
 27831  */
       
 27832     case function_sub_tod_time :
       
 27833     {
       
 27834         symbol_c *last_type_symbol = NULL;
       
 27835 
       
 27836         {
       
 27837             symbol_c *IN1_type_symbol = param_data_type;
       
 27838             last_type_symbol = param_data_type;
       
 27839             
       
 27840             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 27841             {
       
 27842         
       
 27843                 {
       
 27844                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27845                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27846                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27847                     symbol_c *IN2_type_symbol = NULL;
       
 27848                     
       
 27849                     /* Get the value from a foo(<param_value>) style call */
       
 27850                     if (IN2_param_value == NULL)
       
 27851                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27852                     if (IN2_param_value != NULL) {
       
 27853                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27854                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27855                     }
       
 27856                     
       
 27857                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27858                     {
       
 27859                 
       
 27860                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 27861                         return return_type_symbol;
       
 27862                         
       
 27863                     }
       
 27864                     
       
 27865                     
       
 27866                     ERROR;
       
 27867                 }
       
 27868                 
       
 27869             }
       
 27870             
       
 27871             
       
 27872             ERROR;
       
 27873         }
       
 27874         
       
 27875     }/*function_sub_tod_time*/
       
 27876     break;
       
 27877 
       
 27878 /****
       
 27879  *SUB_TOD_TOD
       
 27880  */
       
 27881     case function_sub_tod_tod :
       
 27882     {
       
 27883         symbol_c *last_type_symbol = NULL;
       
 27884 
       
 27885         {
       
 27886             symbol_c *IN1_type_symbol = param_data_type;
       
 27887             last_type_symbol = param_data_type;
       
 27888             
       
 27889             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 27890             {
       
 27891         
       
 27892                 {
       
 27893                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27894                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27895                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27896                     symbol_c *IN2_type_symbol = NULL;
       
 27897                     
       
 27898                     /* Get the value from a foo(<param_value>) style call */
       
 27899                     if (IN2_param_value == NULL)
       
 27900                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27901                     if (IN2_param_value != NULL) {
       
 27902                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27903                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27904                     }
       
 27905                     
       
 27906                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 27907                     {
       
 27908                 
       
 27909                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27910                         return return_type_symbol;
       
 27911                         
       
 27912                     }
       
 27913                     
       
 27914                     
       
 27915                     ERROR;
       
 27916                 }
       
 27917                 
       
 27918             }
       
 27919             
       
 27920             
       
 27921             ERROR;
       
 27922         }
       
 27923         
       
 27924     }/*function_sub_tod_tod*/
       
 27925     break;
       
 27926 
       
 27927 /****
       
 27928  *SUB_DT_TIME
       
 27929  */
       
 27930     case function_sub_dt_time :
       
 27931     {
       
 27932         symbol_c *last_type_symbol = NULL;
       
 27933 
       
 27934         {
       
 27935             symbol_c *IN1_type_symbol = param_data_type;
       
 27936             last_type_symbol = param_data_type;
       
 27937             
       
 27938             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 27939             {
       
 27940         
       
 27941                 {
       
 27942                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 27943                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27944                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 27945                     symbol_c *IN2_type_symbol = NULL;
       
 27946                     
       
 27947                     /* Get the value from a foo(<param_value>) style call */
       
 27948                     if (IN2_param_value == NULL)
       
 27949                       IN2_param_value = function_call_param_iterator.next_nf();
       
 27950                     if (IN2_param_value != NULL) {
       
 27951                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27952                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27953                     }
       
 27954                     
       
 27955                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 27956                     {
       
 27957                 
       
 27958                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 27959                         return return_type_symbol;
       
 27960                         
       
 27961                     }
       
 27962                     
       
 27963                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27964                     {
       
 27965                 
       
 27966                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 27967                         return return_type_symbol;
       
 27968                         
       
 27969                     }
       
 27970                     
       
 27971                     
       
 27972                     ERROR;
       
 27973                 }
       
 27974                 
       
 27975             }
       
 27976             
       
 27977             
       
 27978             ERROR;
       
 27979         }
       
 27980         
       
 27981     }/*function_sub_dt_time*/
       
 27982     break;
       
 27983 
       
 27984 /****
       
 27985  *DIV
       
 27986  */
       
 27987     case function_div :
       
 27988     {
       
 27989         symbol_c *last_type_symbol = NULL;
       
 27990 
       
 27991         {
       
 27992             symbol_c *IN1_type_symbol = param_data_type;
       
 27993             last_type_symbol = param_data_type;
       
 27994             
       
 27995             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 27996             {
       
 27997         
       
 27998                 {
       
 27999                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 28000                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28001                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 28002                     symbol_c *IN2_type_symbol = NULL;
       
 28003                     
       
 28004                     /* Get the value from a foo(<param_value>) style call */
       
 28005                     if (IN2_param_value == NULL)
       
 28006                       IN2_param_value = function_call_param_iterator.next_nf();
       
 28007                     if (IN2_param_value != NULL) {
       
 28008                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28009                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28010                     }
       
 28011                     
       
 28012                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 28013                     {
       
 28014                 
       
 28015                         symbol_c * return_type_symbol = last_type_symbol;
       
 28016                         return return_type_symbol;
       
 28017                         
       
 28018                     }
       
 28019                     
       
 28020                     
       
 28021                     ERROR;
       
 28022                 }
       
 28023                 
       
 28024             }
       
 28025             
       
 28026             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 28027             {
       
 28028         
       
 28029                 {
       
 28030                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 28031                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28032                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 28033                     symbol_c *IN2_type_symbol = NULL;
       
 28034                     
       
 28035                     /* Get the value from a foo(<param_value>) style call */
       
 28036                     if (IN2_param_value == NULL)
       
 28037                       IN2_param_value = function_call_param_iterator.next_nf();
       
 28038                     if (IN2_param_value != NULL) {
       
 28039                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28040                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28041                     }
       
 28042                     
       
 28043                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 28044                     {
       
 28045                 
       
 28046                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 28047                         return return_type_symbol;
       
 28048                         
       
 28049                     }
       
 28050                     
       
 28051                     
       
 28052                     ERROR;
       
 28053                 }
       
 28054                 
       
 28055             }
       
 28056             
 26993             
 28057             
 26994             ERROR;
 28058             ERROR;
 26995         }
 28059         }
 26996         
 28060         
 26997     }/*function_div*/
 28061     }/*function_div*/
       
 28062     break;
       
 28063 
       
 28064 /****
       
 28065  *DIVTIME
       
 28066  */
       
 28067     case function_divtime :
       
 28068     {
       
 28069         symbol_c *last_type_symbol = NULL;
       
 28070 
       
 28071         {
       
 28072             symbol_c *IN1_type_symbol = param_data_type;
       
 28073             last_type_symbol = param_data_type;
       
 28074             
       
 28075             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 28076             {
       
 28077         
       
 28078                 {
       
 28079                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
       
 28080                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28081                     symbol_c *IN2_param_value = function_call_param_iterator.search_f(IN2_param_name);
       
 28082                     symbol_c *IN2_type_symbol = NULL;
       
 28083                     
       
 28084                     /* Get the value from a foo(<param_value>) style call */
       
 28085                     if (IN2_param_value == NULL)
       
 28086                       IN2_param_value = function_call_param_iterator.next_nf();
       
 28087                     if (IN2_param_value != NULL) {
       
 28088                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28089                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28090                     }
       
 28091                     
       
 28092                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 28093                     {
       
 28094                 
       
 28095                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 28096                         return return_type_symbol;
       
 28097                         
       
 28098                     }
       
 28099                     
       
 28100                     
       
 28101                     ERROR;
       
 28102                 }
       
 28103                 
       
 28104             }
       
 28105             
       
 28106             
       
 28107             ERROR;
       
 28108         }
       
 28109         
       
 28110     }/*function_divtime*/
 26998     break;
 28111     break;
 26999 
 28112 
 27000 /****
 28113 /****
 27001  *MOD
 28114  *MOD
 27002  */
 28115  */
 28303 
 29416 
 28304         {
 29417         {
 28305             symbol_c *IN1_type_symbol = param_data_type;
 29418             symbol_c *IN1_type_symbol = param_data_type;
 28306             last_type_symbol = param_data_type;
 29419             last_type_symbol = param_data_type;
 28307             
 29420             
 28308             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 29421             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 28309             {
 29422             {
 28310         
 29423         
 28311                 {
 29424                 {
 28312                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 29425                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28313                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 29426                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28320                     if (IN2_param_value != NULL) {
 29433                     if (IN2_param_value != NULL) {
 28321                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 29434                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28322                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 29435                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 28323                     }
 29436                     }
 28324                     
 29437                     
 28325                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 29438                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 28326                     {
 29439                     {
 28327                 
 29440                 
 28328                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 29441                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 28329                         return return_type_symbol;
 29442                         return return_type_symbol;
 28330                         
 29443                         
 28331                     }
 29444                     }
 28332                     
 29445                     
 28333                     
 29446                     
 28334                     ERROR;
 29447                     ERROR;
 28335                 }
 29448                 }
 28336                 
 29449                 
 28337             }
 29450             }
 28338             
 29451             
 28339             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 29452             
       
 29453             ERROR;
       
 29454         }
       
 29455         
       
 29456     }/*function_concat*/
       
 29457     break;
       
 29458 
       
 29459 /****
       
 29460  *CONCAT_DAT_TOD
       
 29461  */
       
 29462     case function_concat_dat_tod :
       
 29463     {
       
 29464         symbol_c *last_type_symbol = NULL;
       
 29465 
       
 29466         {
       
 29467             symbol_c *IN1_type_symbol = param_data_type;
       
 29468             last_type_symbol = param_data_type;
       
 29469             
       
 29470             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 28340             {
 29471             {
 28341         
 29472         
 28342                 {
 29473                 {
 28343                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 29474                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28344                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 29475                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28351                     if (IN2_param_value != NULL) {
 29482                     if (IN2_param_value != NULL) {
 28352                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 29483                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28353                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 29484                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 28354                     }
 29485                     }
 28355                     
 29486                     
 28356                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 29487                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 28357                     {
 29488                     {
 28358                 
 29489                 
 28359                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 29490                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 28360                         return return_type_symbol;
 29491                         return return_type_symbol;
 28361                         
 29492                         
 28362                     }
 29493                     }
 28363                     
 29494                     
 28364                     
 29495                     
 28369             
 29500             
 28370             
 29501             
 28371             ERROR;
 29502             ERROR;
 28372         }
 29503         }
 28373         
 29504         
 28374     }/*function_concat*/
 29505     }/*function_concat_dat_tod*/
 28375     break;
 29506     break;
 28376 
 29507 
 28377 /****
 29508 /****
 28378  *INSERT
 29509  *INSERT
 28379  */
 29510  */