diff -r 90c3772e6547 -r 41d4ac0b4821 absyntax_utils/search_type_code.c --- a/absyntax_utils/search_type_code.c Mon Jun 06 14:05:28 2011 +0100 +++ b/absyntax_utils/search_type_code.c Mon Jun 06 16:28:41 2011 +0200 @@ -14092,9 +14092,9 @@ break; /**** - *ADD_TIME - */ - case function_add_time : + *MUL + */ + case function_mul : { symbol_c *last_type_symbol = NULL; @@ -14112,7 +14112,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -14129,10 +14129,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -14143,35 +14143,7 @@ } - - ERROR; - } - - }/*function_add_time*/ - break; - -/**** - *ADD_TOD_TIME - */ - case function_add_tod_time : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); - /* Get the value from a foo( = ) style call */ - symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); - symbol_c *IN1_type_symbol = NULL; - - /* Get the value from a foo() style call */ - if (IN1_param_value == NULL) - IN1_param_value = function_call_param_iterator.next_nf(); - if (IN1_param_value != NULL) { - IN1_type_symbol = search_expression_type->get_type(IN1_param_value); - 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 ; - } - - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -14188,10 +14160,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -14206,13 +14178,13 @@ ERROR; } - }/*function_add_tod_time*/ - break; - -/**** - *ADD_DT_TIME - */ - case function_add_dt_time : + }/*function_mul*/ + break; + +/**** + *SUB + */ + case function_sub : { symbol_c *last_type_symbol = NULL; @@ -14230,7 +14202,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -14247,10 +14219,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -14261,35 +14233,7 @@ } - - ERROR; - } - - }/*function_add_dt_time*/ - break; - -/**** - *MUL - */ - case function_mul : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); - /* Get the value from a foo( = ) style call */ - symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); - symbol_c *IN1_type_symbol = NULL; - - /* Get the value from a foo() style call */ - if (IN1_param_value == NULL) - IN1_param_value = function_call_param_iterator.next_nf(); - if (IN1_param_value != NULL) { - IN1_type_symbol = search_expression_type->get_type(IN1_param_value); - 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 ; - } - - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { { @@ -14306,10 +14250,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -14320,7 +14264,7 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -14337,7 +14281,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -14345,41 +14289,21 @@ } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + return return_type_symbol; + + } + ERROR; } } - - ERROR; - } - - }/*function_mul*/ - break; - -/**** - *MULTIME - */ - case function_multime : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); - /* Get the value from a foo( = ) style call */ - symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); - symbol_c *IN1_type_symbol = NULL; - - /* Get the value from a foo() style call */ - if (IN1_param_value == NULL) - IN1_param_value = function_call_param_iterator.next_nf(); - if (IN1_param_value != NULL) { - IN1_type_symbol = search_expression_type->get_type(IN1_param_value); - 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 ; - } - - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -14396,7 +14320,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -14404,41 +14328,21 @@ } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + return return_type_symbol; + + } + ERROR; } } - - ERROR; - } - - }/*function_multime*/ - break; - -/**** - *SUB - */ - case function_sub : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); - /* Get the value from a foo( = ) style call */ - symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); - symbol_c *IN1_type_symbol = NULL; - - /* Get the value from a foo() style call */ - if (IN1_param_value == NULL) - IN1_param_value = function_call_param_iterator.next_nf(); - if (IN1_param_value != NULL) { - IN1_type_symbol = search_expression_type->get_type(IN1_param_value); - 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 ; - } - - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -14455,10 +14359,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -14469,7 +14373,35 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_sub*/ + break; + +/**** + *DIV + */ + case function_div : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); + /* Get the value from a foo( = ) style call */ + symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); + symbol_c *IN1_type_symbol = NULL; + + /* Get the value from a foo() style call */ + if (IN1_param_value == NULL) + IN1_param_value = function_call_param_iterator.next_nf(); + if (IN1_param_value != NULL) { + IN1_type_symbol = search_expression_type->get_type(IN1_param_value); + 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 ; + } + + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -14486,10 +14418,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -14500,7 +14432,7 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -14517,7 +14449,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -14525,21 +14457,41 @@ } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; - return return_type_symbol; - - } - ERROR; } } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_div*/ + break; + +/**** + *MOD + */ + case function_mod : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); + /* Get the value from a foo( = ) style call */ + symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); + symbol_c *IN1_type_symbol = NULL; + + /* Get the value from a foo() style call */ + if (IN1_param_value == NULL) + IN1_param_value = function_call_param_iterator.next_nf(); + if (IN1_param_value != NULL) { + IN1_type_symbol = search_expression_type->get_type(IN1_param_value); + 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 ; + } + + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -14556,29 +14508,49 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; - return return_type_symbol; - - } - ERROR; } } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_mod*/ + break; + +/**** + *EXPT + */ + case function_expt : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); + /* Get the value from a foo( = ) style call */ + symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); + symbol_c *IN1_type_symbol = NULL; + + /* Get the value from a foo() style call */ + if (IN1_param_value == NULL) + IN1_param_value = function_call_param_iterator.next_nf(); + if (IN1_param_value != NULL) { + IN1_type_symbol = search_expression_type->get_type(IN1_param_value); + 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 ; + } + + if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) { { @@ -14595,10 +14567,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -14613,13 +14585,49 @@ ERROR; } - }/*function_sub*/ - break; - -/**** - *SUB_TIME - */ - case function_sub_time : + }/*function_expt*/ + break; + +/**** + *MOVE + */ + case function_move : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); + /* Get the value from a foo( = ) style call */ + symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name); + symbol_c *IN_type_symbol = NULL; + + /* Get the value from a foo() style call */ + if (IN_param_value == NULL) + IN_param_value = function_call_param_iterator.next_nf(); + if (IN_param_value != NULL) { + IN_type_symbol = search_expression_type->get_type(IN_param_value); + last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; + } + + + { + + symbol_c * return_type_symbol = last_type_symbol; + return return_type_symbol; + + } + + + ERROR; + } + + }/*function_move*/ + break; + +/**** + *ADD_TIME + */ + case function_add_time : { symbol_c *last_type_symbol = NULL; @@ -14672,13 +14680,13 @@ ERROR; } - }/*function_sub_time*/ - break; - -/**** - *SUB_DATE_DATE - */ - case function_sub_date_date : + }/*function_add_time*/ + break; + +/**** + *ADD_TOD_TIME + */ + case function_add_tod_time : { symbol_c *last_type_symbol = NULL; @@ -14696,7 +14704,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -14713,10 +14721,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; return return_type_symbol; } @@ -14731,13 +14739,13 @@ ERROR; } - }/*function_sub_date_date*/ - break; - -/**** - *SUB_TOD_TIME - */ - case function_sub_tod_time : + }/*function_add_tod_time*/ + break; + +/**** + *ADD_DT_TIME + */ + case function_add_dt_time : { symbol_c *last_type_symbol = NULL; @@ -14755,7 +14763,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -14775,7 +14783,7 @@ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; return return_type_symbol; } @@ -14790,13 +14798,13 @@ ERROR; } - }/*function_sub_tod_time*/ - break; - -/**** - *SUB_TOD_TOD - */ - case function_sub_tod_tod : + }/*function_add_dt_time*/ + break; + +/**** + *MULTIME + */ + case function_multime : { symbol_c *last_type_symbol = NULL; @@ -14814,7 +14822,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -14831,7 +14839,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -14849,13 +14857,13 @@ ERROR; } - }/*function_sub_tod_tod*/ - break; - -/**** - *SUB_DT_TIME - */ - case function_sub_dt_time : + }/*function_multime*/ + break; + +/**** + *SUB_TIME + */ + case function_sub_time : { symbol_c *last_type_symbol = NULL; @@ -14873,7 +14881,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -14890,7 +14898,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -14898,14 +14906,6 @@ } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; - return return_type_symbol; - - } - ERROR; } @@ -14916,13 +14916,13 @@ ERROR; } - }/*function_sub_dt_time*/ - break; - -/**** - *DIV - */ - case function_div : + }/*function_sub_time*/ + break; + +/**** + *SUB_DATE_DATE + */ + case function_sub_date_date : { symbol_c *last_type_symbol = NULL; @@ -14940,7 +14940,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { { @@ -14957,10 +14957,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -14971,7 +14971,35 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_sub_date_date*/ + break; + +/**** + *SUB_TOD_TIME + */ + case function_sub_tod_time : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_param_name = (symbol_c *)(new identifier_c("IN1")); + /* Get the value from a foo( = ) style call */ + symbol_c *IN1_param_value = function_call_param_iterator.search_f(IN1_param_name); + symbol_c *IN1_type_symbol = NULL; + + /* Get the value from a foo() style call */ + if (IN1_param_value == NULL) + IN1_param_value = function_call_param_iterator.next_nf(); + if (IN1_param_value != NULL) { + IN1_type_symbol = search_expression_type->get_type(IN1_param_value); + 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 ; + } + + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -14988,10 +15016,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; return return_type_symbol; } @@ -15006,13 +15034,13 @@ ERROR; } - }/*function_div*/ - break; - -/**** - *DIVTIME - */ - case function_divtime : + }/*function_sub_tod_time*/ + break; + +/**** + *SUB_TOD_TOD + */ + case function_sub_tod_tod : { symbol_c *last_type_symbol = NULL; @@ -15030,7 +15058,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -15047,7 +15075,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -15065,13 +15093,13 @@ ERROR; } - }/*function_divtime*/ - break; - -/**** - *MOD - */ - case function_mod : + }/*function_sub_tod_tod*/ + break; + +/**** + *SUB_DT_TIME + */ + case function_sub_dt_time : { symbol_c *last_type_symbol = NULL; @@ -15089,7 +15117,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -15106,14 +15134,22 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + return return_type_symbol; + + } + ERROR; } @@ -15124,13 +15160,13 @@ ERROR; } - }/*function_mod*/ - break; - -/**** - *EXPT - */ - case function_expt : + }/*function_sub_dt_time*/ + break; + +/**** + *DIVTIME + */ + case function_divtime : { symbol_c *last_type_symbol = NULL; @@ -15148,7 +15184,7 @@ 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 ; } - if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -15168,7 +15204,7 @@ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -15183,43 +15219,7 @@ ERROR; } - }/*function_expt*/ - break; - -/**** - *MOVE - */ - case function_move : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN_param_name = (symbol_c *)(new identifier_c("IN")); - /* Get the value from a foo( = ) style call */ - symbol_c *IN_param_value = function_call_param_iterator.search_f(IN_param_name); - symbol_c *IN_type_symbol = NULL; - - /* Get the value from a foo() style call */ - if (IN_param_value == NULL) - IN_param_value = function_call_param_iterator.next_nf(); - if (IN_param_value != NULL) { - IN_type_symbol = search_expression_type->get_type(IN_param_value); - last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; - } - - - { - - symbol_c * return_type_symbol = last_type_symbol; - return return_type_symbol; - - } - - - ERROR; - } - - }/*function_move*/ + }/*function_divtime*/ break; /**** @@ -27264,9 +27264,9 @@ break; /**** - *ADD_TIME - */ - case function_add_time : + *MUL + */ + case function_mul : { symbol_c *last_type_symbol = NULL; @@ -27274,7 +27274,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -27291,10 +27291,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -27305,25 +27305,7 @@ } - - ERROR; - } - - }/*function_add_time*/ - break; - -/**** - *ADD_TOD_TIME - */ - case function_add_tod_time : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_type_symbol = param_data_type; - last_type_symbol = param_data_type; - - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -27340,10 +27322,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -27358,13 +27340,13 @@ ERROR; } - }/*function_add_tod_time*/ - break; - -/**** - *ADD_DT_TIME - */ - case function_add_dt_time : + }/*function_mul*/ + break; + +/**** + *SUB + */ + case function_sub : { symbol_c *last_type_symbol = NULL; @@ -27372,7 +27354,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -27389,10 +27371,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -27403,25 +27385,7 @@ } - - ERROR; - } - - }/*function_add_dt_time*/ - break; - -/**** - *MUL - */ - case function_mul : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_type_symbol = param_data_type; - last_type_symbol = param_data_type; - - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { { @@ -27438,10 +27402,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -27452,7 +27416,7 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -27469,7 +27433,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -27477,31 +27441,21 @@ } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + return return_type_symbol; + + } + ERROR; } } - - ERROR; - } - - }/*function_mul*/ - break; - -/**** - *MULTIME - */ - case function_multime : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_type_symbol = param_data_type; - last_type_symbol = param_data_type; - - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -27518,7 +27472,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -27526,31 +27480,21 @@ } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + return return_type_symbol; + + } + ERROR; } } - - ERROR; - } - - }/*function_multime*/ - break; - -/**** - *SUB - */ - case function_sub : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN1_type_symbol = param_data_type; - last_type_symbol = param_data_type; - - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -27567,10 +27511,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -27581,7 +27525,25 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_sub*/ + break; + +/**** + *DIV + */ + case function_div : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_type_symbol = param_data_type; + last_type_symbol = param_data_type; + + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -27598,10 +27560,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -27612,7 +27574,7 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -27629,7 +27591,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -27637,21 +27599,31 @@ } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; - return return_type_symbol; - - } - ERROR; } } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_div*/ + break; + +/**** + *MOD + */ + case function_mod : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_type_symbol = param_data_type; + last_type_symbol = param_data_type; + + if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) { { @@ -27668,29 +27640,39 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; - return return_type_symbol; - - } - ERROR; } } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_mod*/ + break; + +/**** + *EXPT + */ + case function_expt : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_type_symbol = param_data_type; + last_type_symbol = param_data_type; + + if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) { { @@ -27707,10 +27689,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = last_type_symbol; return return_type_symbol; } @@ -27725,13 +27707,39 @@ ERROR; } - }/*function_sub*/ - break; - -/**** - *SUB_TIME - */ - case function_sub_time : + }/*function_expt*/ + break; + +/**** + *MOVE + */ + case function_move : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN_type_symbol = param_data_type; + last_type_symbol = param_data_type; + + + { + + symbol_c * return_type_symbol = last_type_symbol; + return return_type_symbol; + + } + + + ERROR; + } + + }/*function_move*/ + break; + +/**** + *ADD_TIME + */ + case function_add_time : { symbol_c *last_type_symbol = NULL; @@ -27774,13 +27782,13 @@ ERROR; } - }/*function_sub_time*/ - break; - -/**** - *SUB_DATE_DATE - */ - case function_sub_date_date : + }/*function_add_time*/ + break; + +/**** + *ADD_TOD_TIME + */ + case function_add_tod_time : { symbol_c *last_type_symbol = NULL; @@ -27788,7 +27796,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -27805,10 +27813,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; return return_type_symbol; } @@ -27823,13 +27831,13 @@ ERROR; } - }/*function_sub_date_date*/ - break; - -/**** - *SUB_TOD_TIME - */ - case function_sub_tod_time : + }/*function_add_tod_time*/ + break; + +/**** + *ADD_DT_TIME + */ + case function_add_dt_time : { symbol_c *last_type_symbol = NULL; @@ -27837,7 +27845,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -27857,7 +27865,7 @@ if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; return return_type_symbol; } @@ -27872,13 +27880,13 @@ ERROR; } - }/*function_sub_tod_time*/ - break; - -/**** - *SUB_TOD_TOD - */ - case function_sub_tod_tod : + }/*function_add_dt_time*/ + break; + +/**** + *MULTIME + */ + case function_multime : { symbol_c *last_type_symbol = NULL; @@ -27886,7 +27894,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -27903,7 +27911,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -27921,13 +27929,13 @@ ERROR; } - }/*function_sub_tod_tod*/ - break; - -/**** - *SUB_DT_TIME - */ - case function_sub_dt_time : + }/*function_multime*/ + break; + +/**** + *SUB_TIME + */ + case function_sub_time : { symbol_c *last_type_symbol = NULL; @@ -27935,7 +27943,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -27952,7 +27960,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -27960,14 +27968,6 @@ } - if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) - { - - symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; - return return_type_symbol; - - } - ERROR; } @@ -27978,13 +27978,13 @@ ERROR; } - }/*function_sub_dt_time*/ - break; - -/**** - *DIV - */ - case function_div : + }/*function_sub_time*/ + break; + +/**** + *SUB_DATE_DATE + */ + case function_sub_date_date : { symbol_c *last_type_symbol = NULL; @@ -27992,7 +27992,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { { @@ -28009,10 +28009,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -28023,7 +28023,25 @@ } - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + + ERROR; + } + + }/*function_sub_date_date*/ + break; + +/**** + *SUB_TOD_TIME + */ + case function_sub_tod_time : + { + symbol_c *last_type_symbol = NULL; + + { + symbol_c *IN1_type_symbol = param_data_type; + last_type_symbol = param_data_type; + + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -28040,10 +28058,10 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; + symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; return return_type_symbol; } @@ -28058,13 +28076,13 @@ ERROR; } - }/*function_div*/ - break; - -/**** - *DIVTIME - */ - case function_divtime : + }/*function_sub_tod_time*/ + break; + +/**** + *SUB_TOD_TOD + */ + case function_sub_tod_tod : { symbol_c *last_type_symbol = NULL; @@ -28072,7 +28090,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { { @@ -28089,7 +28107,7 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) { symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; @@ -28107,13 +28125,13 @@ ERROR; } - }/*function_divtime*/ - break; - -/**** - *MOD - */ - case function_mod : + }/*function_sub_tod_tod*/ + break; + +/**** + *SUB_DT_TIME + */ + case function_sub_dt_time : { symbol_c *last_type_symbol = NULL; @@ -28121,7 +28139,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { { @@ -28138,14 +28156,22 @@ 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 ; } - if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } + if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) + { + + symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; + return return_type_symbol; + + } + ERROR; } @@ -28156,13 +28182,13 @@ ERROR; } - }/*function_mod*/ - break; - -/**** - *EXPT - */ - case function_expt : + }/*function_sub_dt_time*/ + break; + +/**** + *DIVTIME + */ + case function_divtime : { symbol_c *last_type_symbol = NULL; @@ -28170,7 +28196,7 @@ symbol_c *IN1_type_symbol = param_data_type; last_type_symbol = param_data_type; - if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) + if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) { { @@ -28190,7 +28216,7 @@ if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) { - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; return return_type_symbol; } @@ -28205,33 +28231,7 @@ ERROR; } - }/*function_expt*/ - break; - -/**** - *MOVE - */ - case function_move : - { - symbol_c *last_type_symbol = NULL; - - { - symbol_c *IN_type_symbol = param_data_type; - last_type_symbol = param_data_type; - - - { - - symbol_c * return_type_symbol = last_type_symbol; - return return_type_symbol; - - } - - - ERROR; - } - - }/*function_move*/ + }/*function_divtime*/ break; /****