absyntax_utils/search_type_code.c
changeset 314 41d4ac0b4821
parent 279 c0453b7f99df
child 316 baa7a1585585
equal deleted inserted replaced
313:90c3772e6547 314:41d4ac0b4821
 14090         
 14090         
 14091     }/*function_add*/
 14091     }/*function_add*/
 14092     break;
 14092     break;
 14093 
 14093 
 14094 /****
 14094 /****
 14095  *ADD_TIME
 14095  *MUL
 14096  */
 14096  */
 14097     case function_add_time :
 14097     case function_mul :
 14098     {
 14098     {
 14099         symbol_c *last_type_symbol = NULL;
 14099         symbol_c *last_type_symbol = NULL;
 14100 
 14100 
 14101         {
 14101         {
 14102             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14102             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14110             if (IN1_param_value != NULL) {
 14110             if (IN1_param_value != NULL) {
 14111               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14111               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 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 ;
 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 ;
 14113             }
 14113             }
 14114             
 14114             
 14115             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14115             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14116             {
 14116             {
 14117         
 14117         
 14118                 {
 14118                 {
 14119                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14119                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14120                     /* 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 */
 14127                     if (IN2_param_value != NULL) {
 14127                     if (IN2_param_value != NULL) {
 14128                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14128                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 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 ;
 14130                     }
 14130                     }
 14131                     
 14131                     
 14132                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14132                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14133                     {
 14133                     {
 14134                 
 14134                 
 14135                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14135                         symbol_c * return_type_symbol = last_type_symbol;
 14136                         return return_type_symbol;
 14136                         return return_type_symbol;
 14137                         
 14137                         
 14138                     }
 14138                     }
 14139                     
 14139                     
 14140                     
 14140                     
 14141                     ERROR;
 14141                     ERROR;
 14142                 }
 14142                 }
 14143                 
 14143                 
 14144             }
 14144             }
 14145             
 14145             
 14146             
 14146             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 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))
       
 14175             {
 14147             {
 14176         
 14148         
 14177                 {
 14149                 {
 14178                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14150                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14179                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14151                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14186                     if (IN2_param_value != NULL) {
 14158                     if (IN2_param_value != NULL) {
 14187                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14159                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14160                       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 ;
 14189                     }
 14161                     }
 14190                     
 14162                     
 14191                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14163                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14192                     {
 14164                     {
 14193                 
 14165                 
 14194                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14166                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14195                         return return_type_symbol;
 14167                         return return_type_symbol;
 14196                         
 14168                         
 14197                     }
 14169                     }
 14198                     
 14170                     
 14199                     
 14171                     
 14204             
 14176             
 14205             
 14177             
 14206             ERROR;
 14178             ERROR;
 14207         }
 14179         }
 14208         
 14180         
 14209     }/*function_add_tod_time*/
 14181     }/*function_mul*/
 14210     break;
 14182     break;
 14211 
 14183 
 14212 /****
 14184 /****
 14213  *ADD_DT_TIME
 14185  *SUB
 14214  */
 14186  */
 14215     case function_add_dt_time :
 14187     case function_sub :
 14216     {
 14188     {
 14217         symbol_c *last_type_symbol = NULL;
 14189         symbol_c *last_type_symbol = NULL;
 14218 
 14190 
 14219         {
 14191         {
 14220             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14192             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14228             if (IN1_param_value != NULL) {
 14200             if (IN1_param_value != NULL) {
 14229               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14201               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 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 ;
 14202               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 ;
 14231             }
 14203             }
 14232             
 14204             
 14233             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14205             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14234             {
 14206             {
 14235         
 14207         
 14236                 {
 14208                 {
 14237                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14209                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14238                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14210                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14245                     if (IN2_param_value != NULL) {
 14217                     if (IN2_param_value != NULL) {
 14246                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14218                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14219                       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 ;
 14248                     }
 14220                     }
 14249                     
 14221                     
 14250                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14222                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14251                     {
 14223                     {
 14252                 
 14224                 
 14253                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14225                         symbol_c * return_type_symbol = last_type_symbol;
 14254                         return return_type_symbol;
 14226                         return return_type_symbol;
 14255                         
 14227                         
 14256                     }
 14228                     }
 14257                     
 14229                     
 14258                     
 14230                     
 14259                     ERROR;
 14231                     ERROR;
 14260                 }
 14232                 }
 14261                 
 14233                 
 14262             }
 14234             }
 14263             
 14235             
 14264             
 14236             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 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))
       
 14293             {
 14237             {
 14294         
 14238         
 14295                 {
 14239                 {
 14296                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14240                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14297                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14241                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14304                     if (IN2_param_value != NULL) {
 14248                     if (IN2_param_value != NULL) {
 14305                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14249                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14250                       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 ;
 14307                     }
 14251                     }
 14308                     
 14252                     
 14309                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14253                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14310                     {
 14254                     {
 14311                 
 14255                 
 14312                         symbol_c * return_type_symbol = last_type_symbol;
 14256                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14313                         return return_type_symbol;
 14257                         return return_type_symbol;
 14314                         
 14258                         
 14315                     }
 14259                     }
 14316                     
 14260                     
 14317                     
 14261                     
 14318                     ERROR;
 14262                     ERROR;
 14319                 }
 14263                 }
 14320                 
 14264                 
 14321             }
 14265             }
 14322             
 14266             
 14323             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14267             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14324             {
 14268             {
 14325         
 14269         
 14326                 {
 14270                 {
 14327                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14271                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14328                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14272                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14335                     if (IN2_param_value != NULL) {
 14279                     if (IN2_param_value != NULL) {
 14336                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14280                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14281                       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 ;
 14338                     }
 14282                     }
 14339                     
 14283                     
 14340                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14284                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14341                     {
 14285                     {
 14342                 
 14286                 
 14343                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14287                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14344                         return return_type_symbol;
 14288                         return return_type_symbol;
 14345                         
 14289                         
 14346                     }
 14290                     }
 14347                     
 14291                     
       
 14292                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14293                     {
       
 14294                 
       
 14295                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14296                         return return_type_symbol;
       
 14297                         
       
 14298                     }
       
 14299                     
 14348                     
 14300                     
 14349                     ERROR;
 14301                     ERROR;
 14350                 }
 14302                 }
 14351                 
 14303                 
 14352             }
 14304             }
 14353             
 14305             
 14354             
 14306             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 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))
       
 14383             {
 14307             {
 14384         
 14308         
 14385                 {
 14309                 {
 14386                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14310                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14387                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14311                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14394                     if (IN2_param_value != NULL) {
 14318                     if (IN2_param_value != NULL) {
 14395                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14319                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14320                       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 ;
 14397                     }
 14321                     }
 14398                     
 14322                     
 14399                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14323                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14400                     {
 14324                     {
 14401                 
 14325                 
 14402                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14326                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14403                         return return_type_symbol;
 14327                         return return_type_symbol;
 14404                         
 14328                         
 14405                     }
 14329                     }
 14406                     
 14330                     
       
 14331                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14332                     {
       
 14333                 
       
 14334                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14335                         return return_type_symbol;
       
 14336                         
       
 14337                     }
       
 14338                     
 14407                     
 14339                     
 14408                     ERROR;
 14340                     ERROR;
 14409                 }
 14341                 }
 14410                 
 14342                 
 14411             }
 14343             }
 14412             
 14344             
 14413             
 14345             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 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))
       
 14442             {
 14346             {
 14443         
 14347         
 14444                 {
 14348                 {
 14445                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14349                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14446                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14350                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14453                     if (IN2_param_value != NULL) {
 14357                     if (IN2_param_value != NULL) {
 14454                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14358                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14359                       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 ;
 14456                     }
 14360                     }
 14457                     
 14361                     
 14458                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14362                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14459                     {
 14363                     {
 14460                 
 14364                 
 14461                         symbol_c * return_type_symbol = last_type_symbol;
 14365                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14462                         return return_type_symbol;
 14366                         return return_type_symbol;
 14463                         
 14367                         
 14464                     }
 14368                     }
 14465                     
 14369                     
 14466                     
 14370                     
 14467                     ERROR;
 14371                     ERROR;
 14468                 }
 14372                 }
 14469                 
 14373                 
 14470             }
 14374             }
 14471             
 14375             
 14472             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14376             
       
 14377             ERROR;
       
 14378         }
       
 14379         
       
 14380     }/*function_sub*/
       
 14381     break;
       
 14382 
       
 14383 /****
       
 14384  *DIV
       
 14385  */
       
 14386     case function_div :
       
 14387     {
       
 14388         symbol_c *last_type_symbol = NULL;
       
 14389 
       
 14390         {
       
 14391             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14393             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14394             symbol_c *IN1_type_symbol = NULL;
       
 14395             
       
 14396             /* Get the value from a foo(<param_value>) style call */
       
 14397             if (IN1_param_value == NULL)
       
 14398               IN1_param_value = function_call_param_iterator.next_nf();
       
 14399             if (IN1_param_value != NULL) {
       
 14400               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14401               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 ;
       
 14402             }
       
 14403             
       
 14404             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14473             {
 14405             {
 14474         
 14406         
 14475                 {
 14407                 {
 14476                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14408                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14477                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14409                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14484                     if (IN2_param_value != NULL) {
 14416                     if (IN2_param_value != NULL) {
 14485                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14417                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14418                       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 ;
 14487                     }
 14419                     }
 14488                     
 14420                     
 14489                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14421                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14490                     {
 14422                     {
 14491                 
 14423                 
 14492                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14424                         symbol_c * return_type_symbol = last_type_symbol;
 14493                         return return_type_symbol;
 14425                         return return_type_symbol;
 14494                         
 14426                         
 14495                     }
 14427                     }
 14496                     
 14428                     
 14497                     
 14429                     
 14498                     ERROR;
 14430                     ERROR;
 14499                 }
 14431                 }
 14500                 
 14432                 
 14501             }
 14433             }
 14502             
 14434             
 14503             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14435             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14504             {
 14436             {
 14505         
 14437         
 14506                 {
 14438                 {
 14507                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14439                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14508                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14440                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14515                     if (IN2_param_value != NULL) {
 14447                     if (IN2_param_value != NULL) {
 14516                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14448                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 14449                       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 ;
 14518                     }
 14450                     }
 14519                     
 14451                     
 14520                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14452                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14521                     {
 14453                     {
 14522                 
 14454                 
 14523                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14455                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14524                         return return_type_symbol;
 14456                         return return_type_symbol;
 14525                         
 14457                         
 14526                     }
 14458                     }
 14527                     
 14459                     
 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                     
       
 14536                     
 14460                     
 14537                     ERROR;
 14461                     ERROR;
 14538                 }
 14462                 }
 14539                 
 14463                 
 14540             }
 14464             }
 14541             
 14465             
 14542             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14466             
       
 14467             ERROR;
       
 14468         }
       
 14469         
       
 14470     }/*function_div*/
       
 14471     break;
       
 14472 
       
 14473 /****
       
 14474  *MOD
       
 14475  */
       
 14476     case function_mod :
       
 14477     {
       
 14478         symbol_c *last_type_symbol = NULL;
       
 14479 
       
 14480         {
       
 14481             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14482             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14483             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14484             symbol_c *IN1_type_symbol = NULL;
       
 14485             
       
 14486             /* Get the value from a foo(<param_value>) style call */
       
 14487             if (IN1_param_value == NULL)
       
 14488               IN1_param_value = function_call_param_iterator.next_nf();
       
 14489             if (IN1_param_value != NULL) {
       
 14490               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14491               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 ;
       
 14492             }
       
 14493             
       
 14494             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14543             {
 14495             {
 14544         
 14496         
 14545                 {
 14497                 {
 14546                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14498                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14547                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14499                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14554                     if (IN2_param_value != NULL) {
 14506                     if (IN2_param_value != NULL) {
 14555                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14507                       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 ;
 14508                       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                     }
 14509                     }
 14558                     
 14510                     
 14559                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14511                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14560                     {
 14512                     {
 14561                 
 14513                 
 14562                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14514                         symbol_c * return_type_symbol = last_type_symbol;
 14563                         return return_type_symbol;
 14515                         return return_type_symbol;
 14564                         
 14516                         
 14565                     }
 14517                     }
 14566                     
 14518                     
 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                     
 14519                     
 14576                     ERROR;
 14520                     ERROR;
 14577                 }
 14521                 }
 14578                 
 14522                 
 14579             }
 14523             }
 14580             
 14524             
 14581             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14525             
       
 14526             ERROR;
       
 14527         }
       
 14528         
       
 14529     }/*function_mod*/
       
 14530     break;
       
 14531 
       
 14532 /****
       
 14533  *EXPT
       
 14534  */
       
 14535     case function_expt :
       
 14536     {
       
 14537         symbol_c *last_type_symbol = NULL;
       
 14538 
       
 14539         {
       
 14540             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14541             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14542             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14543             symbol_c *IN1_type_symbol = NULL;
       
 14544             
       
 14545             /* Get the value from a foo(<param_value>) style call */
       
 14546             if (IN1_param_value == NULL)
       
 14547               IN1_param_value = function_call_param_iterator.next_nf();
       
 14548             if (IN1_param_value != NULL) {
       
 14549               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14550               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 ;
       
 14551             }
       
 14552             
       
 14553             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
 14582             {
 14554             {
 14583         
 14555         
 14584                 {
 14556                 {
 14585                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14557                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14586                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14558                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14593                     if (IN2_param_value != NULL) {
 14565                     if (IN2_param_value != NULL) {
 14594                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14566                       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 ;
 14567                       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                     }
 14568                     }
 14597                     
 14569                     
 14598                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14570                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14599                     {
 14571                     {
 14600                 
 14572                 
 14601                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14573                         symbol_c * return_type_symbol = last_type_symbol;
 14602                         return return_type_symbol;
 14574                         return return_type_symbol;
 14603                         
 14575                         
 14604                     }
 14576                     }
 14605                     
 14577                     
 14606                     
 14578                     
 14611             
 14583             
 14612             
 14584             
 14613             ERROR;
 14585             ERROR;
 14614         }
 14586         }
 14615         
 14587         
 14616     }/*function_sub*/
 14588     }/*function_expt*/
 14617     break;
 14589     break;
 14618 
 14590 
 14619 /****
 14591 /****
 14620  *SUB_TIME
 14592  *MOVE
 14621  */
 14593  */
 14622     case function_sub_time :
 14594     case function_move :
       
 14595     {
       
 14596         symbol_c *last_type_symbol = NULL;
       
 14597 
       
 14598         {
       
 14599             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 14600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14601             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 14602             symbol_c *IN_type_symbol = NULL;
       
 14603             
       
 14604             /* Get the value from a foo(<param_value>) style call */
       
 14605             if (IN_param_value == NULL)
       
 14606               IN_param_value = function_call_param_iterator.next_nf();
       
 14607             if (IN_param_value != NULL) {
       
 14608               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14609               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14610             }
       
 14611             
       
 14612             
       
 14613             {
       
 14614         
       
 14615                 symbol_c * return_type_symbol = last_type_symbol;
       
 14616                 return return_type_symbol;
       
 14617                 
       
 14618             }
       
 14619             
       
 14620             
       
 14621             ERROR;
       
 14622         }
       
 14623         
       
 14624     }/*function_move*/
       
 14625     break;
       
 14626 
       
 14627 /****
       
 14628  *ADD_TIME
       
 14629  */
       
 14630     case function_add_time :
 14623     {
 14631     {
 14624         symbol_c *last_type_symbol = NULL;
 14632         symbol_c *last_type_symbol = NULL;
 14625 
 14633 
 14626         {
 14634         {
 14627             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14635             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14670             
 14678             
 14671             
 14679             
 14672             ERROR;
 14680             ERROR;
 14673         }
 14681         }
 14674         
 14682         
 14675     }/*function_sub_time*/
 14683     }/*function_add_time*/
 14676     break;
 14684     break;
 14677 
 14685 
 14678 /****
 14686 /****
 14679  *SUB_DATE_DATE
 14687  *ADD_TOD_TIME
 14680  */
 14688  */
 14681     case function_sub_date_date :
 14689     case function_add_tod_time :
 14682     {
 14690     {
 14683         symbol_c *last_type_symbol = NULL;
 14691         symbol_c *last_type_symbol = NULL;
 14684 
 14692 
 14685         {
 14693         {
 14686             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14694             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14694             if (IN1_param_value != NULL) {
 14702             if (IN1_param_value != NULL) {
 14695               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14703               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 ;
 14704               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             }
 14705             }
 14698             
 14706             
 14699             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14707             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14700             {
 14708             {
 14701         
 14709         
 14702                 {
 14710                 {
 14703                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14711                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14704                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14712                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14711                     if (IN2_param_value != NULL) {
 14719                     if (IN2_param_value != NULL) {
 14712                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14720                       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 ;
 14721                       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                     }
 14722                     }
 14715                     
 14723                     
 14716                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14724                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14717                     {
 14725                     {
 14718                 
 14726                 
 14719                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14727                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14720                         return return_type_symbol;
 14728                         return return_type_symbol;
 14721                         
 14729                         
 14722                     }
 14730                     }
 14723                     
 14731                     
 14724                     
 14732                     
 14729             
 14737             
 14730             
 14738             
 14731             ERROR;
 14739             ERROR;
 14732         }
 14740         }
 14733         
 14741         
 14734     }/*function_sub_date_date*/
 14742     }/*function_add_tod_time*/
 14735     break;
 14743     break;
 14736 
 14744 
 14737 /****
 14745 /****
 14738  *SUB_TOD_TIME
 14746  *ADD_DT_TIME
 14739  */
 14747  */
 14740     case function_sub_tod_time :
 14748     case function_add_dt_time :
 14741     {
 14749     {
 14742         symbol_c *last_type_symbol = NULL;
 14750         symbol_c *last_type_symbol = NULL;
 14743 
 14751 
 14744         {
 14752         {
 14745             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14753             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14753             if (IN1_param_value != NULL) {
 14761             if (IN1_param_value != NULL) {
 14754               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14762               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 ;
 14763               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             }
 14764             }
 14757             
 14765             
 14758             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14766             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14759             {
 14767             {
 14760         
 14768         
 14761                 {
 14769                 {
 14762                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14770                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14763                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14771                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14773                     }
 14781                     }
 14774                     
 14782                     
 14775                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14783                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14776                     {
 14784                     {
 14777                 
 14785                 
 14778                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14786                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14779                         return return_type_symbol;
 14787                         return return_type_symbol;
 14780                         
 14788                         
 14781                     }
 14789                     }
 14782                     
 14790                     
 14783                     
 14791                     
 14788             
 14796             
 14789             
 14797             
 14790             ERROR;
 14798             ERROR;
 14791         }
 14799         }
 14792         
 14800         
 14793     }/*function_sub_tod_time*/
 14801     }/*function_add_dt_time*/
 14794     break;
 14802     break;
 14795 
 14803 
 14796 /****
 14804 /****
 14797  *SUB_TOD_TOD
 14805  *MULTIME
 14798  */
 14806  */
 14799     case function_sub_tod_tod :
 14807     case function_multime :
 14800     {
 14808     {
 14801         symbol_c *last_type_symbol = NULL;
 14809         symbol_c *last_type_symbol = NULL;
 14802 
 14810 
 14803         {
 14811         {
 14804             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14812             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14812             if (IN1_param_value != NULL) {
 14820             if (IN1_param_value != NULL) {
 14813               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14821               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 ;
 14822               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             }
 14823             }
 14816             
 14824             
 14817             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14825             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14818             {
 14826             {
 14819         
 14827         
 14820                 {
 14828                 {
 14821                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14829                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14822                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14830                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14829                     if (IN2_param_value != NULL) {
 14837                     if (IN2_param_value != NULL) {
 14830                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14838                       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 ;
 14839                       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                     }
 14840                     }
 14833                     
 14841                     
 14834                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14842                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14835                     {
 14843                     {
 14836                 
 14844                 
 14837                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14845                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14838                         return return_type_symbol;
 14846                         return return_type_symbol;
 14839                         
 14847                         
 14847             
 14855             
 14848             
 14856             
 14849             ERROR;
 14857             ERROR;
 14850         }
 14858         }
 14851         
 14859         
 14852     }/*function_sub_tod_tod*/
 14860     }/*function_multime*/
 14853     break;
 14861     break;
 14854 
 14862 
 14855 /****
 14863 /****
 14856  *SUB_DT_TIME
 14864  *SUB_TIME
 14857  */
 14865  */
 14858     case function_sub_dt_time :
 14866     case function_sub_time :
 14859     {
 14867     {
 14860         symbol_c *last_type_symbol = NULL;
 14868         symbol_c *last_type_symbol = NULL;
 14861 
 14869 
 14862         {
 14870         {
 14863             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14871             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14871             if (IN1_param_value != NULL) {
 14879             if (IN1_param_value != NULL) {
 14872               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14880               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 ;
 14881               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             }
 14882             }
 14875             
 14883             
 14876             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14884             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14877             {
 14885             {
 14878         
 14886         
 14879                 {
 14887                 {
 14880                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14888                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14881                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14889                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14888                     if (IN2_param_value != NULL) {
 14896                     if (IN2_param_value != NULL) {
 14889                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14897                       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 ;
 14898                       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                     }
 14899                     }
 14892                     
 14900                     
 14893                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14901                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14894                     {
 14902                     {
 14895                 
 14903                 
 14896                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14904                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14897                         return return_type_symbol;
 14905                         return return_type_symbol;
 14898                         
 14906                         
 14899                     }
 14907                     }
 14900                     
 14908                     
 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                     
 14909                     
 14910                     ERROR;
 14910                     ERROR;
 14911                 }
 14911                 }
 14912                 
 14912                 
 14913             }
 14913             }
 14914             
 14914             
 14915             
 14915             
 14916             ERROR;
 14916             ERROR;
 14917         }
 14917         }
 14918         
 14918         
 14919     }/*function_sub_dt_time*/
 14919     }/*function_sub_time*/
 14920     break;
 14920     break;
 14921 
 14921 
 14922 /****
 14922 /****
 14923  *DIV
 14923  *SUB_DATE_DATE
 14924  */
 14924  */
 14925     case function_div :
 14925     case function_sub_date_date :
 14926     {
 14926     {
 14927         symbol_c *last_type_symbol = NULL;
 14927         symbol_c *last_type_symbol = NULL;
 14928 
 14928 
 14929         {
 14929         {
 14930             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14930             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 14938             if (IN1_param_value != NULL) {
 14938             if (IN1_param_value != NULL) {
 14939               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 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 ;
 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             }
 14941             }
 14942             
 14942             
 14943             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 14943             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14944             {
 14944             {
 14945         
 14945         
 14946                 {
 14946                 {
 14947                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 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 */
 14948                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14955                     if (IN2_param_value != NULL) {
 14955                     if (IN2_param_value != NULL) {
 14956                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 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                     }
 14958                     }
 14959                     
 14959                     
 14960                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 14960                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14961                     {
 14961                     {
 14962                 
 14962                 
 14963                         symbol_c * return_type_symbol = last_type_symbol;
 14963                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14964                         return return_type_symbol;
 14964                         return return_type_symbol;
 14965                         
 14965                         
 14966                     }
 14966                     }
 14967                     
 14967                     
 14968                     
 14968                     
 14969                     ERROR;
 14969                     ERROR;
 14970                 }
 14970                 }
 14971                 
 14971                 
 14972             }
 14972             }
 14973             
 14973             
 14974             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14974             
       
 14975             ERROR;
       
 14976         }
       
 14977         
       
 14978     }/*function_sub_date_date*/
       
 14979     break;
       
 14980 
       
 14981 /****
       
 14982  *SUB_TOD_TIME
       
 14983  */
       
 14984     case function_sub_tod_time :
       
 14985     {
       
 14986         symbol_c *last_type_symbol = NULL;
       
 14987 
       
 14988         {
       
 14989             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
       
 14990             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14991             symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name);
       
 14992             symbol_c *IN1_type_symbol = NULL;
       
 14993             
       
 14994             /* Get the value from a foo(<param_value>) style call */
       
 14995             if (IN1_param_value == NULL)
       
 14996               IN1_param_value = function_call_param_iterator.next_nf();
       
 14997             if (IN1_param_value != NULL) {
       
 14998               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14999               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 ;
       
 15000             }
       
 15001             
       
 15002             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14975             {
 15003             {
 14976         
 15004         
 14977                 {
 15005                 {
 14978                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15006                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 14979                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15007                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14986                     if (IN2_param_value != NULL) {
 15014                     if (IN2_param_value != NULL) {
 14987                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15015                       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 ;
 15016                       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                     }
 15017                     }
 14990                     
 15018                     
 14991                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 15019                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14992                     {
 15020                     {
 14993                 
 15021                 
 14994                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15022                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14995                         return return_type_symbol;
 15023                         return return_type_symbol;
 14996                         
 15024                         
 14997                     }
 15025                     }
 14998                     
 15026                     
 14999                     
 15027                     
 15004             
 15032             
 15005             
 15033             
 15006             ERROR;
 15034             ERROR;
 15007         }
 15035         }
 15008         
 15036         
 15009     }/*function_div*/
 15037     }/*function_sub_tod_time*/
 15010     break;
 15038     break;
 15011 
 15039 
 15012 /****
 15040 /****
 15013  *DIVTIME
 15041  *SUB_TOD_TOD
 15014  */
 15042  */
 15015     case function_divtime :
 15043     case function_sub_tod_tod :
 15016     {
 15044     {
 15017         symbol_c *last_type_symbol = NULL;
 15045         symbol_c *last_type_symbol = NULL;
 15018 
 15046 
 15019         {
 15047         {
 15020             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15048             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15028             if (IN1_param_value != NULL) {
 15056             if (IN1_param_value != NULL) {
 15029               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15057               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 ;
 15058               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             }
 15059             }
 15032             
 15060             
 15033             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 15061             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 15034             {
 15062             {
 15035         
 15063         
 15036                 {
 15064                 {
 15037                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15065                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15038                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15066                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15045                     if (IN2_param_value != NULL) {
 15073                     if (IN2_param_value != NULL) {
 15046                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15074                       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 ;
 15075                       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                     }
 15076                     }
 15049                     
 15077                     
 15050                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 15078                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 15051                     {
 15079                     {
 15052                 
 15080                 
 15053                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15081                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15054                         return return_type_symbol;
 15082                         return return_type_symbol;
 15055                         
 15083                         
 15063             
 15091             
 15064             
 15092             
 15065             ERROR;
 15093             ERROR;
 15066         }
 15094         }
 15067         
 15095         
 15068     }/*function_divtime*/
 15096     }/*function_sub_tod_tod*/
 15069     break;
 15097     break;
 15070 
 15098 
 15071 /****
 15099 /****
 15072  *MOD
 15100  *SUB_DT_TIME
 15073  */
 15101  */
 15074     case function_mod :
 15102     case function_sub_dt_time :
 15075     {
 15103     {
 15076         symbol_c *last_type_symbol = NULL;
 15104         symbol_c *last_type_symbol = NULL;
 15077 
 15105 
 15078         {
 15106         {
 15079             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15107             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15087             if (IN1_param_value != NULL) {
 15115             if (IN1_param_value != NULL) {
 15088               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15116               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15089               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 ;
 15117               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 ;
 15090             }
 15118             }
 15091             
 15119             
 15092             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 15120             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 15093             {
 15121             {
 15094         
 15122         
 15095                 {
 15123                 {
 15096                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15124                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15097                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15125                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15104                     if (IN2_param_value != NULL) {
 15132                     if (IN2_param_value != NULL) {
 15105                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15133                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 15106                       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 ;
 15134                       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 ;
 15107                     }
 15135                     }
 15108                     
 15136                     
 15109                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 15137                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 15110                     {
 15138                     {
 15111                 
 15139                 
 15112                         symbol_c * return_type_symbol = last_type_symbol;
 15140                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15113                         return return_type_symbol;
 15141                         return return_type_symbol;
 15114                         
 15142                         
 15115                     }
 15143                     }
 15116                     
 15144                     
       
 15145                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 15146                     {
       
 15147                 
       
 15148                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15149                         return return_type_symbol;
       
 15150                         
       
 15151                     }
       
 15152                     
 15117                     
 15153                     
 15118                     ERROR;
 15154                     ERROR;
 15119                 }
 15155                 }
 15120                 
 15156                 
 15121             }
 15157             }
 15122             
 15158             
 15123             
 15159             
 15124             ERROR;
 15160             ERROR;
 15125         }
 15161         }
 15126         
 15162         
 15127     }/*function_mod*/
 15163     }/*function_sub_dt_time*/
 15128     break;
 15164     break;
 15129 
 15165 
 15130 /****
 15166 /****
 15131  *EXPT
 15167  *DIVTIME
 15132  */
 15168  */
 15133     case function_expt :
 15169     case function_divtime :
 15134     {
 15170     {
 15135         symbol_c *last_type_symbol = NULL;
 15171         symbol_c *last_type_symbol = NULL;
 15136 
 15172 
 15137         {
 15173         {
 15138             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15174             symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1"));
 15146             if (IN1_param_value != NULL) {
 15182             if (IN1_param_value != NULL) {
 15147               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15183               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 15148               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 ;
 15184               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 ;
 15149             }
 15185             }
 15150             
 15186             
 15151             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
 15187             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 15152             {
 15188             {
 15153         
 15189         
 15154                 {
 15190                 {
 15155                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15191                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 15156                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15192                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 15166                     }
 15202                     }
 15167                     
 15203                     
 15168                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 15204                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 15169                     {
 15205                     {
 15170                 
 15206                 
 15171                         symbol_c * return_type_symbol = last_type_symbol;
 15207                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15172                         return return_type_symbol;
 15208                         return return_type_symbol;
 15173                         
 15209                         
 15174                     }
 15210                     }
 15175                     
 15211                     
 15176                     
 15212                     
 15181             
 15217             
 15182             
 15218             
 15183             ERROR;
 15219             ERROR;
 15184         }
 15220         }
 15185         
 15221         
 15186     }/*function_expt*/
 15222     }/*function_divtime*/
 15187     break;
       
 15188 
       
 15189 /****
       
 15190  *MOVE
       
 15191  */
       
 15192     case function_move :
       
 15193     {
       
 15194         symbol_c *last_type_symbol = NULL;
       
 15195 
       
 15196         {
       
 15197             symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN"));
       
 15198             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15199             symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name);
       
 15200             symbol_c *IN_type_symbol = NULL;
       
 15201             
       
 15202             /* Get the value from a foo(<param_value>) style call */
       
 15203             if (IN_param_value == NULL)
       
 15204               IN_param_value = function_call_param_iterator.next_nf();
       
 15205             if (IN_param_value != NULL) {
       
 15206               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15207               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15208             }
       
 15209             
       
 15210             
       
 15211             {
       
 15212         
       
 15213                 symbol_c * return_type_symbol = last_type_symbol;
       
 15214                 return return_type_symbol;
       
 15215                 
       
 15216             }
       
 15217             
       
 15218             
       
 15219             ERROR;
       
 15220         }
       
 15221         
       
 15222     }/*function_move*/
       
 15223     break;
 15223     break;
 15224 
 15224 
 15225 /****
 15225 /****
 15226  *SHL
 15226  *SHL
 15227  */
 15227  */
 27262         
 27262         
 27263     }/*function_add*/
 27263     }/*function_add*/
 27264     break;
 27264     break;
 27265 
 27265 
 27266 /****
 27266 /****
 27267  *ADD_TIME
 27267  *MUL
 27268  */
 27268  */
 27269     case function_add_time :
 27269     case function_mul :
 27270     {
 27270     {
 27271         symbol_c *last_type_symbol = NULL;
 27271         symbol_c *last_type_symbol = NULL;
 27272 
 27272 
 27273         {
 27273         {
 27274             symbol_c *IN1_type_symbol = param_data_type;
 27274             symbol_c *IN1_type_symbol = param_data_type;
 27275             last_type_symbol = param_data_type;
 27275             last_type_symbol = param_data_type;
 27276             
 27276             
 27277             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27277             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27278             {
 27278             {
 27279         
 27279         
 27280                 {
 27280                 {
 27281                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27281                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27282                     /* 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 */
 27289                     if (IN2_param_value != NULL) {
 27289                     if (IN2_param_value != NULL) {
 27290                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27290                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 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 ;
 27292                     }
 27292                     }
 27293                     
 27293                     
 27294                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27294                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27295                     {
 27295                     {
 27296                 
 27296                 
 27297                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27297                         symbol_c * return_type_symbol = last_type_symbol;
 27298                         return return_type_symbol;
 27298                         return return_type_symbol;
 27299                         
 27299                         
 27300                     }
 27300                     }
 27301                     
 27301                     
 27302                     
 27302                     
 27303                     ERROR;
 27303                     ERROR;
 27304                 }
 27304                 }
 27305                 
 27305                 
 27306             }
 27306             }
 27307             
 27307             
 27308             
 27308             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 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))
       
 27327             {
 27309             {
 27328         
 27310         
 27329                 {
 27311                 {
 27330                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27312                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27331                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27313                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27338                     if (IN2_param_value != NULL) {
 27320                     if (IN2_param_value != NULL) {
 27339                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27321                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27322                       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 ;
 27341                     }
 27323                     }
 27342                     
 27324                     
 27343                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27325                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27344                     {
 27326                     {
 27345                 
 27327                 
 27346                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 27328                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27347                         return return_type_symbol;
 27329                         return return_type_symbol;
 27348                         
 27330                         
 27349                     }
 27331                     }
 27350                     
 27332                     
 27351                     
 27333                     
 27356             
 27338             
 27357             
 27339             
 27358             ERROR;
 27340             ERROR;
 27359         }
 27341         }
 27360         
 27342         
 27361     }/*function_add_tod_time*/
 27343     }/*function_mul*/
 27362     break;
 27344     break;
 27363 
 27345 
 27364 /****
 27346 /****
 27365  *ADD_DT_TIME
 27347  *SUB
 27366  */
 27348  */
 27367     case function_add_dt_time :
 27349     case function_sub :
 27368     {
 27350     {
 27369         symbol_c *last_type_symbol = NULL;
 27351         symbol_c *last_type_symbol = NULL;
 27370 
 27352 
 27371         {
 27353         {
 27372             symbol_c *IN1_type_symbol = param_data_type;
 27354             symbol_c *IN1_type_symbol = param_data_type;
 27373             last_type_symbol = param_data_type;
 27355             last_type_symbol = param_data_type;
 27374             
 27356             
 27375             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27357             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27376             {
 27358             {
 27377         
 27359         
 27378                 {
 27360                 {
 27379                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27361                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27380                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27362                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27387                     if (IN2_param_value != NULL) {
 27369                     if (IN2_param_value != NULL) {
 27388                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27370                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27371                       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 ;
 27390                     }
 27372                     }
 27391                     
 27373                     
 27392                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27374                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27393                     {
 27375                     {
 27394                 
 27376                 
 27395                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 27377                         symbol_c * return_type_symbol = last_type_symbol;
 27396                         return return_type_symbol;
 27378                         return return_type_symbol;
 27397                         
 27379                         
 27398                     }
 27380                     }
 27399                     
 27381                     
 27400                     
 27382                     
 27401                     ERROR;
 27383                     ERROR;
 27402                 }
 27384                 }
 27403                 
 27385                 
 27404             }
 27386             }
 27405             
 27387             
 27406             
 27388             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 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))
       
 27425             {
 27389             {
 27426         
 27390         
 27427                 {
 27391                 {
 27428                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27392                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27429                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27393                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27436                     if (IN2_param_value != NULL) {
 27400                     if (IN2_param_value != NULL) {
 27437                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27401                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27402                       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 ;
 27439                     }
 27403                     }
 27440                     
 27404                     
 27441                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27405                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27442                     {
 27406                     {
 27443                 
 27407                 
 27444                         symbol_c * return_type_symbol = last_type_symbol;
 27408                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27445                         return return_type_symbol;
 27409                         return return_type_symbol;
 27446                         
 27410                         
 27447                     }
 27411                     }
 27448                     
 27412                     
 27449                     
 27413                     
 27450                     ERROR;
 27414                     ERROR;
 27451                 }
 27415                 }
 27452                 
 27416                 
 27453             }
 27417             }
 27454             
 27418             
 27455             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27419             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27456             {
 27420             {
 27457         
 27421         
 27458                 {
 27422                 {
 27459                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27423                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27424                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27467                     if (IN2_param_value != NULL) {
 27431                     if (IN2_param_value != NULL) {
 27468                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27432                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27433                       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 ;
 27470                     }
 27434                     }
 27471                     
 27435                     
 27472                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27436                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27473                     {
 27437                     {
 27474                 
 27438                 
 27475                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27439                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27476                         return return_type_symbol;
 27440                         return return_type_symbol;
 27477                         
 27441                         
 27478                     }
 27442                     }
 27479                     
 27443                     
       
 27444                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27445                     {
       
 27446                 
       
 27447                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 27448                         return return_type_symbol;
       
 27449                         
       
 27450                     }
       
 27451                     
 27480                     
 27452                     
 27481                     ERROR;
 27453                     ERROR;
 27482                 }
 27454                 }
 27483                 
 27455                 
 27484             }
 27456             }
 27485             
 27457             
 27486             
 27458             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 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))
       
 27505             {
 27459             {
 27506         
 27460         
 27507                 {
 27461                 {
 27508                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27462                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27509                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27463                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27516                     if (IN2_param_value != NULL) {
 27470                     if (IN2_param_value != NULL) {
 27517                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27471                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27472                       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 ;
 27519                     }
 27473                     }
 27520                     
 27474                     
 27521                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27475                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27522                     {
 27476                     {
 27523                 
 27477                 
 27524                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27478                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27525                         return return_type_symbol;
 27479                         return return_type_symbol;
 27526                         
 27480                         
 27527                     }
 27481                     }
 27528                     
 27482                     
       
 27483                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 27484                     {
       
 27485                 
       
 27486                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 27487                         return return_type_symbol;
       
 27488                         
       
 27489                     }
       
 27490                     
 27529                     
 27491                     
 27530                     ERROR;
 27492                     ERROR;
 27531                 }
 27493                 }
 27532                 
 27494                 
 27533             }
 27495             }
 27534             
 27496             
 27535             
 27497             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 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))
       
 27554             {
 27498             {
 27555         
 27499         
 27556                 {
 27500                 {
 27557                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27501                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27558                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27502                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27565                     if (IN2_param_value != NULL) {
 27509                     if (IN2_param_value != NULL) {
 27566                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27510                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27511                       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 ;
 27568                     }
 27512                     }
 27569                     
 27513                     
 27570                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27514                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27571                     {
 27515                     {
 27572                 
 27516                 
 27573                         symbol_c * return_type_symbol = last_type_symbol;
 27517                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27574                         return return_type_symbol;
 27518                         return return_type_symbol;
 27575                         
 27519                         
 27576                     }
 27520                     }
 27577                     
 27521                     
 27578                     
 27522                     
 27579                     ERROR;
 27523                     ERROR;
 27580                 }
 27524                 }
 27581                 
 27525                 
 27582             }
 27526             }
 27583             
 27527             
 27584             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27528             
       
 27529             ERROR;
       
 27530         }
       
 27531         
       
 27532     }/*function_sub*/
       
 27533     break;
       
 27534 
       
 27535 /****
       
 27536  *DIV
       
 27537  */
       
 27538     case function_div :
       
 27539     {
       
 27540         symbol_c *last_type_symbol = NULL;
       
 27541 
       
 27542         {
       
 27543             symbol_c *IN1_type_symbol = param_data_type;
       
 27544             last_type_symbol = param_data_type;
       
 27545             
       
 27546             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27585             {
 27547             {
 27586         
 27548         
 27587                 {
 27549                 {
 27588                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27550                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27589                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27551                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27596                     if (IN2_param_value != NULL) {
 27558                     if (IN2_param_value != NULL) {
 27597                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27559                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27560                       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 ;
 27599                     }
 27561                     }
 27600                     
 27562                     
 27601                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27563                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27602                     {
 27564                     {
 27603                 
 27565                 
 27604                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27566                         symbol_c * return_type_symbol = last_type_symbol;
 27605                         return return_type_symbol;
 27567                         return return_type_symbol;
 27606                         
 27568                         
 27607                     }
 27569                     }
 27608                     
 27570                     
 27609                     
 27571                     
 27610                     ERROR;
 27572                     ERROR;
 27611                 }
 27573                 }
 27612                 
 27574                 
 27613             }
 27575             }
 27614             
 27576             
 27615             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27577             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27616             {
 27578             {
 27617         
 27579         
 27618                 {
 27580                 {
 27619                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27581                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27620                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27582                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27627                     if (IN2_param_value != NULL) {
 27589                     if (IN2_param_value != NULL) {
 27628                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27590                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 27591                       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 ;
 27630                     }
 27592                     }
 27631                     
 27593                     
 27632                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27594                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27633                     {
 27595                     {
 27634                 
 27596                 
 27635                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27597                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27636                         return return_type_symbol;
 27598                         return return_type_symbol;
 27637                         
 27599                         
 27638                     }
 27600                     }
 27639                     
 27601                     
 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                     
       
 27648                     
 27602                     
 27649                     ERROR;
 27603                     ERROR;
 27650                 }
 27604                 }
 27651                 
 27605                 
 27652             }
 27606             }
 27653             
 27607             
 27654             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27608             
       
 27609             ERROR;
       
 27610         }
       
 27611         
       
 27612     }/*function_div*/
       
 27613     break;
       
 27614 
       
 27615 /****
       
 27616  *MOD
       
 27617  */
       
 27618     case function_mod :
       
 27619     {
       
 27620         symbol_c *last_type_symbol = NULL;
       
 27621 
       
 27622         {
       
 27623             symbol_c *IN1_type_symbol = param_data_type;
       
 27624             last_type_symbol = param_data_type;
       
 27625             
       
 27626             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27655             {
 27627             {
 27656         
 27628         
 27657                 {
 27629                 {
 27658                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27630                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27659                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27631                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27666                     if (IN2_param_value != NULL) {
 27638                     if (IN2_param_value != NULL) {
 27667                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27639                       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 ;
 27640                       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                     }
 27641                     }
 27670                     
 27642                     
 27671                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27643                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27672                     {
 27644                     {
 27673                 
 27645                 
 27674                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27646                         symbol_c * return_type_symbol = last_type_symbol;
 27675                         return return_type_symbol;
 27647                         return return_type_symbol;
 27676                         
 27648                         
 27677                     }
 27649                     }
 27678                     
 27650                     
 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                     
 27651                     
 27688                     ERROR;
 27652                     ERROR;
 27689                 }
 27653                 }
 27690                 
 27654                 
 27691             }
 27655             }
 27692             
 27656             
 27693             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27657             
       
 27658             ERROR;
       
 27659         }
       
 27660         
       
 27661     }/*function_mod*/
       
 27662     break;
       
 27663 
       
 27664 /****
       
 27665  *EXPT
       
 27666  */
       
 27667     case function_expt :
       
 27668     {
       
 27669         symbol_c *last_type_symbol = NULL;
       
 27670 
       
 27671         {
       
 27672             symbol_c *IN1_type_symbol = param_data_type;
       
 27673             last_type_symbol = param_data_type;
       
 27674             
       
 27675             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
 27694             {
 27676             {
 27695         
 27677         
 27696                 {
 27678                 {
 27697                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27679                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27698                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27680                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27705                     if (IN2_param_value != NULL) {
 27687                     if (IN2_param_value != NULL) {
 27706                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27688                       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 ;
 27689                       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                     }
 27690                     }
 27709                     
 27691                     
 27710                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27692                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27711                     {
 27693                     {
 27712                 
 27694                 
 27713                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27695                         symbol_c * return_type_symbol = last_type_symbol;
 27714                         return return_type_symbol;
 27696                         return return_type_symbol;
 27715                         
 27697                         
 27716                     }
 27698                     }
 27717                     
 27699                     
 27718                     
 27700                     
 27723             
 27705             
 27724             
 27706             
 27725             ERROR;
 27707             ERROR;
 27726         }
 27708         }
 27727         
 27709         
 27728     }/*function_sub*/
 27710     }/*function_expt*/
 27729     break;
 27711     break;
 27730 
 27712 
 27731 /****
 27713 /****
 27732  *SUB_TIME
 27714  *MOVE
 27733  */
 27715  */
 27734     case function_sub_time :
 27716     case function_move :
       
 27717     {
       
 27718         symbol_c *last_type_symbol = NULL;
       
 27719 
       
 27720         {
       
 27721             symbol_c *IN_type_symbol = param_data_type;
       
 27722             last_type_symbol = param_data_type;
       
 27723             
       
 27724             
       
 27725             {
       
 27726         
       
 27727                 symbol_c * return_type_symbol = last_type_symbol;
       
 27728                 return return_type_symbol;
       
 27729                 
       
 27730             }
       
 27731             
       
 27732             
       
 27733             ERROR;
       
 27734         }
       
 27735         
       
 27736     }/*function_move*/
       
 27737     break;
       
 27738 
       
 27739 /****
       
 27740  *ADD_TIME
       
 27741  */
       
 27742     case function_add_time :
 27735     {
 27743     {
 27736         symbol_c *last_type_symbol = NULL;
 27744         symbol_c *last_type_symbol = NULL;
 27737 
 27745 
 27738         {
 27746         {
 27739             symbol_c *IN1_type_symbol = param_data_type;
 27747             symbol_c *IN1_type_symbol = param_data_type;
 27772             
 27780             
 27773             
 27781             
 27774             ERROR;
 27782             ERROR;
 27775         }
 27783         }
 27776         
 27784         
 27777     }/*function_sub_time*/
 27785     }/*function_add_time*/
 27778     break;
 27786     break;
 27779 
 27787 
 27780 /****
 27788 /****
 27781  *SUB_DATE_DATE
 27789  *ADD_TOD_TIME
 27782  */
 27790  */
 27783     case function_sub_date_date :
 27791     case function_add_tod_time :
 27784     {
 27792     {
 27785         symbol_c *last_type_symbol = NULL;
 27793         symbol_c *last_type_symbol = NULL;
 27786 
 27794 
 27787         {
 27795         {
 27788             symbol_c *IN1_type_symbol = param_data_type;
 27796             symbol_c *IN1_type_symbol = param_data_type;
 27789             last_type_symbol = param_data_type;
 27797             last_type_symbol = param_data_type;
 27790             
 27798             
 27791             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27799             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27792             {
 27800             {
 27793         
 27801         
 27794                 {
 27802                 {
 27795                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27803                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27796                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27804                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27803                     if (IN2_param_value != NULL) {
 27811                     if (IN2_param_value != NULL) {
 27804                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27812                       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 ;
 27813                       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                     }
 27814                     }
 27807                     
 27815                     
 27808                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27816                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27809                     {
 27817                     {
 27810                 
 27818                 
 27811                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27819                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 27812                         return return_type_symbol;
 27820                         return return_type_symbol;
 27813                         
 27821                         
 27814                     }
 27822                     }
 27815                     
 27823                     
 27816                     
 27824                     
 27821             
 27829             
 27822             
 27830             
 27823             ERROR;
 27831             ERROR;
 27824         }
 27832         }
 27825         
 27833         
 27826     }/*function_sub_date_date*/
 27834     }/*function_add_tod_time*/
 27827     break;
 27835     break;
 27828 
 27836 
 27829 /****
 27837 /****
 27830  *SUB_TOD_TIME
 27838  *ADD_DT_TIME
 27831  */
 27839  */
 27832     case function_sub_tod_time :
 27840     case function_add_dt_time :
 27833     {
 27841     {
 27834         symbol_c *last_type_symbol = NULL;
 27842         symbol_c *last_type_symbol = NULL;
 27835 
 27843 
 27836         {
 27844         {
 27837             symbol_c *IN1_type_symbol = param_data_type;
 27845             symbol_c *IN1_type_symbol = param_data_type;
 27838             last_type_symbol = param_data_type;
 27846             last_type_symbol = param_data_type;
 27839             
 27847             
 27840             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27848             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27841             {
 27849             {
 27842         
 27850         
 27843                 {
 27851                 {
 27844                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27852                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27845                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27853                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27855                     }
 27863                     }
 27856                     
 27864                     
 27857                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27865                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27858                     {
 27866                     {
 27859                 
 27867                 
 27860                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 27868                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 27861                         return return_type_symbol;
 27869                         return return_type_symbol;
 27862                         
 27870                         
 27863                     }
 27871                     }
 27864                     
 27872                     
 27865                     
 27873                     
 27870             
 27878             
 27871             
 27879             
 27872             ERROR;
 27880             ERROR;
 27873         }
 27881         }
 27874         
 27882         
 27875     }/*function_sub_tod_time*/
 27883     }/*function_add_dt_time*/
 27876     break;
 27884     break;
 27877 
 27885 
 27878 /****
 27886 /****
 27879  *SUB_TOD_TOD
 27887  *MULTIME
 27880  */
 27888  */
 27881     case function_sub_tod_tod :
 27889     case function_multime :
 27882     {
 27890     {
 27883         symbol_c *last_type_symbol = NULL;
 27891         symbol_c *last_type_symbol = NULL;
 27884 
 27892 
 27885         {
 27893         {
 27886             symbol_c *IN1_type_symbol = param_data_type;
 27894             symbol_c *IN1_type_symbol = param_data_type;
 27887             last_type_symbol = param_data_type;
 27895             last_type_symbol = param_data_type;
 27888             
 27896             
 27889             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27897             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27890             {
 27898             {
 27891         
 27899         
 27892                 {
 27900                 {
 27893                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27901                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27894                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27902                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27901                     if (IN2_param_value != NULL) {
 27909                     if (IN2_param_value != NULL) {
 27902                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27910                       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 ;
 27911                       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                     }
 27912                     }
 27905                     
 27913                     
 27906                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 27914                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 27907                     {
 27915                     {
 27908                 
 27916                 
 27909                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27917                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27910                         return return_type_symbol;
 27918                         return return_type_symbol;
 27911                         
 27919                         
 27919             
 27927             
 27920             
 27928             
 27921             ERROR;
 27929             ERROR;
 27922         }
 27930         }
 27923         
 27931         
 27924     }/*function_sub_tod_tod*/
 27932     }/*function_multime*/
 27925     break;
 27933     break;
 27926 
 27934 
 27927 /****
 27935 /****
 27928  *SUB_DT_TIME
 27936  *SUB_TIME
 27929  */
 27937  */
 27930     case function_sub_dt_time :
 27938     case function_sub_time :
 27931     {
 27939     {
 27932         symbol_c *last_type_symbol = NULL;
 27940         symbol_c *last_type_symbol = NULL;
 27933 
 27941 
 27934         {
 27942         {
 27935             symbol_c *IN1_type_symbol = param_data_type;
 27943             symbol_c *IN1_type_symbol = param_data_type;
 27936             last_type_symbol = param_data_type;
 27944             last_type_symbol = param_data_type;
 27937             
 27945             
 27938             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27946             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27939             {
 27947             {
 27940         
 27948         
 27941                 {
 27949                 {
 27942                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27950                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 27943                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27951                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 27950                     if (IN2_param_value != NULL) {
 27958                     if (IN2_param_value != NULL) {
 27951                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 27959                       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 ;
 27960                       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                     }
 27961                     }
 27954                     
 27962                     
 27955                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 27963                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 27956                     {
 27964                     {
 27957                 
 27965                 
 27958                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27966                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 27959                         return return_type_symbol;
 27967                         return return_type_symbol;
 27960                         
 27968                         
 27961                     }
 27969                     }
 27962                     
 27970                     
 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                     
 27971                     
 27972                     ERROR;
 27972                     ERROR;
 27973                 }
 27973                 }
 27974                 
 27974                 
 27975             }
 27975             }
 27976             
 27976             
 27977             
 27977             
 27978             ERROR;
 27978             ERROR;
 27979         }
 27979         }
 27980         
 27980         
 27981     }/*function_sub_dt_time*/
 27981     }/*function_sub_time*/
 27982     break;
 27982     break;
 27983 
 27983 
 27984 /****
 27984 /****
 27985  *DIV
 27985  *SUB_DATE_DATE
 27986  */
 27986  */
 27987     case function_div :
 27987     case function_sub_date_date :
 27988     {
 27988     {
 27989         symbol_c *last_type_symbol = NULL;
 27989         symbol_c *last_type_symbol = NULL;
 27990 
 27990 
 27991         {
 27991         {
 27992             symbol_c *IN1_type_symbol = param_data_type;
 27992             symbol_c *IN1_type_symbol = param_data_type;
 27993             last_type_symbol = param_data_type;
 27993             last_type_symbol = param_data_type;
 27994             
 27994             
 27995             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 27995             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 27996             {
 27996             {
 27997         
 27997         
 27998                 {
 27998                 {
 27999                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 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 */
 28000                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28007                     if (IN2_param_value != NULL) {
 28007                     if (IN2_param_value != NULL) {
 28008                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 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 ;
 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                     }
 28010                     }
 28011                     
 28011                     
 28012                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28012                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 28013                     {
 28013                     {
 28014                 
 28014                 
 28015                         symbol_c * return_type_symbol = last_type_symbol;
 28015                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28016                         return return_type_symbol;
 28016                         return return_type_symbol;
 28017                         
 28017                         
 28018                     }
 28018                     }
 28019                     
 28019                     
 28020                     
 28020                     
 28021                     ERROR;
 28021                     ERROR;
 28022                 }
 28022                 }
 28023                 
 28023                 
 28024             }
 28024             }
 28025             
 28025             
 28026             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 28026             
       
 28027             ERROR;
       
 28028         }
       
 28029         
       
 28030     }/*function_sub_date_date*/
       
 28031     break;
       
 28032 
       
 28033 /****
       
 28034  *SUB_TOD_TIME
       
 28035  */
       
 28036     case function_sub_tod_time :
       
 28037     {
       
 28038         symbol_c *last_type_symbol = NULL;
       
 28039 
       
 28040         {
       
 28041             symbol_c *IN1_type_symbol = param_data_type;
       
 28042             last_type_symbol = param_data_type;
       
 28043             
       
 28044             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 28027             {
 28045             {
 28028         
 28046         
 28029                 {
 28047                 {
 28030                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28048                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28031                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28049                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28038                     if (IN2_param_value != NULL) {
 28056                     if (IN2_param_value != NULL) {
 28039                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28057                       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 ;
 28058                       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                     }
 28059                     }
 28042                     
 28060                     
 28043                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28061                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 28044                     {
 28062                     {
 28045                 
 28063                 
 28046                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28064                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 28047                         return return_type_symbol;
 28065                         return return_type_symbol;
 28048                         
 28066                         
 28049                     }
 28067                     }
 28050                     
 28068                     
 28051                     
 28069                     
 28056             
 28074             
 28057             
 28075             
 28058             ERROR;
 28076             ERROR;
 28059         }
 28077         }
 28060         
 28078         
 28061     }/*function_div*/
 28079     }/*function_sub_tod_time*/
 28062     break;
 28080     break;
 28063 
 28081 
 28064 /****
 28082 /****
 28065  *DIVTIME
 28083  *SUB_TOD_TOD
 28066  */
 28084  */
 28067     case function_divtime :
 28085     case function_sub_tod_tod :
 28068     {
 28086     {
 28069         symbol_c *last_type_symbol = NULL;
 28087         symbol_c *last_type_symbol = NULL;
 28070 
 28088 
 28071         {
 28089         {
 28072             symbol_c *IN1_type_symbol = param_data_type;
 28090             symbol_c *IN1_type_symbol = param_data_type;
 28073             last_type_symbol = param_data_type;
 28091             last_type_symbol = param_data_type;
 28074             
 28092             
 28075             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 28093             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 28076             {
 28094             {
 28077         
 28095         
 28078                 {
 28096                 {
 28079                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28097                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28080                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28098                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28087                     if (IN2_param_value != NULL) {
 28105                     if (IN2_param_value != NULL) {
 28088                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28106                       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 ;
 28107                       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                     }
 28108                     }
 28091                     
 28109                     
 28092                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28110                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 28093                     {
 28111                     {
 28094                 
 28112                 
 28095                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28113                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28096                         return return_type_symbol;
 28114                         return return_type_symbol;
 28097                         
 28115                         
 28105             
 28123             
 28106             
 28124             
 28107             ERROR;
 28125             ERROR;
 28108         }
 28126         }
 28109         
 28127         
 28110     }/*function_divtime*/
 28128     }/*function_sub_tod_tod*/
 28111     break;
 28129     break;
 28112 
 28130 
 28113 /****
 28131 /****
 28114  *MOD
 28132  *SUB_DT_TIME
 28115  */
 28133  */
 28116     case function_mod :
 28134     case function_sub_dt_time :
 28117     {
 28135     {
 28118         symbol_c *last_type_symbol = NULL;
 28136         symbol_c *last_type_symbol = NULL;
 28119 
 28137 
 28120         {
 28138         {
 28121             symbol_c *IN1_type_symbol = param_data_type;
 28139             symbol_c *IN1_type_symbol = param_data_type;
 28122             last_type_symbol = param_data_type;
 28140             last_type_symbol = param_data_type;
 28123             
 28141             
 28124             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
 28142             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 28125             {
 28143             {
 28126         
 28144         
 28127                 {
 28145                 {
 28128                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28146                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28129                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28147                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28136                     if (IN2_param_value != NULL) {
 28154                     if (IN2_param_value != NULL) {
 28137                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28155                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 28138                       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 ;
 28156                       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 ;
 28139                     }
 28157                     }
 28140                     
 28158                     
 28141                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28159                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 28142                     {
 28160                     {
 28143                 
 28161                 
 28144                         symbol_c * return_type_symbol = last_type_symbol;
 28162                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28145                         return return_type_symbol;
 28163                         return return_type_symbol;
 28146                         
 28164                         
 28147                     }
 28165                     }
 28148                     
 28166                     
       
 28167                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 28168                     {
       
 28169                 
       
 28170                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 28171                         return return_type_symbol;
       
 28172                         
       
 28173                     }
       
 28174                     
 28149                     
 28175                     
 28150                     ERROR;
 28176                     ERROR;
 28151                 }
 28177                 }
 28152                 
 28178                 
 28153             }
 28179             }
 28154             
 28180             
 28155             
 28181             
 28156             ERROR;
 28182             ERROR;
 28157         }
 28183         }
 28158         
 28184         
 28159     }/*function_mod*/
 28185     }/*function_sub_dt_time*/
 28160     break;
 28186     break;
 28161 
 28187 
 28162 /****
 28188 /****
 28163  *EXPT
 28189  *DIVTIME
 28164  */
 28190  */
 28165     case function_expt :
 28191     case function_divtime :
 28166     {
 28192     {
 28167         symbol_c *last_type_symbol = NULL;
 28193         symbol_c *last_type_symbol = NULL;
 28168 
 28194 
 28169         {
 28195         {
 28170             symbol_c *IN1_type_symbol = param_data_type;
 28196             symbol_c *IN1_type_symbol = param_data_type;
 28171             last_type_symbol = param_data_type;
 28197             last_type_symbol = param_data_type;
 28172             
 28198             
 28173             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
 28199             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 28174             {
 28200             {
 28175         
 28201         
 28176                 {
 28202                 {
 28177                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28203                     symbol_c *IN2_param_name = (symbol_c *)(new identifier_c("IN2"));
 28178                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28204                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 28188                     }
 28214                     }
 28189                     
 28215                     
 28190                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28216                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
 28191                     {
 28217                     {
 28192                 
 28218                 
 28193                         symbol_c * return_type_symbol = last_type_symbol;
 28219                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 28194                         return return_type_symbol;
 28220                         return return_type_symbol;
 28195                         
 28221                         
 28196                     }
 28222                     }
 28197                     
 28223                     
 28198                     
 28224                     
 28203             
 28229             
 28204             
 28230             
 28205             ERROR;
 28231             ERROR;
 28206         }
 28232         }
 28207         
 28233         
 28208     }/*function_expt*/
 28234     }/*function_divtime*/
 28209     break;
       
 28210 
       
 28211 /****
       
 28212  *MOVE
       
 28213  */
       
 28214     case function_move :
       
 28215     {
       
 28216         symbol_c *last_type_symbol = NULL;
       
 28217 
       
 28218         {
       
 28219             symbol_c *IN_type_symbol = param_data_type;
       
 28220             last_type_symbol = param_data_type;
       
 28221             
       
 28222             
       
 28223             {
       
 28224         
       
 28225                 symbol_c * return_type_symbol = last_type_symbol;
       
 28226                 return return_type_symbol;
       
 28227                 
       
 28228             }
       
 28229             
       
 28230             
       
 28231             ERROR;
       
 28232         }
       
 28233         
       
 28234     }/*function_move*/
       
 28235     break;
 28235     break;
 28236 
 28236 
 28237 /****
 28237 /****
 28238  *SHL
 28238  *SHL
 28239  */
 28239  */