stage4/generate_cc/st_code_gen.c
author etisserant
Tue, 17 Jul 2007 12:19:59 +0200
changeset 42 b45c7f34dec1
parent 41 8998c8b24b60
child 43 37dd4e2fd2ec
permissions -rw-r--r--
IEC std lib test enhanced string ops, from string and to string conv.
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     1
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     2
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     3
 * IEC 61131-3 standard function lib
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     4
 * generated code, do not edit by hand
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     5
 */
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     6
switch(current_function_type){
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     7
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
     8
/****
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
     9
 *BOOL_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    10
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    11
    case function_bool_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    12
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    13
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    14
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    15
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    16
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    17
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    18
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    19
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    20
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    21
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    22
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    23
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    24
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    25
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
    26
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    27
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    28
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    29
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    30
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    31
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    32
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    33
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    34
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    35
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    36
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    37
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    38
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    39
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    40
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    41
    }/*function_bool_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    42
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    43
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    44
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    45
 *BOOL_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    46
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    47
    case function_bool_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    48
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    49
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    50
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    51
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    52
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    53
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    54
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    55
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    56
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    57
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    58
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    59
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    60
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    61
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
    62
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    63
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    64
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    65
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    66
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    67
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    68
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    69
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    70
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    71
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    72
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    73
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    74
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    75
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    76
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    77
    }/*function_bool_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    78
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    79
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    80
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    81
 *BOOL_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    82
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    83
    case function_bool_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    84
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    85
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    86
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    87
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    88
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    89
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    90
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    91
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    92
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    93
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    94
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    95
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    96
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    97
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
    98
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
    99
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   100
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   101
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   102
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   103
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   104
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   105
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   106
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   107
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   108
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   109
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   110
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   111
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   112
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   113
    }/*function_bool_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   114
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   115
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   116
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   117
 *BOOL_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   118
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   119
    case function_bool_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   120
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   121
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   122
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   123
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   124
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   125
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   126
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   127
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   128
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   129
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   130
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   131
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   132
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   133
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   134
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   135
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   136
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   137
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   138
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   139
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   140
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   141
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   142
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   143
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   144
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   145
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   146
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   147
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   148
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   149
    }/*function_bool_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   150
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   151
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   152
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   153
 *BOOL_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   154
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   155
    case function_bool_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   156
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   157
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   158
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   159
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   160
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   161
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   162
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   163
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   164
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   165
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   166
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   167
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   168
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   169
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   170
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   171
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   172
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   173
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   174
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   175
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   176
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   177
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   178
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   179
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   180
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   181
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   182
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   183
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   184
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   185
    }/*function_bool_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   186
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   187
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   188
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   189
 *BOOL_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   190
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   191
    case function_bool_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   192
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   193
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   194
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   195
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   196
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   197
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   198
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   199
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   200
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   201
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   202
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   203
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   204
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   205
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   206
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   207
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   208
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   209
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   210
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   211
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   212
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   213
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   214
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   215
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   216
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   217
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   218
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   219
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   220
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   221
    }/*function_bool_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   222
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   223
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   224
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   225
 *BOOL_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   226
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   227
    case function_bool_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   228
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   229
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   230
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   231
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   232
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   233
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   234
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   235
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   236
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   237
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   238
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   239
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   240
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   241
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   242
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   243
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   244
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   245
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   246
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   247
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   248
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   249
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   250
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   251
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   252
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   253
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   254
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   255
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   256
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   257
    }/*function_bool_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   258
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   259
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   260
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   261
 *BOOL_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   262
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   263
    case function_bool_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   264
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   265
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   266
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   267
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   268
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   269
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   270
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   271
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   272
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   273
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   274
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   275
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   276
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   277
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   278
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   279
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   280
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   281
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   282
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   283
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   284
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   285
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   286
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   287
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   288
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   289
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   290
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   291
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   292
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   293
    }/*function_bool_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   294
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   295
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   296
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   297
 *BOOL_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   298
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   299
    case function_bool_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   300
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   301
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   302
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   303
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   304
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   305
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   306
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   307
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   308
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   309
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   310
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   311
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   312
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   313
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   314
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   315
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   316
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   317
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   318
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   319
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   320
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   321
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   322
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   323
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   324
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   325
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   326
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   327
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   328
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   329
    }/*function_bool_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   330
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   331
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   332
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   333
 *BOOL_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   334
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   335
    case function_bool_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   336
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   337
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   338
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   339
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   340
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   341
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   342
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   343
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   344
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   345
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   346
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   347
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   348
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   349
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   350
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   351
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   352
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   353
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   354
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   355
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   356
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   357
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   358
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   359
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   360
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   361
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   362
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   363
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   364
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   365
    }/*function_bool_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   366
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   367
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   368
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   369
 *BOOL_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   370
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   371
    case function_bool_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   372
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   373
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   374
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   375
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   376
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   377
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   378
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   379
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   380
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   381
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   382
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   383
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   384
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   385
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   386
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   387
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   388
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   389
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   390
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   391
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   392
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   393
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   394
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   395
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   396
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   397
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   398
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   399
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   400
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   401
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   402
    }/*function_bool_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   403
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   404
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   405
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   406
 *BOOL_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   407
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   408
    case function_bool_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   409
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   410
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   411
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   412
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   413
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   414
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   415
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   416
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   417
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   418
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   419
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   420
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   421
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   422
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   423
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   424
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   425
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   426
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   427
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   428
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   429
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   430
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   431
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   432
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   433
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   434
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   435
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   436
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   437
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   438
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   439
    }/*function_bool_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   440
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   441
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   442
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   443
 *BOOL_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   444
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   445
    case function_bool_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   446
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   447
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   448
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   449
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   450
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   451
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   452
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   453
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   454
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   455
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   456
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   457
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   458
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   459
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   460
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   461
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   462
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   463
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   464
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   465
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   466
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   467
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   468
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   469
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   470
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   471
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   472
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   473
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   474
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   475
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   476
    }/*function_bool_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   477
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   478
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   479
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   480
 *BOOL_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   481
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   482
    case function_bool_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   483
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   484
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   485
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   486
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   487
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   488
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   489
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   490
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   491
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   492
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   493
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   494
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   495
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   496
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   497
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   498
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   499
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   500
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   501
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   502
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   503
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   504
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   505
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   506
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   507
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   508
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   509
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   510
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   511
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   512
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   513
    }/*function_bool_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   514
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   515
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   516
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   517
 *BOOL_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   518
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   519
    case function_bool_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   520
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   521
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   522
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   523
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   524
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   525
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   526
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   527
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   528
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   529
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   530
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   531
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   532
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   533
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   534
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   535
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   536
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   537
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   538
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   539
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   540
                s4o.print(")__bool_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   541
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   542
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   543
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   544
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   545
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   546
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   547
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   548
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   549
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   550
    }/*function_bool_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   551
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   552
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   553
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   554
 *BOOL_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   555
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   556
    case function_bool_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   557
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   558
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   559
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   560
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   561
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   562
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   563
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   564
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   565
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   566
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   567
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   568
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   569
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   570
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   571
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   572
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   573
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   574
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   575
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   576
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   577
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   578
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   579
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   580
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   581
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   582
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   583
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   584
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   585
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   586
    }/*function_bool_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   587
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   588
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   589
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   590
 *BOOL_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   591
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   592
    case function_bool_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   593
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   594
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   595
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   596
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   597
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   598
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   599
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   600
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   601
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   602
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   603
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   604
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   605
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   606
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   607
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   608
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   609
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   610
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   611
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   612
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   613
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   614
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   615
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   616
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   617
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   618
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   619
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   620
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   621
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   622
    }/*function_bool_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   623
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   624
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   625
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   626
 *BOOL_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   627
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   628
    case function_bool_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   629
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   630
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   631
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   632
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   633
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   634
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   635
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   636
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   637
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   638
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   639
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   640
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   641
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   642
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   643
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   644
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   645
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   646
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   647
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   648
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   649
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   650
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   651
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   652
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   653
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   654
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   655
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   656
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   657
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   658
    }/*function_bool_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   659
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   660
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   661
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   662
 *BOOL_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   663
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   664
    case function_bool_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   665
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   666
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   667
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   668
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   669
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   670
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   671
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   672
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   673
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   674
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   675
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   676
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   677
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   678
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   679
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   680
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   681
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   682
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   683
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   684
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   685
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   686
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   687
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   688
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   689
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   690
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   691
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   692
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   693
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   694
    }/*function_bool_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   695
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   696
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   697
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   698
 *SINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   699
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   700
    case function_sint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   701
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   702
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   703
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   704
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   705
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   706
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   707
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   708
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   709
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   710
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   711
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   712
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   713
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   714
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   715
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   716
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   717
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   718
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   719
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   720
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   721
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   722
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   723
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   724
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   725
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   726
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   727
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   728
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   729
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   730
    }/*function_sint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   731
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   732
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   733
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   734
 *SINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   735
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   736
    case function_sint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   737
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   738
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   739
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   740
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   741
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   742
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   743
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   744
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   745
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   746
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   747
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   748
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   749
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   750
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   751
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   752
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   753
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   754
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   755
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   756
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   757
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   758
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   759
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   760
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   761
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   762
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   763
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   764
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   765
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   766
    }/*function_sint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   767
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   768
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   769
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   770
 *SINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   771
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   772
    case function_sint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   773
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   774
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   775
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   776
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   777
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   778
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   779
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   780
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   781
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   782
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   783
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   784
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   785
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   786
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   787
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   788
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   789
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   790
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   791
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   792
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   793
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   794
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   795
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   796
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   797
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   798
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   799
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   800
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   801
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   802
    }/*function_sint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   803
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   804
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   805
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   806
 *SINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   807
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   808
    case function_sint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   809
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   810
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   811
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   812
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   813
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   814
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   815
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   816
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   817
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   818
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   819
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   820
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   821
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   822
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   823
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   824
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   825
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   826
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   827
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   828
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   829
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   830
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   831
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   832
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   833
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   834
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   835
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   836
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   837
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   838
    }/*function_sint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   839
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   840
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   841
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   842
 *SINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   843
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   844
    case function_sint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   845
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   846
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   847
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   848
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   849
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   850
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   851
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   852
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   853
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   854
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   855
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   856
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   857
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   858
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   859
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   860
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   861
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   862
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   863
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   864
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   865
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   866
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   867
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   868
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   869
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   870
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   871
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   872
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   873
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   874
    }/*function_sint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   875
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   876
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   877
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   878
 *SINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   879
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   880
    case function_sint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   881
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   882
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   883
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   884
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   885
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   886
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   887
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   888
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   889
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   890
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   891
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   892
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   893
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   894
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   895
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   896
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   897
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   898
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   899
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   900
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   901
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   902
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   903
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   904
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   905
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   906
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   907
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   908
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   909
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   910
    }/*function_sint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   911
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   912
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   913
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   914
 *SINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   915
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   916
    case function_sint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   917
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   918
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   919
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   920
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   921
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   922
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   923
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   924
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   925
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   926
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   927
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   928
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   929
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   930
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   931
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   932
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   933
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   934
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   935
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   936
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   937
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   938
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   939
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   940
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   941
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   942
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   943
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   944
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   945
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   946
    }/*function_sint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   947
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   948
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   949
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   950
 *SINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   951
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   952
    case function_sint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   953
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   954
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   955
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   956
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   957
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   958
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   959
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   960
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   961
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   962
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   963
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   964
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   965
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   966
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
   967
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   968
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   969
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   970
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   971
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   972
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   973
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   974
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   975
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   976
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   977
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   978
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   979
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   980
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   981
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   982
    }/*function_sint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   983
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   984
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   985
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   986
 *SINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   987
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   988
    case function_sint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   989
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   990
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   991
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   992
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   993
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   994
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   995
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   996
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   997
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   998
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
   999
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1000
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1001
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1002
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1003
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1004
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1005
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1006
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1007
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1008
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1009
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1010
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1011
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1012
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1013
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1014
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1015
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1016
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1017
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1018
    }/*function_sint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1019
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1020
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1021
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1022
 *SINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1023
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1024
    case function_sint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1025
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1026
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1027
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1028
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1029
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1030
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1031
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1032
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1033
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1034
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1035
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1036
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1037
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1038
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1039
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1040
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1041
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1042
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1043
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1044
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1045
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1046
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1047
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1048
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1049
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1050
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1051
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1052
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1053
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1054
    }/*function_sint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1055
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1056
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1057
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1058
 *SINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1059
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1060
    case function_sint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1061
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1062
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1063
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1064
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1065
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1066
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1067
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1068
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1069
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1070
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1071
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1072
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1073
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1074
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1075
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1076
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1077
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1078
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1079
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1080
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1081
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1082
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1083
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1084
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1085
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1086
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1087
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1088
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1089
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1090
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1091
    }/*function_sint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1092
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1093
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1094
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1095
 *SINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1096
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1097
    case function_sint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1098
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1099
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1100
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1101
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1102
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1103
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1104
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1105
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1106
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1107
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1108
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1109
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1110
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1111
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1112
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1113
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1114
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1115
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1116
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1117
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1118
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1119
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1120
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1121
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1122
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1123
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1124
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1125
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1126
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1127
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1128
    }/*function_sint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1129
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1130
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1131
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1132
 *SINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1133
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1134
    case function_sint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1135
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1136
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1137
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1138
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1139
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1140
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1141
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1142
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1143
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1144
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1145
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1146
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1147
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1148
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1149
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1150
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1151
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1152
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1153
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1154
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1155
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1156
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1157
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1158
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1159
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1160
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1161
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1162
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1163
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1164
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1165
    }/*function_sint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1166
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1167
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1168
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1169
 *SINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1170
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1171
    case function_sint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1172
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1173
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1174
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1175
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1176
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1177
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1178
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1179
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1180
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1181
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1182
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1183
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1184
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1185
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1186
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1187
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1188
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1189
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1190
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1191
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1192
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1193
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1194
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1195
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1196
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1197
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1198
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1199
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1200
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1201
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1202
    }/*function_sint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1203
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1204
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1205
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1206
 *SINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1207
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1208
    case function_sint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1209
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1210
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1211
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1212
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1213
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1214
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1215
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1216
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1217
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1218
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1219
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1220
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1221
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1222
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1223
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1224
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1225
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1226
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1227
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1228
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1229
                s4o.print(")__sint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1230
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1231
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1232
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1233
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1234
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1235
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1236
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1237
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1238
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1239
    }/*function_sint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1240
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1241
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1242
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1243
 *SINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1244
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1245
    case function_sint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1246
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1247
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1248
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1249
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1250
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1251
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1252
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1253
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1254
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1255
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1256
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1257
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1258
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1259
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1260
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1261
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1262
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1263
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1264
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1265
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1266
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1267
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1268
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1269
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1270
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1271
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1272
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1273
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1274
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1275
    }/*function_sint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1276
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1277
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1278
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1279
 *SINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1280
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1281
    case function_sint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1282
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1283
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1284
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1285
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1286
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1287
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1288
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1289
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1290
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1291
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1292
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1293
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1294
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1295
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1296
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1297
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1298
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1299
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1300
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1301
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1302
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1303
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1304
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1305
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1306
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1307
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1308
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1309
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1310
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1311
    }/*function_sint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1312
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1313
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1314
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1315
 *SINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1316
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1317
    case function_sint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1318
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1319
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1320
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1321
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1322
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1323
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1324
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1325
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1326
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1327
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1328
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1329
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1330
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1331
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1332
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1333
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1334
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1335
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1336
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1337
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1338
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1339
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1340
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1341
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1342
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1343
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1344
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1345
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1346
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1347
    }/*function_sint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1348
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1349
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1350
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1351
 *SINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1352
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1353
    case function_sint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1354
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1355
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1356
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1357
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1358
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1359
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1360
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1361
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1362
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1363
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1364
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1365
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1366
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1367
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1368
            if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1369
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1370
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1371
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1372
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1373
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1374
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1375
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1376
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1377
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1378
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1379
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1380
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1381
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1382
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1383
    }/*function_sint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1384
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1385
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1386
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1387
 *INT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1388
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1389
    case function_int_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1390
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1391
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1392
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1393
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1394
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1395
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1396
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1397
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1398
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1399
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1400
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1401
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1402
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1403
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1404
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1405
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1406
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1407
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1408
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1409
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1410
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1411
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1412
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1413
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1414
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1415
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1416
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1417
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1418
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1419
    }/*function_int_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1420
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1421
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1422
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1423
 *INT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1424
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1425
    case function_int_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1426
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1427
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1428
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1429
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1430
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1431
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1432
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1433
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1434
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1435
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1436
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1437
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1438
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1439
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1440
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1441
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1442
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1443
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1444
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1445
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1446
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1447
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1448
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1449
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1450
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1451
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1452
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1453
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1454
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1455
    }/*function_int_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1456
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1457
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1458
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1459
 *INT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1460
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1461
    case function_int_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1462
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1463
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1464
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1465
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1466
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1467
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1468
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1469
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1470
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1471
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1472
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1473
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1474
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1475
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1476
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1477
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1478
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1479
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1480
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1481
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1482
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1483
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1484
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1485
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1486
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1487
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1488
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1489
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1490
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1491
    }/*function_int_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1492
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1493
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1494
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1495
 *INT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1496
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1497
    case function_int_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1498
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1499
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1500
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1501
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1502
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1503
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1504
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1505
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1506
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1507
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1508
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1509
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1510
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1511
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1512
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1513
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1514
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1515
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1516
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1517
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1518
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1519
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1520
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1521
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1522
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1523
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1524
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1525
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1526
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1527
    }/*function_int_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1528
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1529
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1530
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1531
 *INT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1532
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1533
    case function_int_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1534
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1535
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1536
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1537
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1538
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1539
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1540
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1541
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1542
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1543
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1544
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1545
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1546
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1547
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1548
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1549
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1550
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1551
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1552
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1553
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1554
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1555
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1556
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1557
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1558
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1559
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1560
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1561
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1562
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1563
    }/*function_int_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1564
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1565
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1566
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1567
 *INT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1568
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1569
    case function_int_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1570
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1571
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1572
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1573
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1574
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1575
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1576
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1577
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1578
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1579
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1580
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1581
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1582
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1583
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1584
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1585
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1586
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1587
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1588
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1589
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1590
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1591
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1592
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1593
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1594
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1595
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1596
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1597
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1598
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1599
    }/*function_int_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1600
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1601
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1602
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1603
 *INT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1604
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1605
    case function_int_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1606
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1607
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1608
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1609
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1610
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1611
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1612
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1613
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1614
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1615
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1616
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1617
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1618
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1619
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1620
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1621
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1622
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1623
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1624
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1625
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1626
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1627
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1628
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1629
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1630
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1631
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1632
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1633
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1634
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1635
    }/*function_int_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1636
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1637
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1638
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1639
 *INT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1640
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1641
    case function_int_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1642
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1643
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1644
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1645
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1646
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1647
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1648
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1649
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1650
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1651
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1652
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1653
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1654
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1655
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1656
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1657
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1658
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1659
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1660
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1661
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1662
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1663
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1664
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1665
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1666
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1667
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1668
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1669
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1670
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1671
    }/*function_int_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1672
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1673
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1674
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1675
 *INT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1676
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1677
    case function_int_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1678
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1679
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1680
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1681
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1682
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1683
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1684
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1685
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1686
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1687
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1688
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1689
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1690
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1691
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1692
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1693
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1694
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1695
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1696
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1697
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1698
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1699
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1700
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1701
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1702
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1703
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1704
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1705
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1706
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1707
    }/*function_int_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1708
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1709
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1710
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1711
 *INT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1712
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1713
    case function_int_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1714
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1715
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1716
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1717
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1718
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1719
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1720
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1721
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1722
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1723
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1724
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1725
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1726
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1727
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1728
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1729
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1730
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1731
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1732
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1733
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1734
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1735
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1736
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1737
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1738
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1739
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1740
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1741
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1742
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1743
    }/*function_int_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1744
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1745
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1746
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1747
 *INT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1748
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1749
    case function_int_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1750
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1751
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1752
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1753
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1754
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1755
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1756
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1757
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1758
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1759
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1760
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1761
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1762
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1763
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1764
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1765
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1766
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1767
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1768
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1769
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1770
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1771
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1772
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1773
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1774
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1775
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1776
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1777
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1778
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1779
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1780
    }/*function_int_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1781
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1782
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1783
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1784
 *INT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1785
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1786
    case function_int_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1787
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1788
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1789
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1790
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1791
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1792
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1793
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1794
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1795
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1796
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1797
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1798
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1799
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1800
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1801
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1802
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1803
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1804
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1805
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1806
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1807
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1808
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1809
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1810
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1811
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1812
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1813
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1814
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1815
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1816
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1817
    }/*function_int_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1818
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1819
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1820
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1821
 *INT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1822
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1823
    case function_int_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1824
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1825
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1826
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1827
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1828
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1829
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1830
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1831
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1832
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1833
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1834
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1835
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1836
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1837
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1838
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1839
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1840
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1841
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1842
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1843
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1844
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1845
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1846
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1847
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1848
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1849
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1850
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1851
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1852
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1853
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1854
    }/*function_int_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1855
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1856
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1857
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1858
 *INT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1859
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1860
    case function_int_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1861
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1862
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1863
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1864
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1865
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1866
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1867
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1868
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1869
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1870
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1871
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1872
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1873
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1874
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1875
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1876
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1877
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1878
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1879
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1880
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1881
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1882
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1883
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1884
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1885
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1886
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1887
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1888
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1889
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1890
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1891
    }/*function_int_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1892
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1893
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1894
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1895
 *INT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1896
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1897
    case function_int_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1898
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1899
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1900
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1901
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1902
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1903
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1904
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1905
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1906
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1907
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1908
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1909
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1910
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1911
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1912
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1913
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1914
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1915
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1916
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1917
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1918
                s4o.print(")__sint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1919
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1920
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1921
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1922
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1923
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1924
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1925
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1926
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1927
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1928
    }/*function_int_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1929
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1930
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1931
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1932
 *INT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1933
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1934
    case function_int_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1935
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1936
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1937
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1938
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1939
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1940
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1941
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1942
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1943
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1944
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1945
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1946
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1947
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1948
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1949
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1950
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1951
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1952
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1953
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1954
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1955
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1956
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1957
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1958
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1959
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1960
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1961
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1962
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1963
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1964
    }/*function_int_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1965
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1966
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1967
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1968
 *INT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1969
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1970
    case function_int_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1971
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1972
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1973
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1974
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1975
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1976
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1977
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1978
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1979
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1980
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1981
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1982
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1983
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1984
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  1985
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1986
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1987
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1988
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1989
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1990
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1991
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1992
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1993
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1994
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1995
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1996
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1997
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1998
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  1999
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2000
    }/*function_int_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2001
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2002
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2003
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2004
 *INT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2005
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2006
    case function_int_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2007
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2008
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2009
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2010
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2011
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2012
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2013
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2014
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2015
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2016
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2017
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2018
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2019
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2020
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2021
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2022
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2023
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2024
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2025
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2026
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2027
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2028
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2029
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2030
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2031
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2032
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2033
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2034
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2035
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2036
    }/*function_int_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2037
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2038
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2039
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2040
 *INT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2041
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2042
    case function_int_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2043
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2044
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2045
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2046
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2047
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2048
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2049
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2050
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2051
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2052
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2053
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2054
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2055
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2056
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2057
            if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2058
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2059
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2060
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2061
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2062
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2063
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2064
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2065
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2066
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2067
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2068
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2069
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2070
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2071
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2072
    }/*function_int_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2073
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2074
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2075
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2076
 *DINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2077
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2078
    case function_dint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2079
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2080
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2081
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2082
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2083
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2084
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2085
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2086
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2087
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2088
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2089
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2090
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2091
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2092
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2093
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2094
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2095
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2096
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2097
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2098
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2099
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2100
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2101
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2102
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2103
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2104
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2105
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2106
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2107
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2108
    }/*function_dint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2109
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2110
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2111
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2112
 *DINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2113
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2114
    case function_dint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2115
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2116
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2117
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2118
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2119
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2120
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2121
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2122
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2123
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2124
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2125
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2126
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2127
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2128
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2129
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2130
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2131
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2132
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2133
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2134
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2135
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2136
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2137
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2138
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2139
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2140
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2141
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2142
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2143
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2144
    }/*function_dint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2145
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2146
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2147
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2148
 *DINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2149
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2150
    case function_dint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2151
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2152
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2153
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2154
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2155
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2156
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2157
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2158
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2159
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2160
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2161
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2162
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2163
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2164
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2165
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2166
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2167
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2168
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2169
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2170
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2171
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2172
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2173
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2174
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2175
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2176
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2177
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2178
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2179
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2180
    }/*function_dint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2181
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2182
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2183
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2184
 *DINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2185
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2186
    case function_dint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2187
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2188
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2189
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2190
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2191
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2192
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2193
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2194
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2195
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2196
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2197
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2198
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2199
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2200
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2201
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2202
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2203
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2204
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2205
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2206
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2207
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2208
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2209
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2210
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2211
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2212
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2213
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2214
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2215
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2216
    }/*function_dint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2217
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2218
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2219
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2220
 *DINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2221
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2222
    case function_dint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2223
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2224
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2225
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2226
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2227
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2228
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2229
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2230
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2231
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2232
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2233
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2234
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2235
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2236
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2237
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2238
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2239
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2240
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2241
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2242
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2243
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2244
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2245
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2246
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2247
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2248
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2249
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2250
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2251
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2252
    }/*function_dint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2253
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2254
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2255
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2256
 *DINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2257
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2258
    case function_dint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2259
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2260
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2261
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2262
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2263
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2264
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2265
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2266
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2267
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2268
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2269
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2270
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2271
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2272
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2273
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2274
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2275
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2276
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2277
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2278
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2279
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2280
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2281
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2282
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2283
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2284
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2285
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2286
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2287
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2288
    }/*function_dint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2289
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2290
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2291
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2292
 *DINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2293
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2294
    case function_dint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2295
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2296
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2297
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2298
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2299
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2300
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2301
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2302
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2303
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2304
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2305
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2306
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2307
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2308
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2309
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2310
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2311
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2312
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2313
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2314
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2315
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2316
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2317
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2318
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2319
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2320
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2321
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2322
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2323
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2324
    }/*function_dint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2325
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2326
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2327
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2328
 *DINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2329
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2330
    case function_dint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2331
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2332
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2333
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2334
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2335
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2336
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2337
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2338
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2339
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2340
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2341
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2342
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2343
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2344
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2345
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2346
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2347
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2348
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2349
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2350
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2351
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2352
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2353
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2354
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2355
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2356
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2357
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2358
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2359
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2360
    }/*function_dint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2361
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2362
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2363
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2364
 *DINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2365
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2366
    case function_dint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2367
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2368
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2369
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2370
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2371
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2372
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2373
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2374
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2375
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2376
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2377
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2378
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2379
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2380
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2381
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2382
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2383
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2384
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2385
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2386
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2387
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2388
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2389
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2390
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2391
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2392
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2393
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2394
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2395
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2396
    }/*function_dint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2397
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2398
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2399
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2400
 *DINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2401
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2402
    case function_dint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2403
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2404
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2405
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2406
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2407
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2408
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2409
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2410
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2411
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2412
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2413
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2414
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2415
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2416
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2417
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2418
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2419
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2420
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2421
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2422
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2423
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2424
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2425
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2426
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2427
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2428
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2429
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2430
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2431
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2432
    }/*function_dint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2433
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2434
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2435
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2436
 *DINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2437
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2438
    case function_dint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2439
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2440
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2441
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2442
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2443
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2444
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2445
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2446
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2447
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2448
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2449
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2450
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2451
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2452
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2453
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2454
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2455
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2456
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2457
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2458
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2459
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2460
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2461
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2462
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2463
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2464
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2465
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2466
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2467
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2468
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2469
    }/*function_dint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2470
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2471
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2472
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2473
 *DINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2474
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2475
    case function_dint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2476
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2477
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2478
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2479
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2480
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2481
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2482
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2483
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2484
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2485
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2486
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2487
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2488
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2489
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2490
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2491
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2492
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2493
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2494
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2495
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2496
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2497
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2498
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2499
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2500
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2501
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2502
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2503
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2504
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2505
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2506
    }/*function_dint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2507
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2508
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2509
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2510
 *DINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2511
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2512
    case function_dint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2513
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2514
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2515
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2516
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2517
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2518
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2519
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2520
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2521
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2522
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2523
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2524
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2525
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2526
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2527
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2528
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2529
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2530
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2531
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2532
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2533
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2534
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2535
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2536
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2537
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2538
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2539
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2540
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2541
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2542
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2543
    }/*function_dint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2544
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2545
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2546
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2547
 *DINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2548
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2549
    case function_dint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2550
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2551
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2552
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2553
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2554
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2555
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2556
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2557
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2558
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2559
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2560
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2561
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2562
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2563
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2564
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2565
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2566
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2567
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2568
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2569
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2570
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2571
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2572
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2573
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2574
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2575
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2576
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2577
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2578
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2579
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2580
    }/*function_dint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2581
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2582
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2583
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2584
 *DINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2585
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2586
    case function_dint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2587
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2588
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2589
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2590
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2591
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2592
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2593
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2594
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2595
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2596
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2597
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2598
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2599
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2600
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2601
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2602
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2603
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2604
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2605
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2606
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2607
                s4o.print(")__sint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2608
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2609
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2610
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2611
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2612
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2613
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2614
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2615
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2616
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2617
    }/*function_dint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2618
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2619
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2620
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2621
 *DINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2622
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2623
    case function_dint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2624
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2625
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2626
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2627
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2628
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2629
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2630
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2631
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2632
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2633
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2634
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2635
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2636
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2637
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2638
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2639
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2640
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2641
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2642
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2643
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2644
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2645
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2646
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2647
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2648
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2649
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2650
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2651
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2652
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2653
    }/*function_dint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2654
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2655
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2656
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2657
 *DINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2658
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2659
    case function_dint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2660
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2661
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2662
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2663
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2664
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2665
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2666
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2667
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2668
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2669
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2670
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2671
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2672
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2673
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2674
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2675
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2676
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2677
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2678
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2679
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2680
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2681
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2682
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2683
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2684
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2685
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2686
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2687
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2688
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2689
    }/*function_dint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2690
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2691
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2692
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2693
 *DINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2694
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2695
    case function_dint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2696
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2697
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2698
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2699
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2700
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2701
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2702
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2703
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2704
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2705
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2706
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2707
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2708
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2709
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2710
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2711
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2712
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2713
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2714
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2715
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2716
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2717
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2718
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2719
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2720
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2721
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2722
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2723
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2724
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2725
    }/*function_dint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2726
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2727
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2728
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2729
 *DINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2730
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2731
    case function_dint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2732
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2733
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2734
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2735
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2736
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2737
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2738
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2739
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2740
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2741
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2742
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2743
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2744
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2745
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2746
            if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2747
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2748
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2749
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2750
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2751
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2752
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2753
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2754
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2755
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2756
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2757
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2758
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2759
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2760
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2761
    }/*function_dint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2762
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2763
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2764
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2765
 *LINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2766
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2767
    case function_lint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2768
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2769
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2770
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2771
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2772
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2773
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2774
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2775
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2776
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2777
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2778
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2779
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2780
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2781
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2782
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2783
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2784
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2785
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2786
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2787
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2788
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2789
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2790
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2791
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2792
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2793
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2794
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2795
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2796
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2797
    }/*function_lint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2798
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2799
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2800
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2801
 *LINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2802
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2803
    case function_lint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2804
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2805
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2806
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2807
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2808
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2809
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2810
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2811
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2812
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2813
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2814
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2815
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2816
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2817
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2818
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2819
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2820
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2821
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2822
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2823
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2824
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2825
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2826
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2827
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2828
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2829
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2830
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2831
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2832
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2833
    }/*function_lint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2834
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2835
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2836
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2837
 *LINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2838
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2839
    case function_lint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2840
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2841
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2842
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2843
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2844
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2845
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2846
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2847
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2848
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2849
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2850
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2851
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2852
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2853
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2854
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2855
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2856
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2857
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2858
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2859
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2860
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2861
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2862
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2863
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2864
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2865
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2866
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2867
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2868
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2869
    }/*function_lint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2870
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2871
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2872
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2873
 *LINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2874
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2875
    case function_lint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2876
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2877
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2878
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2879
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2880
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2881
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2882
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2883
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2884
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2885
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2886
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2887
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2888
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2889
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2890
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2891
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2892
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2893
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2894
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2895
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2896
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2897
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2898
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2899
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2900
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2901
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2902
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2903
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2904
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2905
    }/*function_lint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2906
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2907
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2908
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2909
 *LINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2910
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2911
    case function_lint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2912
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2913
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2914
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2915
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2916
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2917
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2918
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2919
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2920
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2921
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2922
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2923
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2924
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2925
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2926
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2927
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2928
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2929
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2930
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2931
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2932
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2933
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2934
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2935
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2936
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2937
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2938
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2939
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2940
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2941
    }/*function_lint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2942
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2943
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2944
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2945
 *LINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2946
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2947
    case function_lint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2948
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2949
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2950
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2951
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2952
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2953
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2954
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2955
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2956
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2957
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2958
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2959
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2960
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2961
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2962
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2963
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2964
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2965
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2966
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2967
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2968
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2969
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2970
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2971
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2972
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2973
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2974
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2975
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2976
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2977
    }/*function_lint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2978
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2979
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2980
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2981
 *LINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2982
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2983
    case function_lint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2984
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2985
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2986
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2987
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2988
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2989
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2990
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2991
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2992
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2993
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2994
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2995
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2996
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2997
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  2998
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  2999
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3000
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3001
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3002
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3003
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3004
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3005
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3006
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3007
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3008
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3009
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3010
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3011
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3012
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3013
    }/*function_lint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3014
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3015
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3016
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3017
 *LINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3018
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3019
    case function_lint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3020
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3021
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3022
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3023
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3024
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3025
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3026
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3027
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3028
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3029
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3030
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3031
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3032
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3033
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3034
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3035
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3036
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3037
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3038
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3039
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3040
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3041
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3042
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3043
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3044
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3045
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3046
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3047
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3048
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3049
    }/*function_lint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3050
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3051
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3052
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3053
 *LINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3054
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3055
    case function_lint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3056
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3057
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3058
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3059
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3060
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3061
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3062
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3063
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3064
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3065
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3066
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3067
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3068
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3069
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3070
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3071
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3072
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3073
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3074
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3075
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3076
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3077
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3078
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3079
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3080
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3081
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3082
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3083
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3084
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3085
    }/*function_lint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3086
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3087
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3088
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3089
 *LINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3090
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3091
    case function_lint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3092
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3093
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3094
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3095
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3096
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3097
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3098
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3099
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3100
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3101
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3102
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3103
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3104
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3105
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3106
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3107
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3108
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3109
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3110
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3111
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3112
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3113
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3114
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3115
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3116
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3117
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3118
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3119
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3120
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3121
    }/*function_lint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3122
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3123
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3124
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3125
 *LINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3126
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3127
    case function_lint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3128
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3129
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3130
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3131
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3132
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3133
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3134
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3135
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3136
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3137
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3138
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3139
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3140
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3141
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3142
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3143
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3144
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3145
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3146
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3147
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3148
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3149
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3150
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3151
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3152
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3153
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3154
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3155
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3156
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3157
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3158
    }/*function_lint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3159
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3160
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3161
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3162
 *LINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3163
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3164
    case function_lint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3165
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3166
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3167
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3168
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3169
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3170
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3171
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3172
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3173
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3174
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3175
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3176
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3177
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3178
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3179
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3180
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3181
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3182
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3183
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3184
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3185
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3186
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3187
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3188
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3189
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3190
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3191
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3192
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3193
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3194
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3195
    }/*function_lint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3196
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3197
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3198
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3199
 *LINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3200
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3201
    case function_lint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3202
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3203
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3204
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3205
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3206
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3207
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3208
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3209
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3210
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3211
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3212
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3213
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3214
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3215
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3216
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3217
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3218
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3219
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3220
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3221
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3222
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3223
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3224
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3225
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3226
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3227
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3228
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3229
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3230
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3231
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3232
    }/*function_lint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3233
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3234
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3235
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3236
 *LINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3237
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3238
    case function_lint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3239
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3240
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3241
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3242
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3243
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3244
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3245
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3246
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3247
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3248
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3249
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3250
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3251
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3252
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3253
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3254
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3255
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3256
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3257
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3258
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3259
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3260
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3261
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3262
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3263
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3264
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3265
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3266
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3267
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3268
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3269
    }/*function_lint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3270
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3271
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3272
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3273
 *LINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3274
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3275
    case function_lint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3276
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3277
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3278
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3279
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3280
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3281
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3282
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3283
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3284
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3285
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3286
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3287
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3288
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3289
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3290
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3291
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3292
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3293
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3294
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3295
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3296
                s4o.print(")__sint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3297
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3298
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3299
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3300
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3301
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3302
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3303
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3304
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3305
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3306
    }/*function_lint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3307
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3308
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3309
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3310
 *LINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3311
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3312
    case function_lint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3313
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3314
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3315
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3316
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3317
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3318
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3319
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3320
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3321
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3322
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3323
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3324
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3325
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3326
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3327
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3328
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3329
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3330
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3331
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3332
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3333
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3334
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3335
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3336
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3337
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3338
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3339
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3340
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3341
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3342
    }/*function_lint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3343
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3344
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3345
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3346
 *LINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3347
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3348
    case function_lint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3349
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3350
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3351
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3352
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3353
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3354
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3355
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3356
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3357
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3358
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3359
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3360
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3361
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3362
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3363
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3364
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3365
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3366
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3367
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3368
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3369
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3370
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3371
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3372
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3373
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3374
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3375
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3376
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3377
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3378
    }/*function_lint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3379
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3380
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3381
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3382
 *LINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3383
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3384
    case function_lint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3385
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3386
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3387
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3388
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3389
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3390
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3391
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3392
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3393
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3394
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3395
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3396
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3397
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3398
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3399
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3400
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3401
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3402
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3403
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3404
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3405
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3406
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3407
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3408
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3409
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3410
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3411
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3412
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3413
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3414
    }/*function_lint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3415
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3416
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3417
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3418
 *LINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3419
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3420
    case function_lint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3421
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3422
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3423
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3424
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3425
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3426
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3427
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3428
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3429
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3430
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3431
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3432
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3433
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3434
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3435
            if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3436
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3437
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3438
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3439
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3440
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3441
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3442
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3443
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3444
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3445
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3446
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3447
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3448
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3449
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3450
    }/*function_lint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3451
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3452
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3453
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3454
 *USINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3455
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3456
    case function_usint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3457
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3458
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3459
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3460
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3461
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3462
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3463
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3464
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3465
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3466
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3467
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3468
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3469
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3470
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3471
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3472
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3473
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3474
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3475
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3476
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3477
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3478
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3479
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3480
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3481
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3482
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3483
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3484
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3485
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3486
    }/*function_usint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3487
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3488
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3489
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3490
 *USINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3491
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3492
    case function_usint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3493
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3494
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3495
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3496
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3497
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3498
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3499
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3500
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3501
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3502
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3503
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3504
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3505
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3506
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3507
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3508
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3509
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3510
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3511
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3512
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3513
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3514
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3515
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3516
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3517
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3518
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3519
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3520
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3521
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3522
    }/*function_usint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3523
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3524
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3525
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3526
 *USINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3527
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3528
    case function_usint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3529
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3530
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3531
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3532
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3533
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3534
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3535
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3536
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3537
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3538
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3539
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3540
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3541
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3542
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3543
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3544
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3545
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3546
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3547
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3548
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3549
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3550
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3551
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3552
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3553
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3554
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3555
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3556
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3557
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3558
    }/*function_usint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3559
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3560
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3561
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3562
 *USINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3563
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3564
    case function_usint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3565
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3566
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3567
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3568
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3569
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3570
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3571
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3572
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3573
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3574
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3575
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3576
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3577
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3578
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3579
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3580
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3581
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3582
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3583
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3584
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3585
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3586
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3587
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3588
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3589
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3590
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3591
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3592
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3593
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3594
    }/*function_usint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3595
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3596
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3597
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3598
 *USINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3599
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3600
    case function_usint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3601
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3602
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3603
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3604
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3605
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3606
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3607
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3608
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3609
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3610
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3611
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3612
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3613
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3614
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3615
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3616
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3617
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3618
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3619
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3620
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3621
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3622
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3623
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3624
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3625
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3626
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3627
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3628
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3629
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3630
    }/*function_usint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3631
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3632
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3633
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3634
 *USINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3635
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3636
    case function_usint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3637
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3638
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3639
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3640
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3641
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3642
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3643
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3644
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3645
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3646
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3647
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3648
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3649
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3650
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3651
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3652
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3653
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3654
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3655
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3656
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3657
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3658
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3659
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3660
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3661
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3662
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3663
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3664
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3665
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3666
    }/*function_usint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3667
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3668
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3669
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3670
 *USINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3671
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3672
    case function_usint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3673
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3674
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3675
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3676
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3677
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3678
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3679
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3680
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3681
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3682
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3683
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3684
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3685
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3686
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3687
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3688
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3689
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3690
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3691
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3692
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3693
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3694
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3695
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3696
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3697
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3698
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3699
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3700
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3701
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3702
    }/*function_usint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3703
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3704
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3705
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3706
 *USINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3707
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3708
    case function_usint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3709
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3710
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3711
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3712
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3713
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3714
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3715
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3716
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3717
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3718
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3719
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3720
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3721
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3722
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3723
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3724
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3725
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3726
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3727
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3728
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3729
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3730
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3731
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3732
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3733
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3734
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3735
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3736
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3737
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3738
    }/*function_usint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3739
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3740
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3741
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3742
 *USINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3743
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3744
    case function_usint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3745
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3746
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3747
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3748
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3749
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3750
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3751
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3752
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3753
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3754
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3755
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3756
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3757
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3758
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3759
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3760
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3761
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3762
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3763
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3764
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3765
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3766
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3767
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3768
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3769
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3770
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3771
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3772
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3773
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3774
    }/*function_usint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3775
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3776
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3777
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3778
 *USINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3779
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3780
    case function_usint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3781
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3782
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3783
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3784
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3785
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3786
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3787
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3788
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3789
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3790
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3791
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3792
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3793
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3794
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3795
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3796
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3797
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3798
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3799
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3800
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3801
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3802
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3803
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3804
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3805
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3806
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3807
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3808
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3809
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3810
    }/*function_usint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3811
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3812
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3813
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3814
 *USINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3815
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3816
    case function_usint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3817
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3818
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3819
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3820
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3821
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3822
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3823
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3824
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3825
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3826
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3827
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3828
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3829
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3830
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3831
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3832
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3833
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3834
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3835
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3836
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3837
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3838
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3839
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3840
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3841
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3842
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3843
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3844
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3845
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3846
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3847
    }/*function_usint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3848
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3849
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3850
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3851
 *USINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3852
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3853
    case function_usint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3854
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3855
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3856
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3857
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3858
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3859
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3860
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3861
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3862
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3863
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3864
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3865
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3866
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3867
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3868
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3869
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3870
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3871
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3872
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3873
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3874
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3875
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3876
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3877
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3878
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3879
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3880
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3881
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3882
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3883
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3884
    }/*function_usint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3885
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3886
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3887
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3888
 *USINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3889
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3890
    case function_usint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3891
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3892
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3893
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3894
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3895
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3896
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3897
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3898
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3899
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3900
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3901
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3902
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3903
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3904
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3905
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3906
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3907
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3908
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3909
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3910
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3911
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3912
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3913
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3914
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3915
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3916
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3917
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3918
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3919
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3920
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3921
    }/*function_usint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3922
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3923
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3924
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3925
 *USINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3926
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3927
    case function_usint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3928
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3929
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3930
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3931
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3932
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3933
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3934
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3935
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3936
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3937
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3938
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3939
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3940
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3941
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3942
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3943
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3944
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3945
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3946
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3947
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3948
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3949
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3950
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3951
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3952
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3953
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3954
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3955
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3956
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3957
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3958
    }/*function_usint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3959
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3960
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3961
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3962
 *USINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3963
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3964
    case function_usint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3965
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3966
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3967
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3968
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3969
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3970
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3971
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3972
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3973
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3974
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3975
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3976
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3977
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3978
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  3979
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3980
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3981
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3982
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3983
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3984
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3985
                s4o.print(")__uint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3986
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3987
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3988
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3989
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3990
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3991
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3992
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3993
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3994
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3995
    }/*function_usint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3996
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3997
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3998
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  3999
 *USINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4000
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4001
    case function_usint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4002
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4003
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4004
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4005
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4006
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4007
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4008
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4009
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4010
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4011
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4012
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4013
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4014
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4015
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4016
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4017
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4018
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4019
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4020
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4021
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4022
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4023
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4024
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4025
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4026
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4027
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4028
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4029
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4030
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4031
    }/*function_usint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4032
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4033
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4034
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4035
 *USINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4036
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4037
    case function_usint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4038
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4039
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4040
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4041
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4042
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4043
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4044
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4045
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4046
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4047
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4048
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4049
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4050
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4051
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4052
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4053
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4054
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4055
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4056
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4057
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4058
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4059
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4060
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4061
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4062
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4063
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4064
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4065
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4066
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4067
    }/*function_usint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4068
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4069
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4070
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4071
 *USINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4072
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4073
    case function_usint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4074
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4075
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4076
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4077
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4078
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4079
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4080
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4081
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4082
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4083
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4084
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4085
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4086
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4087
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4088
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4089
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4090
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4091
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4092
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4093
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4094
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4095
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4096
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4097
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4098
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4099
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4100
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4101
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4102
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4103
    }/*function_usint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4104
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4105
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4106
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4107
 *USINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4108
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4109
    case function_usint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4110
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4111
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4112
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4113
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4114
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4115
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4116
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4117
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4118
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4119
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4120
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4121
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4122
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4123
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4124
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4125
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4126
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4127
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4128
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4129
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4130
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4131
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4132
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4133
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4134
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4135
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4136
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4137
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4138
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4139
    }/*function_usint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4140
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4141
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4142
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4143
 *UINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4144
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4145
    case function_uint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4146
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4147
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4148
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4149
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4150
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4151
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4152
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4153
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4154
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4155
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4156
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4157
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4158
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4159
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4160
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4161
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4162
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4163
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4164
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4165
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4166
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4167
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4168
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4169
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4170
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4171
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4172
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4173
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4174
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4175
    }/*function_uint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4176
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4177
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4178
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4179
 *UINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4180
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4181
    case function_uint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4182
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4183
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4184
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4185
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4186
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4187
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4188
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4189
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4190
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4191
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4192
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4193
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4194
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4195
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4196
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4197
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4198
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4199
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4200
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4201
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4202
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4203
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4204
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4205
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4206
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4207
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4208
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4209
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4210
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4211
    }/*function_uint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4212
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4213
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4214
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4215
 *UINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4216
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4217
    case function_uint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4218
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4219
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4220
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4221
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4222
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4223
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4224
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4225
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4226
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4227
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4228
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4229
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4230
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4231
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4232
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4233
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4234
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4235
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4236
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4237
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4238
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4239
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4240
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4241
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4242
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4243
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4244
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4245
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4246
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4247
    }/*function_uint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4248
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4249
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4250
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4251
 *UINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4252
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4253
    case function_uint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4254
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4255
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4256
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4257
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4258
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4259
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4260
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4261
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4262
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4263
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4264
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4265
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4266
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4267
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4268
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4269
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4270
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4271
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4272
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4273
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4274
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4275
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4276
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4277
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4278
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4279
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4280
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4281
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4282
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4283
    }/*function_uint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4284
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4285
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4286
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4287
 *UINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4288
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4289
    case function_uint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4290
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4291
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4292
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4293
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4294
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4295
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4296
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4297
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4298
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4299
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4300
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4301
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4302
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4303
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4304
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4305
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4306
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4307
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4308
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4309
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4310
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4311
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4312
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4313
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4314
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4315
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4316
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4317
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4318
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4319
    }/*function_uint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4320
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4321
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4322
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4323
 *UINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4324
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4325
    case function_uint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4326
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4327
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4328
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4329
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4330
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4331
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4332
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4333
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4334
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4335
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4336
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4337
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4338
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4339
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4340
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4341
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4342
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4343
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4344
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4345
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4346
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4347
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4348
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4349
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4350
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4351
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4352
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4353
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4354
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4355
    }/*function_uint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4356
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4357
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4358
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4359
 *UINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4360
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4361
    case function_uint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4362
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4363
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4364
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4365
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4366
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4367
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4368
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4369
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4370
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4371
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4372
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4373
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4374
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4375
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4376
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4377
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4378
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4379
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4380
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4381
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4382
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4383
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4384
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4385
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4386
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4387
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4388
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4389
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4390
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4391
    }/*function_uint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4392
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4393
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4394
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4395
 *UINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4396
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4397
    case function_uint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4398
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4399
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4400
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4401
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4402
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4403
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4404
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4405
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4406
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4407
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4408
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4409
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4410
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4411
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4412
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4413
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4414
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4415
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4416
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4417
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4418
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4419
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4420
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4421
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4422
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4423
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4424
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4425
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4426
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4427
    }/*function_uint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4428
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4429
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4430
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4431
 *UINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4432
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4433
    case function_uint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4434
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4435
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4436
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4437
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4438
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4439
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4440
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4441
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4442
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4443
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4444
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4445
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4446
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4447
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4448
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4449
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4450
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4451
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4452
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4453
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4454
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4455
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4456
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4457
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4458
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4459
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4460
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4461
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4462
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4463
    }/*function_uint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4464
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4465
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4466
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4467
 *UINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4468
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4469
    case function_uint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4470
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4471
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4472
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4473
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4474
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4475
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4476
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4477
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4478
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4479
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4480
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4481
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4482
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4483
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4484
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4485
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4486
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4487
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4488
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4489
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4490
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4491
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4492
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4493
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4494
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4495
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4496
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4497
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4498
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4499
    }/*function_uint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4500
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4501
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4502
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4503
 *UINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4504
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4505
    case function_uint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4506
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4507
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4508
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4509
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4510
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4511
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4512
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4513
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4514
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4515
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4516
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4517
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4518
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4519
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4520
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4521
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4522
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4523
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4524
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4525
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4526
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4527
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4528
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4529
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4530
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4531
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4532
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4533
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4534
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4535
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4536
    }/*function_uint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4537
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4538
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4539
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4540
 *UINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4541
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4542
    case function_uint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4543
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4544
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4545
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4546
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4547
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4548
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4549
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4550
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4551
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4552
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4553
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4554
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4555
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4556
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4557
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4558
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4559
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4560
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4561
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4562
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4563
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4564
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4565
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4566
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4567
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4568
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4569
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4570
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4571
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4572
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4573
    }/*function_uint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4574
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4575
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4576
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4577
 *UINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4578
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4579
    case function_uint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4580
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4581
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4582
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4583
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4584
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4585
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4586
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4587
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4588
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4589
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4590
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4591
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4592
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4593
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4594
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4595
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4596
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4597
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4598
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4599
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4600
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4601
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4602
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4603
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4604
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4605
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4606
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4607
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4608
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4609
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4610
    }/*function_uint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4611
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4612
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4613
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4614
 *UINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4615
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4616
    case function_uint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4617
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4618
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4619
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4620
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4621
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4622
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4623
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4624
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4625
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4626
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4627
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4628
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4629
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4630
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4631
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4632
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4633
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4634
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4635
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4636
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4637
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4638
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4639
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4640
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4641
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4642
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4643
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4644
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4645
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4646
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4647
    }/*function_uint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4648
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4649
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4650
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4651
 *UINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4652
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4653
    case function_uint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4654
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4655
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4656
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4657
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4658
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4659
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4660
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4661
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4662
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4663
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4664
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4665
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4666
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4667
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4668
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4669
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4670
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4671
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4672
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4673
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4674
                s4o.print(")__uint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4675
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4676
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4677
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4678
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4679
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4680
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4681
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4682
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4683
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4684
    }/*function_uint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4685
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4686
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4687
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4688
 *UINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4689
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4690
    case function_uint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4691
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4692
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4693
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4694
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4695
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4696
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4697
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4698
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4699
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4700
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4701
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4702
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4703
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4704
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4705
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4706
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4707
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4708
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4709
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4710
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4711
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4712
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4713
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4714
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4715
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4716
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4717
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4718
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4719
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4720
    }/*function_uint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4721
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4722
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4723
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4724
 *UINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4725
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4726
    case function_uint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4727
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4728
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4729
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4730
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4731
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4732
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4733
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4734
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4735
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4736
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4737
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4738
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4739
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4740
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4741
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4742
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4743
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4744
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4745
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4746
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4747
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4748
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4749
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4750
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4751
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4752
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4753
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4754
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4755
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4756
    }/*function_uint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4757
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4758
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4759
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4760
 *UINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4761
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4762
    case function_uint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4763
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4764
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4765
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4766
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4767
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4768
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4769
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4770
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4771
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4772
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4773
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4774
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4775
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4776
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4777
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4778
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4779
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4780
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4781
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4782
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4783
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4784
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4785
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4786
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4787
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4788
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4789
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4790
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4791
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4792
    }/*function_uint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4793
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4794
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4795
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4796
 *UINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4797
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4798
    case function_uint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4799
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4800
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4801
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4802
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4803
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4804
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4805
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4806
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4807
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4808
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4809
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4810
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4811
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4812
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4813
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4814
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4815
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4816
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4817
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4818
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4819
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4820
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4821
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4822
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4823
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4824
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4825
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4826
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4827
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4828
    }/*function_uint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4829
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4830
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4831
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4832
 *UDINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4833
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4834
    case function_udint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4835
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4836
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4837
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4838
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4839
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4840
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4841
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4842
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4843
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4844
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4845
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4846
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4847
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4848
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4849
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4850
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4851
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4852
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4853
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4854
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4855
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4856
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4857
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4858
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4859
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4860
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4861
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4862
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4863
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4864
    }/*function_udint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4865
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4866
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4867
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4868
 *UDINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4869
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4870
    case function_udint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4871
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4872
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4873
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4874
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4875
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4876
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4877
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4878
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4879
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4880
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4881
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4882
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4883
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4884
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4885
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4886
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4887
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4888
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4889
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4890
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4891
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4892
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4893
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4894
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4895
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4896
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4897
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4898
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4899
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4900
    }/*function_udint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4901
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4902
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4903
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4904
 *UDINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4905
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4906
    case function_udint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4907
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4908
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4909
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4910
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4911
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4912
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4913
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4914
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4915
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4916
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4917
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4918
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4919
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4920
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4921
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4922
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4923
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4924
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4925
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4926
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4927
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4928
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4929
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4930
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4931
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4932
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4933
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4934
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4935
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4936
    }/*function_udint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4937
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4938
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4939
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4940
 *UDINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4941
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4942
    case function_udint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4943
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4944
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4945
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4946
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4947
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4948
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4949
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4950
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4951
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4952
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4953
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4954
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4955
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4956
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4957
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4958
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4959
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4960
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4961
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4962
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4963
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4964
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4965
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4966
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4967
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4968
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4969
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4970
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4971
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4972
    }/*function_udint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4973
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4974
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4975
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4976
 *UDINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4977
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4978
    case function_udint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4979
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4980
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4981
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4982
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4983
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4984
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4985
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4986
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4987
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4988
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4989
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4990
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4991
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4992
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  4993
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4994
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4995
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4996
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4997
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4998
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  4999
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5000
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5001
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5002
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5003
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5004
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5005
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5006
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5007
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5008
    }/*function_udint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5009
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5010
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5011
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5012
 *UDINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5013
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5014
    case function_udint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5015
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5016
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5017
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5018
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5019
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5020
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5021
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5022
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5023
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5024
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5025
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5026
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5027
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5028
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5029
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5030
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5031
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5032
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5033
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5034
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5035
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5036
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5037
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5038
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5039
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5040
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5041
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5042
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5043
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5044
    }/*function_udint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5045
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5046
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5047
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5048
 *UDINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5049
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5050
    case function_udint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5051
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5052
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5053
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5054
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5055
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5056
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5057
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5058
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5059
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5060
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5061
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5062
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5063
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5064
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5065
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5066
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5067
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5068
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5069
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5070
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5071
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5072
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5073
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5074
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5075
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5076
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5077
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5078
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5079
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5080
    }/*function_udint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5081
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5082
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5083
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5084
 *UDINT_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5085
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5086
    case function_udint_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5087
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5088
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5089
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5090
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5091
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5092
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5093
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5094
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5095
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5096
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5097
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5098
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5099
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5100
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5101
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5102
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5103
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5104
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5105
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5106
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5107
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5108
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5109
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5110
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5111
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5112
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5113
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5114
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5115
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5116
    }/*function_udint_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5117
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5118
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5119
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5120
 *UDINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5121
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5122
    case function_udint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5123
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5124
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5125
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5126
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5127
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5128
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5129
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5130
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5131
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5132
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5133
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5134
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5135
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5136
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5137
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5138
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5139
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5140
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5141
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5142
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5143
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5144
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5145
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5146
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5147
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5148
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5149
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5150
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5151
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5152
    }/*function_udint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5153
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5154
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5155
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5156
 *UDINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5157
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5158
    case function_udint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5159
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5160
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5161
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5162
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5163
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5164
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5165
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5166
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5167
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5168
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5169
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5170
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5171
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5172
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5173
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5174
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5175
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5176
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5177
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5178
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5179
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5180
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5181
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5182
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5183
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5184
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5185
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5186
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5187
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5188
    }/*function_udint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5189
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5190
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5191
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5192
 *UDINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5193
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5194
    case function_udint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5195
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5196
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5197
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5198
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5199
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5200
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5201
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5202
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5203
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5204
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5205
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5206
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5207
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5208
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5209
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5210
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5211
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5212
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5213
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5214
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5215
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5216
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5217
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5218
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5219
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5220
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5221
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5222
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5223
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5224
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5225
    }/*function_udint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5226
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5227
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5228
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5229
 *UDINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5230
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5231
    case function_udint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5232
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5233
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5234
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5235
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5236
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5237
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5238
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5239
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5240
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5241
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5242
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5243
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5244
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5245
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5246
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5247
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5248
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5249
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5250
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5251
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5252
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5253
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5254
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5255
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5256
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5257
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5258
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5259
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5260
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5261
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5262
    }/*function_udint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5263
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5264
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5265
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5266
 *UDINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5267
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5268
    case function_udint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5269
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5270
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5271
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5272
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5273
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5274
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5275
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5276
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5277
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5278
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5279
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5280
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5281
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5282
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5283
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5284
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5285
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5286
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5287
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5288
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5289
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5290
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5291
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5292
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5293
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5294
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5295
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5296
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5297
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5298
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5299
    }/*function_udint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5300
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5301
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5302
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5303
 *UDINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5304
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5305
    case function_udint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5306
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5307
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5308
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5309
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5310
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5311
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5312
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5313
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5314
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5315
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5316
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5317
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5318
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5319
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5320
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5321
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5322
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5323
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5324
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5325
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5326
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5327
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5328
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5329
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5330
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5331
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5332
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5333
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5334
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5335
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5336
    }/*function_udint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5337
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5338
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5339
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5340
 *UDINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5341
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5342
    case function_udint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5343
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5344
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5345
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5346
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5347
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5348
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5349
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5350
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5351
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5352
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5353
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5354
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5355
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5356
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5357
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5358
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5359
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5360
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5361
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5362
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5363
                s4o.print(")__uint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5364
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5365
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5366
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5367
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5368
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5369
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5370
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5371
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5372
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5373
    }/*function_udint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5374
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5375
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5376
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5377
 *UDINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5378
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5379
    case function_udint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5380
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5381
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5382
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5383
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5384
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5385
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5386
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5387
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5388
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5389
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5390
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5391
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5392
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5393
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5394
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5395
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5396
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5397
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5398
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5399
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5400
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5401
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5402
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5403
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5404
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5405
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5406
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5407
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5408
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5409
    }/*function_udint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5410
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5411
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5412
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5413
 *UDINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5414
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5415
    case function_udint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5416
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5417
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5418
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5419
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5420
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5421
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5422
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5423
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5424
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5425
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5426
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5427
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5428
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5429
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5430
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5431
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5432
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5433
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5434
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5435
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5436
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5437
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5438
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5439
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5440
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5441
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5442
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5443
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5444
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5445
    }/*function_udint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5446
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5447
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5448
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5449
 *UDINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5450
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5451
    case function_udint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5452
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5453
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5454
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5455
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5456
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5457
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5458
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5459
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5460
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5461
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5462
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5463
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5464
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5465
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5466
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5467
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5468
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5469
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5470
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5471
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5472
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5473
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5474
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5475
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5476
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5477
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5478
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5479
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5480
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5481
    }/*function_udint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5482
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5483
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5484
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5485
 *UDINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5486
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5487
    case function_udint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5488
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5489
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5490
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5491
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5492
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5493
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5494
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5495
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5496
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5497
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5498
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5499
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5500
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5501
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5502
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5503
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5504
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5505
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5506
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5507
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5508
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5509
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5510
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5511
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5512
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5513
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5514
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5515
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5516
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5517
    }/*function_udint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5518
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5519
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5520
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5521
 *ULINT_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5522
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5523
    case function_ulint_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5524
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5525
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5526
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5527
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5528
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5529
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5530
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5531
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5532
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5533
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5534
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5535
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5536
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5537
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5538
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5539
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5540
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5541
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5542
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5543
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5544
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5545
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5546
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5547
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5548
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5549
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5550
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5551
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5552
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5553
    }/*function_ulint_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5554
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5555
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5556
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5557
 *ULINT_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5558
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5559
    case function_ulint_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5560
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5561
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5562
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5563
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5564
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5565
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5566
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5567
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5568
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5569
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5570
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5571
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5572
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5573
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5574
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5575
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5576
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5577
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5578
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5579
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5580
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5581
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5582
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5583
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5584
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5585
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5586
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5587
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5588
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5589
    }/*function_ulint_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5590
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5591
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5592
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5593
 *ULINT_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5594
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5595
    case function_ulint_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5596
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5597
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5598
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5599
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5600
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5601
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5602
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5603
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5604
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5605
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5606
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5607
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5608
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5609
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5610
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5611
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5612
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5613
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5614
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5615
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5616
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5617
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5618
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5619
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5620
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5621
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5622
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5623
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5624
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5625
    }/*function_ulint_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5626
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5627
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5628
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5629
 *ULINT_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5630
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5631
    case function_ulint_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5632
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5633
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5634
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5635
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5636
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5637
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5638
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5639
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5640
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5641
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5642
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5643
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5644
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5645
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5646
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5647
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5648
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5649
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5650
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5651
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5652
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5653
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5654
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5655
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5656
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5657
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5658
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5659
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5660
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5661
    }/*function_ulint_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5662
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5663
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5664
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5665
 *ULINT_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5666
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5667
    case function_ulint_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5668
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5669
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5670
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5671
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5672
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5673
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5674
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5675
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5676
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5677
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5678
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5679
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5680
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5681
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5682
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5683
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5684
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5685
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5686
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5687
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5688
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5689
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5690
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5691
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5692
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5693
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5694
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5695
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5696
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5697
    }/*function_ulint_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5698
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5699
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5700
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5701
 *ULINT_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5702
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5703
    case function_ulint_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5704
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5705
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5706
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5707
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5708
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5709
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5710
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5711
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5712
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5713
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5714
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5715
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5716
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5717
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5718
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5719
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5720
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5721
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5722
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5723
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5724
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5725
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5726
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5727
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5728
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5729
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5730
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5731
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5732
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5733
    }/*function_ulint_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5734
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5735
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5736
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5737
 *ULINT_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5738
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5739
    case function_ulint_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5740
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5741
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5742
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5743
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5744
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5745
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5746
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5747
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5748
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5749
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5750
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5751
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5752
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5753
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5754
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5755
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5756
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5757
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5758
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5759
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5760
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5761
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5762
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5763
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5764
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5765
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5766
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5767
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5768
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5769
    }/*function_ulint_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5770
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5771
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5772
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5773
 *ULINT_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5774
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5775
    case function_ulint_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5776
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5777
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5778
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5779
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5780
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5781
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5782
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5783
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5784
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5785
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5786
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5787
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5788
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5789
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5790
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5791
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5792
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5793
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5794
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5795
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5796
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5797
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5798
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5799
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5800
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5801
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5802
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5803
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5804
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5805
    }/*function_ulint_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5806
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5807
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5808
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5809
 *ULINT_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5810
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5811
    case function_ulint_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5812
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5813
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5814
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5815
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5816
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5817
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5818
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5819
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5820
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5821
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5822
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5823
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5824
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5825
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5826
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5827
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5828
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5829
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5830
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5831
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5832
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5833
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5834
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5835
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5836
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5837
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5838
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5839
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5840
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5841
    }/*function_ulint_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5842
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5843
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5844
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5845
 *ULINT_TO_LREAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5846
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5847
    case function_ulint_to_lreal :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5848
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5849
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5850
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5851
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5852
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5853
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5854
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5855
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5856
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5857
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5858
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5859
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5860
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5861
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5862
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5863
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5864
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5865
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5866
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5867
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5868
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5869
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5870
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5871
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5872
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5873
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5874
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5875
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5876
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5877
    }/*function_ulint_to_lreal*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5878
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5879
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5880
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5881
 *ULINT_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5882
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5883
    case function_ulint_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5884
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5885
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5886
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5887
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5888
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5889
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5890
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5891
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5892
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5893
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5894
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5895
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5896
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5897
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5898
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5899
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5900
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5901
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5902
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5903
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5904
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5905
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5906
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5907
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5908
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5909
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5910
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5911
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5912
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5913
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5914
    }/*function_ulint_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5915
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5916
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5917
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5918
 *ULINT_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5919
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5920
    case function_ulint_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5921
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5922
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5923
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5924
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5925
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5926
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5927
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5928
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5929
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5930
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5931
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5932
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5933
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5934
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5935
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5936
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5937
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5938
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5939
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5940
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5941
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5942
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5943
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5944
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5945
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5946
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5947
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5948
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5949
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5950
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5951
    }/*function_ulint_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5952
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5953
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5954
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5955
 *ULINT_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5956
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5957
    case function_ulint_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5958
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5959
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5960
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5961
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5962
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5963
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5964
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5965
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5966
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5967
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5968
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5969
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5970
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5971
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  5972
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5973
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5974
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5975
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5976
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5977
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5978
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5979
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5980
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5981
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5982
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5983
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5984
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5985
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5986
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5987
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5988
    }/*function_ulint_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5989
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5990
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5991
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5992
 *ULINT_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5993
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5994
    case function_ulint_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5995
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5996
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5997
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5998
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  5999
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6000
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6001
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6002
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6003
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6004
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6005
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6006
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6007
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6008
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6009
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6010
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6011
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6012
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6013
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6014
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6015
                s4o.print(")__int_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6016
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6017
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6018
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6019
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6020
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6021
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6022
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6023
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6024
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6025
    }/*function_ulint_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6026
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6027
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6028
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6029
 *ULINT_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6030
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6031
    case function_ulint_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6032
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6033
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6034
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6035
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6036
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6037
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6038
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6039
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6040
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6041
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6042
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6043
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6044
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6045
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6046
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6047
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6048
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6049
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6050
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6051
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6052
                s4o.print(")__uint_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6053
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6054
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6055
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6056
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6057
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6058
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6059
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6060
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6061
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6062
    }/*function_ulint_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6063
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6064
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6065
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6066
 *ULINT_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6067
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6068
    case function_ulint_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6069
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6070
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6071
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6072
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6073
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6074
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6075
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6076
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6077
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6078
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6079
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6080
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6081
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6082
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6083
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6084
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6085
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6086
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6087
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6088
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6089
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6090
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6091
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6092
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6093
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6094
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6095
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6096
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6097
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6098
    }/*function_ulint_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6099
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6100
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6101
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6102
 *ULINT_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6103
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6104
    case function_ulint_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6105
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6106
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6107
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6108
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6109
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6110
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6111
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6112
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6113
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6114
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6115
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6116
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6117
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6118
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6119
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6120
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6121
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6122
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6123
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6124
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6125
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6126
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6127
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6128
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6129
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6130
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6131
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6132
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6133
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6134
    }/*function_ulint_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6135
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6136
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6137
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6138
 *ULINT_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6139
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6140
    case function_ulint_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6141
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6142
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6143
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6144
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6145
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6146
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6147
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6148
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6149
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6150
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6151
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6152
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6153
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6154
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6155
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6156
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6157
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6158
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6159
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6160
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6161
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6162
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6163
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6164
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6165
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6166
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6167
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6168
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6169
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6170
    }/*function_ulint_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6171
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6172
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6173
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6174
 *ULINT_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6175
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6176
    case function_ulint_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6177
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6178
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6179
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6180
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6181
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6182
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6183
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6184
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6185
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6186
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6187
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6188
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6189
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6190
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6191
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6192
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6193
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6194
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6195
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6196
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6197
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6198
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6199
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6200
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6201
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6202
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6203
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6204
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6205
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6206
    }/*function_ulint_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6207
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6208
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6209
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6210
 *REAL_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6211
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6212
    case function_real_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6213
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6214
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6215
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6216
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6217
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6218
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6219
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6220
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6221
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6222
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6223
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6224
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6225
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6226
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6227
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6228
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6229
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6230
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6231
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6232
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6233
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6234
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6235
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6236
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6237
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6238
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6239
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6240
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6241
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6242
    }/*function_real_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6243
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6244
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6245
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6246
 *REAL_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6247
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6248
    case function_real_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6249
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6250
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6251
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6252
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6253
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6254
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6255
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6256
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6257
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6258
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6259
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6260
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6261
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6262
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6263
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6264
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6265
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6266
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6267
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6268
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6269
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6270
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6271
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6272
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6273
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6274
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6275
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6276
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6277
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6278
    }/*function_real_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6279
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6280
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6281
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6282
 *REAL_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6283
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6284
    case function_real_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6285
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6286
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6287
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6288
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6289
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6290
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6291
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6292
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6293
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6294
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6295
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6296
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6297
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6298
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6299
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6300
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6301
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6302
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6303
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6304
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6305
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6306
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6307
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6308
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6309
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6310
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6311
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6312
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6313
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6314
    }/*function_real_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6315
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6316
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6317
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6318
 *REAL_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6319
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6320
    case function_real_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6321
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6322
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6323
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6324
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6325
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6326
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6327
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6328
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6329
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6330
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6331
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6332
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6333
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6334
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6335
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6336
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6337
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6338
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6339
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6340
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6341
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6342
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6343
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6344
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6345
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6346
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6347
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6348
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6349
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6350
    }/*function_real_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6351
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6352
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6353
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6354
 *REAL_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6355
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6356
    case function_real_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6357
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6358
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6359
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6360
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6361
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6362
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6363
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6364
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6365
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6366
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6367
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6368
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6369
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6370
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6371
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6372
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6373
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6374
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6375
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6376
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6377
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6378
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6379
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6380
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6381
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6382
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6383
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6384
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6385
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6386
    }/*function_real_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6387
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6388
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6389
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6390
 *REAL_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6391
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6392
    case function_real_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6393
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6394
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6395
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6396
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6397
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6398
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6399
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6400
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6401
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6402
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6403
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6404
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6405
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6406
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6407
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6408
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6409
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6410
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6411
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6412
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6413
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6414
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6415
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6416
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6417
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6418
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6419
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6420
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6421
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6422
    }/*function_real_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6423
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6424
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6425
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6426
 *REAL_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6427
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6428
    case function_real_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6429
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6430
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6431
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6432
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6433
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6434
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6435
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6436
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6437
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6438
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6439
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6440
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6441
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6442
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6443
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6444
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6445
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6446
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6447
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6448
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6449
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6450
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6451
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6452
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6453
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6454
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6455
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6456
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6457
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6458
    }/*function_real_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6459
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6460
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6461
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6462
 *REAL_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6463
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6464
    case function_real_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6465
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6466
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6467
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6468
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6469
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6470
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6471
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6472
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6473
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6474
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6475
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6476
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6477
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6478
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6479
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6480
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6481
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6482
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6483
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6484
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6485
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6486
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6487
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6488
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6489
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6490
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6491
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6492
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6493
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6494
    }/*function_real_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6495
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6496
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6497
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6498
 *REAL_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6499
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6500
    case function_real_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6501
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6502
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6503
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6504
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6505
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6506
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6507
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6508
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6509
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6510
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6511
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6512
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6513
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6514
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6515
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6516
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6517
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6518
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6519
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6520
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6521
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6522
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6523
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6524
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6525
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6526
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6527
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6528
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6529
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6530
    }/*function_real_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6531
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6532
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6533
/****
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6534
 *REAL_TO_LREAL
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6535
 */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6536
    case function_real_to_lreal :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6537
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6538
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6539
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6540
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6541
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6542
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6543
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6544
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6545
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6546
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6547
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6548
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6549
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6550
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6551
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6552
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6553
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6554
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6555
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6556
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6557
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6558
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6559
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6560
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6561
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6562
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6563
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6564
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6565
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6566
    }/*function_real_to_lreal*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6567
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
  6568
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
  6569
/****
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6570
 *REAL_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6571
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6572
    case function_real_to_time :
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6573
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6574
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6575
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6576
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6577
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6578
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6579
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6580
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6581
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6582
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6583
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6584
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6585
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6586
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6587
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6588
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6589
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6590
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6591
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6592
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6593
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6594
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6595
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6596
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6597
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6598
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6599
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6600
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6601
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6602
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6603
    }/*function_real_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6604
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6605
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6606
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6607
 *REAL_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6608
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6609
    case function_real_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6610
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6611
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6612
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6613
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6614
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6615
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6616
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6617
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6618
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6619
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6620
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6621
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6622
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6623
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6624
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6625
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6626
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6627
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6628
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6629
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6630
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6631
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6632
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6633
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6634
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6635
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6636
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6637
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6638
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6639
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6640
    }/*function_real_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6641
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6642
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6643
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6644
 *REAL_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6645
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6646
    case function_real_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6647
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6648
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6649
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6650
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6651
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6652
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6653
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6654
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6655
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6656
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6657
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6658
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6659
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6660
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6661
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6662
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6663
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6664
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6665
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6666
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6667
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6668
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6669
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6670
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6671
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6672
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6673
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6674
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6675
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6676
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6677
    }/*function_real_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6678
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6679
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6680
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6681
 *REAL_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6682
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6683
    case function_real_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6684
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6685
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6686
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6687
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6688
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6689
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6690
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6691
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6692
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6693
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6694
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6695
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6696
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6697
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6698
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6699
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6700
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6701
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6702
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6703
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6704
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6705
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6706
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6707
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6708
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6709
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6710
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6711
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6712
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6713
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6714
    }/*function_real_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6715
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6716
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6717
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6718
 *REAL_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6719
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6720
    case function_real_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6721
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6722
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6723
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6724
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6725
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6726
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6727
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6728
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6729
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6730
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6731
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6732
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6733
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6734
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6735
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6736
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6737
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6738
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6739
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6740
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6741
                s4o.print(")__real_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6742
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6743
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6744
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6745
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6746
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6747
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6748
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6749
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6750
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6751
    }/*function_real_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6752
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6753
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6754
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6755
 *REAL_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6756
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6757
    case function_real_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6758
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6759
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6760
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6761
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6762
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6763
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6764
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6765
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6766
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6767
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6768
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6769
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6770
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6771
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6772
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6773
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6774
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6775
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6776
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6777
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6778
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6779
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6780
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6781
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6782
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6783
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6784
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6785
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6786
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6787
    }/*function_real_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6788
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6789
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6790
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6791
 *REAL_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6792
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6793
    case function_real_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6794
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6795
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6796
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6797
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6798
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6799
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6800
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6801
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6802
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6803
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6804
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6805
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6806
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6807
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6808
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6809
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6810
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6811
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6812
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6813
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6814
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6815
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6816
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6817
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6818
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6819
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6820
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6821
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6822
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6823
    }/*function_real_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6824
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6825
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6826
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6827
 *REAL_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6828
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6829
    case function_real_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6830
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6831
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6832
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6833
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6834
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6835
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6836
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6837
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6838
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6839
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6840
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6841
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6842
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6843
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6844
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6845
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6846
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6847
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6848
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6849
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6850
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6851
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6852
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6853
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6854
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6855
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6856
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6857
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6858
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6859
    }/*function_real_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6860
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6861
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6862
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6863
 *REAL_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6864
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6865
    case function_real_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6866
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6867
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6868
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6869
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6870
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6871
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6872
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6873
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6874
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6875
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6876
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6877
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6878
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6879
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6880
            if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6881
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6882
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6883
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6884
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6885
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6886
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6887
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6888
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6889
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6890
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6891
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6892
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6893
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6894
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6895
    }/*function_real_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6896
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6897
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6898
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6899
 *LREAL_TO_BOOL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6900
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6901
    case function_lreal_to_bool :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6902
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6903
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6904
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6905
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6906
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6907
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6908
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6909
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6910
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6911
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6912
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6913
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6914
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6915
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6916
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6917
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6918
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6919
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6920
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6921
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6922
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6923
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6924
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6925
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6926
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6927
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6928
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6929
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6930
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6931
    }/*function_lreal_to_bool*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6932
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6933
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6934
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6935
 *LREAL_TO_SINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6936
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6937
    case function_lreal_to_sint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6938
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6939
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6940
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6941
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6942
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6943
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6944
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6945
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6946
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6947
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6948
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6949
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6950
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6951
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6952
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6953
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6954
        
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6955
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6956
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6957
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6958
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6959
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6960
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6961
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6962
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6963
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6964
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6965
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6966
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6967
    }/*function_lreal_to_sint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6968
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6969
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6970
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6971
 *LREAL_TO_INT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6972
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6973
    case function_lreal_to_int :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6974
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6975
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6976
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6977
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6978
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6979
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6980
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6981
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6982
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6983
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6984
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6985
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6986
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  6987
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  6988
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6989
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6990
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6991
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6992
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6993
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6994
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6995
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6996
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6997
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6998
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  6999
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7000
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7001
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7002
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7003
    }/*function_lreal_to_int*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7004
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7005
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7006
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7007
 *LREAL_TO_DINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7008
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7009
    case function_lreal_to_dint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7010
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7011
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7012
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7013
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7014
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7015
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7016
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7017
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7018
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7019
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7020
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7021
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7022
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7023
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7024
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7025
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7026
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7027
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7028
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7029
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7030
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7031
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7032
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7033
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7034
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7035
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7036
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7037
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7038
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7039
    }/*function_lreal_to_dint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7040
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7041
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7042
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7043
 *LREAL_TO_LINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7044
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7045
    case function_lreal_to_lint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7046
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7047
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7048
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7049
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7050
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7051
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7052
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7053
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7054
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7055
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7056
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7057
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7058
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7059
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7060
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7061
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7062
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7063
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7064
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7065
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7066
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7067
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7068
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7069
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7070
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7071
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7072
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7073
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7074
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7075
    }/*function_lreal_to_lint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7076
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7077
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7078
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7079
 *LREAL_TO_USINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7080
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7081
    case function_lreal_to_usint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7082
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7083
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7084
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7085
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7086
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7087
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7088
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7089
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7090
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7091
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7092
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7093
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7094
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7095
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7096
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7097
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7098
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7099
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7100
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7101
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7102
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7103
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7104
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7105
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7106
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7107
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7108
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7109
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7110
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7111
    }/*function_lreal_to_usint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7112
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7113
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7114
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7115
 *LREAL_TO_UINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7116
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7117
    case function_lreal_to_uint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7118
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7119
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7120
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7121
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7122
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7123
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7124
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7125
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7126
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7127
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7128
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7129
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7130
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7131
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7132
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7133
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7134
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7135
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7136
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7137
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7138
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7139
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7140
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7141
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7142
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7143
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7144
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7145
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7146
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7147
    }/*function_lreal_to_uint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7148
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7149
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7150
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7151
 *LREAL_TO_UDINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7152
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7153
    case function_lreal_to_udint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7154
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7155
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7156
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7157
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7158
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7159
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7160
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7161
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7162
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7163
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7164
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7165
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7166
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7167
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7168
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7169
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7170
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7171
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7172
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7173
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7174
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7175
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7176
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7177
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7178
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7179
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7180
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7181
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7182
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7183
    }/*function_lreal_to_udint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7184
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7185
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7186
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7187
 *LREAL_TO_ULINT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7188
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7189
    case function_lreal_to_ulint :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7190
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7191
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7192
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7193
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7194
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7195
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7196
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7197
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7198
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7199
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7200
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7201
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7202
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7203
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7204
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7205
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7206
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7207
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7208
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7209
                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7210
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7211
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7212
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7213
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7214
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7215
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7216
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7217
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7218
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7219
    }/*function_lreal_to_ulint*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7220
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7221
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7222
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7223
 *LREAL_TO_REAL
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7224
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7225
    case function_lreal_to_real :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7226
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7227
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7228
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7229
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7230
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7231
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7232
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7233
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7234
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7235
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7236
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7237
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7238
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7239
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7240
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7241
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7242
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7243
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7244
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7245
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7246
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7247
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7248
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7249
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7250
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7251
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7252
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7253
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7254
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7255
    }/*function_lreal_to_real*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7256
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7257
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7258
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7259
 *LREAL_TO_TIME
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7260
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7261
    case function_lreal_to_time :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7262
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7263
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7264
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7265
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7266
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7267
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7268
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7269
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7270
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7271
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7272
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7273
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7274
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7275
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7276
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7277
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7278
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7279
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7280
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7281
                return_type_symbol->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
  7282
                s4o.print(")__real_to_time(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7283
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7284
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7285
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7286
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7287
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7288
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7289
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7290
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  7291
        
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7292
    }/*function_lreal_to_time*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7293
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7294
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7295
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7296
 *LREAL_TO_DATE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7297
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7298
    case function_lreal_to_date :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7299
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7300
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7301
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7302
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7303
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7304
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7305
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7306
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7307
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7308
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7309
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7310
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7311
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7312
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7313
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7314
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7315
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7316
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7317
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7318
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7319
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7320
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7321
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7322
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7323
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7324
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7325
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7326
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7327
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7328
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7329
    }/*function_lreal_to_date*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7330
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7331
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7332
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7333
 *LREAL_TO_TOD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7334
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7335
    case function_lreal_to_tod :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7336
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7337
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7338
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7339
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7340
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7341
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7342
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7343
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7344
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7345
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7346
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7347
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7348
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7349
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7350
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7351
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7352
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7353
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7354
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7355
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7356
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7357
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7358
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7359
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7360
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7361
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7362
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7363
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7364
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7365
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7366
    }/*function_lreal_to_tod*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7367
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7368
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7369
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7370
 *LREAL_TO_DT
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7371
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7372
    case function_lreal_to_dt :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7373
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7374
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7375
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7376
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7377
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7378
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7379
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7380
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7381
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7382
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7383
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7384
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7385
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7386
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7387
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7388
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7389
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7390
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7391
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7392
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7393
                s4o.print(")__real_to_time(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7394
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7395
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7396
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7397
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7398
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7399
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7400
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7401
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7402
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7403
    }/*function_lreal_to_dt*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7404
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7405
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7406
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7407
 *LREAL_TO_STRING
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7408
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7409
    case function_lreal_to_string :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7410
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7411
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7412
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7413
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7414
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7415
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7416
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7417
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7418
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7419
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7420
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7421
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7422
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7423
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7424
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7425
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7426
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7427
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7428
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7429
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7430
                s4o.print(")__real_to_string(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7431
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7432
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7433
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7434
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7435
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7436
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7437
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7438
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7439
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7440
    }/*function_lreal_to_string*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7441
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7442
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7443
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7444
 *LREAL_TO_BYTE
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7445
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7446
    case function_lreal_to_byte :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7447
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7448
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7449
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7450
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7451
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7452
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7453
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7454
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7455
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7456
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7457
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7458
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7459
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7460
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7461
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7462
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7463
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7464
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7465
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7466
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7467
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7468
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7469
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7470
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7471
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7472
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7473
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7474
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7475
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7476
    }/*function_lreal_to_byte*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7477
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7478
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7479
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7480
 *LREAL_TO_WORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7481
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7482
    case function_lreal_to_word :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7483
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7484
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7485
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7486
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7487
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7488
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7489
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7490
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7491
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7492
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7493
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7494
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7495
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7496
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7497
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7498
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7499
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7500
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7501
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7502
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7503
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7504
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7505
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7506
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7507
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7508
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7509
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7510
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7511
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7512
    }/*function_lreal_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7513
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7514
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7515
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7516
 *LREAL_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7517
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7518
    case function_lreal_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7519
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7520
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7521
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7522
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7523
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7524
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7525
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7526
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7527
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7528
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7529
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7530
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7531
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7532
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7533
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7534
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7535
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7536
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7537
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7538
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7539
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7540
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7541
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7542
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7543
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7544
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7545
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7546
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7547
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7548
    }/*function_lreal_to_dword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7549
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7550
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7551
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7552
 *LREAL_TO_LWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7553
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7554
    case function_lreal_to_lword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7555
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7556
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7557
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7558
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7559
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7560
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7561
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7562
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7563
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7564
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7565
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7566
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7567
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7568
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7569
            if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7570
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7571
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7572
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7573
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7574
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7575
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7576
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7577
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7578
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7579
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7580
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7581
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7582
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7583
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7584
    }/*function_lreal_to_lword*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7585
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7586
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  7587
/****
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7588
 *TIME_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7589
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7590
    case function_time_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7591
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7592
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7593
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7594
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7595
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7596
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7597
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7598
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7599
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7600
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7601
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7602
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7603
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7604
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7605
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7606
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7607
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7608
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7609
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7610
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7611
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7612
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7613
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7614
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7615
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7616
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7617
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7618
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7619
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7620
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7621
    }/*function_time_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7622
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7623
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7624
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7625
 *TIME_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7626
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7627
    case function_time_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7628
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7629
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7630
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7631
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7632
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7633
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7634
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7635
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7636
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7637
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7638
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7639
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7640
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7641
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7642
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7643
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7644
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7645
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7646
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7647
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7648
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7649
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7650
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7651
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7652
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7653
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7654
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7655
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7656
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7657
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7658
    }/*function_time_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7659
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7660
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7661
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7662
 *TIME_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7663
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7664
    case function_time_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7665
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7666
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7667
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7668
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7669
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7670
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7671
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7672
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7673
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7674
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7675
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7676
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7677
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7678
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7679
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7680
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7681
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7682
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7683
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7684
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7685
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7686
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7687
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7688
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7689
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7690
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7691
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7692
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7693
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7694
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7695
    }/*function_time_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7696
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7697
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7698
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7699
 *TIME_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7700
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7701
    case function_time_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7702
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7703
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7704
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7705
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7706
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7707
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7708
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7709
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7710
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7711
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7712
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7713
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7714
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7715
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7716
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7717
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7718
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7719
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7720
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7721
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7722
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7723
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7724
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7725
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7726
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7727
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7728
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7729
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7730
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7731
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7732
    }/*function_time_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7733
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7734
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7735
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7736
 *TIME_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7737
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7738
    case function_time_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7739
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7740
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7741
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7742
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7743
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7744
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7745
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7746
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7747
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7748
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7749
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7750
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7751
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7752
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7753
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7754
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7755
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7756
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7757
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7758
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7759
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7760
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7761
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7762
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7763
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7764
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7765
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7766
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7767
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7768
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7769
    }/*function_time_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7770
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7771
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7772
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7773
 *TIME_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7774
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7775
    case function_time_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7776
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7777
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7778
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7779
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7780
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7781
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7782
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7783
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7784
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7785
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7786
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7787
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7788
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7789
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7790
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7791
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7792
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7793
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7794
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7795
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7796
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7797
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7798
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7799
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7800
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7801
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7802
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7803
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7804
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7805
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7806
    }/*function_time_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7807
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7808
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7809
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7810
 *TIME_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7811
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7812
    case function_time_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7813
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7814
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7815
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7816
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7817
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7818
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7819
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7820
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7821
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7822
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7823
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7824
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7825
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7826
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7827
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7828
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7829
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7830
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7831
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7832
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7833
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7834
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7835
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7836
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7837
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7838
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7839
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7840
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7841
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7842
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7843
    }/*function_time_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7844
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7845
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7846
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7847
 *TIME_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7848
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7849
    case function_time_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7850
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7851
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7852
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7853
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7854
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7855
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7856
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7857
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7858
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7859
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7860
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7861
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7862
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7863
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7864
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7865
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7866
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7867
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7868
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7869
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7870
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7871
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7872
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7873
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7874
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7875
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7876
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7877
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7878
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7879
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7880
    }/*function_time_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7881
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7882
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7883
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7884
 *TIME_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7885
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7886
    case function_time_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7887
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7888
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7889
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7890
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7891
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7892
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7893
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7894
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7895
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7896
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7897
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7898
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7899
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7900
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7901
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7902
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7903
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7904
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7905
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7906
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7907
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7908
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7909
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7910
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7911
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7912
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7913
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7914
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7915
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7916
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7917
    }/*function_time_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7918
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7919
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7920
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7921
 *TIME_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7922
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7923
    case function_time_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7924
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7925
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7926
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7927
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7928
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7929
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7930
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7931
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7932
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7933
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7934
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7935
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7936
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7937
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7938
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7939
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7940
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7941
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7942
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7943
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7944
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7945
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7946
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7947
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7948
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7949
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7950
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7951
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7952
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7953
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7954
    }/*function_time_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7955
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7956
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7957
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7958
 *TIME_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7959
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7960
    case function_time_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7961
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7962
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7963
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7964
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7965
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7966
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7967
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7968
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7969
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7970
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7971
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7972
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7973
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7974
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7975
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7976
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7977
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7978
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7979
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7980
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7981
                s4o.print(")__time_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7982
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7983
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7984
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7985
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7986
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7987
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7988
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7989
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7990
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7991
    }/*function_time_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7992
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7993
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7994
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7995
 *TIME_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7996
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7997
    case function_time_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7998
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  7999
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8000
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8001
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8002
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8003
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8004
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8005
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8006
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8007
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8008
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8009
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8010
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8011
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8012
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8013
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8014
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8015
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8016
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8017
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8018
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8019
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8020
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8021
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8022
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8023
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8024
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8025
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8026
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8027
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8028
    }/*function_time_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8029
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8030
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8031
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8032
 *TIME_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8033
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8034
    case function_time_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8035
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8036
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8037
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8038
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8039
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8040
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8041
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8042
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8043
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8044
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8045
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8046
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8047
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8048
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8049
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8050
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8051
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8052
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8053
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8054
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8055
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8056
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8057
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8058
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8059
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8060
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8061
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8062
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8063
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8064
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8065
    }/*function_time_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8066
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8067
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8068
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8069
 *TIME_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8070
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8071
    case function_time_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8072
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8073
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8074
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8075
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8076
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8077
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8078
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8079
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8080
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8081
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8082
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8083
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8084
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8085
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8086
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8087
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8088
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8089
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8090
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8091
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8092
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8093
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8094
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8095
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8096
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8097
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8098
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8099
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8100
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8101
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8102
    }/*function_time_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8103
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8104
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8105
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8106
 *TIME_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8107
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8108
    case function_time_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8109
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8110
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8111
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8112
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8113
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8114
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8115
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8116
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8117
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8118
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8119
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8120
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8121
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8122
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8123
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8124
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8125
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8126
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8127
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8128
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8129
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8130
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8131
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8132
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8133
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8134
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8135
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8136
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8137
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8138
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8139
    }/*function_time_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8140
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8141
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8142
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8143
 *DATE_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8144
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8145
    case function_date_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8146
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8147
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8148
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8149
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8150
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8151
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8152
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8153
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8154
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8155
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8156
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8157
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8158
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8159
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8160
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8161
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8162
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8163
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8164
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8165
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8166
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8167
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8168
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8169
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8170
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8171
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8172
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8173
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8174
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8175
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8176
    }/*function_date_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8177
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8178
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8179
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8180
 *DATE_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8181
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8182
    case function_date_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8183
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8184
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8185
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8186
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8187
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8188
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8189
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8190
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8191
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8192
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8193
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8194
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8195
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8196
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8197
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8198
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8199
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8200
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8201
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8202
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8203
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8204
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8205
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8206
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8207
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8208
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8209
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8210
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8211
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8212
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8213
    }/*function_date_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8214
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8215
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8216
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8217
 *DATE_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8218
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8219
    case function_date_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8220
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8221
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8222
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8223
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8224
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8225
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8226
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8227
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8228
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8229
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8230
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8231
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8232
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8233
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8234
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8235
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8236
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8237
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8238
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8239
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8240
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8241
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8242
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8243
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8244
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8245
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8246
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8247
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8248
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8249
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8250
    }/*function_date_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8251
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8252
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8253
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8254
 *DATE_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8255
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8256
    case function_date_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8257
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8258
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8259
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8260
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8261
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8262
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8263
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8264
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8265
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8266
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8267
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8268
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8269
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8270
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8271
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8272
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8273
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8274
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8275
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8276
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8277
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8278
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8279
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8280
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8281
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8282
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8283
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8284
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8285
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8286
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8287
    }/*function_date_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8288
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8289
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8290
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8291
 *DATE_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8292
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8293
    case function_date_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8294
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8295
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8296
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8297
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8298
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8299
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8300
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8301
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8302
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8303
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8304
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8305
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8306
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8307
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8308
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8309
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8310
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8311
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8312
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8313
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8314
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8315
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8316
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8317
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8318
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8319
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8320
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8321
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8322
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8323
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8324
    }/*function_date_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8325
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8326
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8327
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8328
 *DATE_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8329
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8330
    case function_date_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8331
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8332
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8333
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8334
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8335
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8336
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8337
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8338
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8339
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8340
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8341
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8342
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8343
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8344
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8345
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8346
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8347
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8348
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8349
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8350
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8351
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8352
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8353
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8354
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8355
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8356
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8357
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8358
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8359
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8360
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8361
    }/*function_date_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8362
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8363
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8364
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8365
 *DATE_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8366
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8367
    case function_date_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8368
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8369
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8370
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8371
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8372
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8373
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8374
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8375
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8376
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8377
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8378
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8379
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8380
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8381
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8382
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8383
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8384
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8385
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8386
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8387
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8388
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8389
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8390
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8391
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8392
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8393
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8394
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8395
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8396
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8397
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8398
    }/*function_date_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8399
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8400
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8401
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8402
 *DATE_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8403
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8404
    case function_date_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8405
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8406
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8407
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8408
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8409
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8410
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8411
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8412
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8413
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8414
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8415
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8416
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8417
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8418
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8419
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8420
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8421
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8422
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8423
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8424
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8425
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8426
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8427
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8428
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8429
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8430
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8431
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8432
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8433
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8434
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8435
    }/*function_date_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8436
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8437
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8438
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8439
 *DATE_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8440
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8441
    case function_date_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8442
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8443
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8444
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8445
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8446
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8447
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8448
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8449
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8450
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8451
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8452
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8453
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8454
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8455
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8456
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8457
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8458
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8459
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8460
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8461
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8462
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8463
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8464
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8465
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8466
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8467
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8468
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8469
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8470
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8471
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8472
    }/*function_date_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8473
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8474
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8475
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8476
 *DATE_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8477
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8478
    case function_date_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8479
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8480
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8481
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8482
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8483
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8484
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8485
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8486
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8487
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8488
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8489
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8490
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8491
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8492
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8493
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8494
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8495
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8496
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8497
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8498
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8499
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8500
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8501
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8502
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8503
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8504
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8505
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8506
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8507
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8508
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8509
    }/*function_date_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8510
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8511
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8512
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8513
 *DATE_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8514
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8515
    case function_date_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8516
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8517
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8518
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8519
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8520
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8521
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8522
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8523
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8524
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8525
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8526
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8527
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8528
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8529
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8530
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8531
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8532
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8533
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8534
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8535
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8536
                s4o.print(")__date_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8537
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8538
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8539
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8540
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8541
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8542
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8543
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8544
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8545
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8546
    }/*function_date_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8547
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8548
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8549
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8550
 *DATE_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8551
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8552
    case function_date_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8553
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8554
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8555
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8556
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8557
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8558
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8559
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8560
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8561
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8562
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8563
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8564
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8565
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8566
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8567
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8568
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8569
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8570
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8571
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8572
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8573
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8574
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8575
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8576
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8577
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8578
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8579
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8580
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8581
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8582
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8583
    }/*function_date_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8584
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8585
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8586
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8587
 *DATE_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8588
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8589
    case function_date_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8590
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8591
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8592
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8593
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8594
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8595
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8596
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8597
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8598
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8599
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8600
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8601
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8602
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8603
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8604
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8605
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8606
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8607
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8608
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8609
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8610
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8611
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8612
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8613
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8614
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8615
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8616
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8617
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8618
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8619
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8620
    }/*function_date_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8621
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8622
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8623
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8624
 *DATE_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8625
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8626
    case function_date_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8627
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8628
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8629
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8630
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8631
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8632
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8633
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8634
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8635
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8636
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8637
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8638
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8639
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8640
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8641
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8642
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8643
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8644
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8645
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8646
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8647
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8648
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8649
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8650
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8651
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8652
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8653
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8654
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8655
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8656
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8657
    }/*function_date_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8658
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8659
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8660
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8661
 *DATE_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8662
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8663
    case function_date_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8664
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8665
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8666
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8667
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8668
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8669
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8670
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8671
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8672
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8673
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8674
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8675
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8676
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8677
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8678
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8679
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8680
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8681
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8682
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8683
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8684
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8685
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8686
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8687
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8688
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8689
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8690
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8691
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8692
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8693
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8694
    }/*function_date_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8695
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8696
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8697
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8698
 *TOD_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8699
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8700
    case function_tod_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8701
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8702
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8703
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8704
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8705
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8706
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8707
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8708
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8709
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8710
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8711
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8712
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8713
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8714
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8715
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8716
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8717
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8718
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8719
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8720
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8721
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8722
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8723
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8724
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8725
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8726
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8727
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8728
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8729
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8730
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8731
    }/*function_tod_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8732
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8733
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8734
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8735
 *TOD_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8736
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8737
    case function_tod_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8738
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8739
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8740
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8741
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8742
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8743
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8744
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8745
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8746
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8747
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8748
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8749
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8750
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8751
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8752
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8753
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8754
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8755
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8756
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8757
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8758
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8759
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8760
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8761
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8762
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8763
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8764
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8765
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8766
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8767
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8768
    }/*function_tod_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8769
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8770
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8771
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8772
 *TOD_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8773
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8774
    case function_tod_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8775
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8776
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8777
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8778
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8779
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8780
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8781
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8782
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8783
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8784
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8785
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8786
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8787
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8788
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8789
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8790
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8791
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8792
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8793
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8794
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8795
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8796
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8797
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8798
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8799
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8800
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8801
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8802
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8803
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8804
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8805
    }/*function_tod_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8806
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8807
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8808
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8809
 *TOD_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8810
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8811
    case function_tod_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8812
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8813
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8814
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8815
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8816
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8817
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8818
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8819
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8820
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8821
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8822
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8823
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8824
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8825
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8826
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8827
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8828
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8829
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8830
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8831
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8832
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8833
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8834
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8835
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8836
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8837
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8838
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8839
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8840
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8841
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8842
    }/*function_tod_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8843
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8844
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8845
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8846
 *TOD_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8847
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8848
    case function_tod_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8849
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8850
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8851
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8852
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8853
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8854
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8855
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8856
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8857
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8858
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8859
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8860
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8861
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8862
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8863
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8864
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8865
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8866
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8867
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8868
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8869
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8870
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8871
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8872
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8873
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8874
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8875
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8876
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8877
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8878
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8879
    }/*function_tod_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8880
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8881
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8882
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8883
 *TOD_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8884
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8885
    case function_tod_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8886
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8887
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8888
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8889
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8890
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8891
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8892
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8893
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8894
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8895
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8896
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8897
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8898
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8899
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8900
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8901
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8902
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8903
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8904
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8905
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8906
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8907
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8908
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8909
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8910
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8911
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8912
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8913
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8914
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8915
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8916
    }/*function_tod_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8917
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8918
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8919
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8920
 *TOD_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8921
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8922
    case function_tod_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8923
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8924
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8925
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8926
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8927
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8928
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8929
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8930
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8931
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8932
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8933
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8934
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8935
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8936
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8937
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8938
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8939
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8940
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8941
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8942
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8943
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8944
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8945
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8946
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8947
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8948
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8949
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8950
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8951
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8952
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8953
    }/*function_tod_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8954
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8955
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8956
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8957
 *TOD_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8958
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8959
    case function_tod_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8960
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8961
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8962
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8963
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8964
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8965
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8966
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8967
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8968
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8969
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8970
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8971
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8972
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8973
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8974
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8975
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8976
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8977
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8978
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8979
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8980
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8981
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8982
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8983
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8984
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8985
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8986
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8987
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8988
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8989
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8990
    }/*function_tod_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8991
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8992
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8993
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8994
 *TOD_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8995
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8996
    case function_tod_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8997
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8998
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  8999
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9000
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9001
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9002
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9003
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9004
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9005
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9006
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9007
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9008
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9009
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9010
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9011
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9012
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9013
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9014
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9015
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9016
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9017
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9018
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9019
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9020
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9021
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9022
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9023
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9024
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9025
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9026
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9027
    }/*function_tod_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9028
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9029
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9030
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9031
 *TOD_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9032
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9033
    case function_tod_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9034
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9035
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9036
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9037
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9038
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9039
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9040
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9041
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9042
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9043
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9044
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9045
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9046
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9047
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9048
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9049
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9050
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9051
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9052
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9053
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9054
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9055
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9056
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9057
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9058
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9059
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9060
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9061
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9062
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9063
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9064
    }/*function_tod_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9065
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9066
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9067
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9068
 *TOD_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9069
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9070
    case function_tod_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9071
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9072
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9073
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9074
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9075
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9076
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9077
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9078
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9079
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9080
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9081
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9082
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9083
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9084
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9085
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9086
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9087
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9088
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9089
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9090
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9091
                s4o.print(")__tod_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9092
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9093
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9094
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9095
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9096
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9097
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9098
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9099
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9100
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9101
    }/*function_tod_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9102
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9103
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9104
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9105
 *TOD_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9106
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9107
    case function_tod_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9108
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9109
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9110
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9111
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9112
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9113
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9114
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9115
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9116
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9117
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9118
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9119
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9120
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9121
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9122
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9123
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9124
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9125
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9126
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9127
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9128
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9129
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9130
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9131
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9132
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9133
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9134
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9135
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9136
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9137
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9138
    }/*function_tod_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9139
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9140
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9141
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9142
 *TOD_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9143
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9144
    case function_tod_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9145
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9146
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9147
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9148
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9149
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9150
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9151
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9152
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9153
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9154
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9155
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9156
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9157
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9158
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9159
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9160
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9161
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9162
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9163
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9164
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9165
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9166
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9167
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9168
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9169
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9170
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9171
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9172
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9173
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9174
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9175
    }/*function_tod_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9176
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9177
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9178
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9179
 *TOD_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9180
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9181
    case function_tod_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9182
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9183
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9184
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9185
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9186
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9187
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9188
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9189
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9190
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9191
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9192
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9193
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9194
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9195
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9196
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9197
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9198
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9199
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9200
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9201
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9202
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9203
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9204
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9205
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9206
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9207
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9208
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9209
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9210
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9211
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9212
    }/*function_tod_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9213
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9214
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9215
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9216
 *TOD_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9217
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9218
    case function_tod_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9219
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9220
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9221
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9222
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9223
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9224
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9225
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9226
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9227
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9228
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9229
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9230
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9231
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9232
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9233
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9234
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9235
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9236
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9237
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9238
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9239
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9240
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9241
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9242
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9243
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9244
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9245
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9246
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9247
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9248
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9249
    }/*function_tod_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9250
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9251
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9252
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9253
 *DT_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9254
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9255
    case function_dt_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9256
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9257
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9258
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9259
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9260
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9261
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9262
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9263
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9264
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9265
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9266
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9267
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9268
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9269
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9270
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9271
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9272
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9273
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9274
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9275
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9276
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9277
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9278
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9279
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9280
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9281
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9282
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9283
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9284
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9285
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9286
    }/*function_dt_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9287
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9288
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9289
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9290
 *DT_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9291
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9292
    case function_dt_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9293
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9294
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9295
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9296
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9297
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9298
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9299
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9300
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9301
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9302
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9303
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9304
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9305
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9306
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9307
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9308
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9309
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9310
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9311
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9312
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9313
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9314
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9315
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9316
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9317
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9318
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9319
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9320
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9321
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9322
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9323
    }/*function_dt_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9324
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9325
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9326
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9327
 *DT_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9328
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9329
    case function_dt_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9330
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9331
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9332
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9333
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9334
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9335
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9336
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9337
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9338
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9339
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9340
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9341
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9342
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9343
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9344
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9345
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9346
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9347
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9348
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9349
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9350
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9351
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9352
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9353
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9354
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9355
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9356
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9357
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9358
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9359
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9360
    }/*function_dt_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9361
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9362
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9363
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9364
 *DT_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9365
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9366
    case function_dt_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9367
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9368
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9369
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9370
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9371
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9372
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9373
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9374
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9375
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9376
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9377
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9378
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9379
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9380
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9381
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9382
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9383
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9384
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9385
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9386
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9387
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9388
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9389
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9390
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9391
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9392
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9393
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9394
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9395
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9396
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9397
    }/*function_dt_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9398
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9399
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9400
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9401
 *DT_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9402
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9403
    case function_dt_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9404
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9405
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9406
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9407
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9408
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9409
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9410
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9411
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9412
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9413
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9414
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9415
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9416
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9417
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9418
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9419
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9420
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9421
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9422
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9423
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9424
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9425
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9426
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9427
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9428
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9429
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9430
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9431
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9432
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9433
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9434
    }/*function_dt_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9435
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9436
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9437
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9438
 *DT_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9439
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9440
    case function_dt_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9441
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9442
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9443
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9444
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9445
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9446
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9447
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9448
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9449
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9450
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9451
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9452
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9453
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9454
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9455
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9456
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9457
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9458
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9459
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9460
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9461
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9462
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9463
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9464
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9465
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9466
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9467
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9468
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9469
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9470
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9471
    }/*function_dt_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9472
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9473
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9474
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9475
 *DT_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9476
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9477
    case function_dt_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9478
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9479
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9480
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9481
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9482
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9483
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9484
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9485
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9486
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9487
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9488
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9489
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9490
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9491
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9492
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9493
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9494
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9495
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9496
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9497
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9498
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9499
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9500
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9501
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9502
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9503
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9504
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9505
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9506
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9507
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9508
    }/*function_dt_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9509
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9510
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9511
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9512
 *DT_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9513
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9514
    case function_dt_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9515
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9516
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9517
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9518
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9519
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9520
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9521
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9522
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9523
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9524
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9525
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9526
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9527
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9528
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9529
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9530
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9531
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9532
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9533
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9534
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9535
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9536
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9537
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9538
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9539
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9540
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9541
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9542
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9543
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9544
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9545
    }/*function_dt_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9546
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9547
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9548
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9549
 *DT_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9550
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9551
    case function_dt_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9552
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9553
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9554
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9555
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9556
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9557
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9558
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9559
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9560
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9561
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9562
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9563
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9564
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9565
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9566
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9567
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9568
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9569
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9570
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9571
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9572
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9573
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9574
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9575
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9576
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9577
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9578
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9579
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9580
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9581
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9582
    }/*function_dt_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9583
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9584
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9585
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9586
 *DT_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9587
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9588
    case function_dt_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9589
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9590
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9591
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9592
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9593
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9594
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9595
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9596
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9597
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9598
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9599
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9600
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9601
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9602
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9603
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9604
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9605
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9606
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9607
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9608
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9609
                s4o.print(")__time_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9610
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9611
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9612
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9613
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9614
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9615
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9616
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9617
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9618
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9619
    }/*function_dt_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9620
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9621
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9622
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9623
 *DT_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9624
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9625
    case function_dt_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9626
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9627
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9628
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9629
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9630
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9631
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9632
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9633
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9634
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9635
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9636
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9637
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9638
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9639
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9640
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9641
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9642
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9643
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9644
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9645
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9646
                s4o.print(")__dt_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9647
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9648
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9649
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9650
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9651
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9652
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9653
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9654
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9655
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9656
    }/*function_dt_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9657
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9658
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9659
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9660
 *DT_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9661
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9662
    case function_dt_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9663
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9664
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9665
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9666
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9667
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9668
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9669
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9670
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9671
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9672
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9673
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9674
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9675
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9676
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9677
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9678
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9679
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9680
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9681
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9682
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9683
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9684
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9685
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9686
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9687
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9688
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9689
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9690
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9691
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9692
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9693
    }/*function_dt_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9694
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9695
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9696
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9697
 *DT_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9698
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9699
    case function_dt_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9700
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9701
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9702
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9703
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9704
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9705
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9706
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9707
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9708
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9709
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9710
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9711
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9712
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9713
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9714
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9715
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9716
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9717
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9718
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9719
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9720
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9721
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9722
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9723
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9724
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9725
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9726
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9727
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9728
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9729
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9730
    }/*function_dt_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9731
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9732
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9733
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9734
 *DT_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9735
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9736
    case function_dt_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9737
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9738
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9739
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9740
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9741
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9742
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9743
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9744
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9745
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9746
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9747
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9748
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9749
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9750
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9751
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9752
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9753
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9754
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9755
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9756
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9757
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9758
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9759
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9760
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9761
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9762
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9763
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9764
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9765
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9766
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9767
    }/*function_dt_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9768
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9769
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9770
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9771
 *DT_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9772
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9773
    case function_dt_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9774
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9775
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9776
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9777
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9778
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9779
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9780
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9781
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9782
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9783
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9784
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9785
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9786
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9787
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9788
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9789
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9790
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9791
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9792
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9793
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9794
                s4o.print(")__time_to_int(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9795
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9796
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9797
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9798
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9799
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9800
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9801
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9802
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9803
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9804
    }/*function_dt_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9805
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9806
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9807
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9808
 *STRING_TO_BOOL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9809
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9810
    case function_string_to_bool :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9811
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9812
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9813
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9814
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9815
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9816
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9817
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9818
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9819
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9820
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9821
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9822
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9823
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9824
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9825
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  9826
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  9827
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  9828
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  9829
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
  9830
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9831
                s4o.print(")__string_to_bool(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9832
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9833
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9834
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9835
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9836
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9837
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9838
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9839
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9840
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9841
    }/*function_string_to_bool*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9842
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9843
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9844
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9845
 *STRING_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9846
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9847
    case function_string_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9848
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9849
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9850
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9851
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9852
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9853
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9854
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9855
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9856
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9857
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9858
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9859
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9860
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9861
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9862
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9863
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9864
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9865
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9866
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9867
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9868
                s4o.print(")__string_to_sint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9869
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9870
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9871
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9872
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9873
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9874
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9875
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9876
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9877
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9878
    }/*function_string_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9879
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9880
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9881
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9882
 *STRING_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9883
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9884
    case function_string_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9885
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9886
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9887
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9888
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9889
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9890
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9891
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9892
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9893
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9894
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9895
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9896
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9897
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9898
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9899
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9900
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9901
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9902
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9903
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9904
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9905
                s4o.print(")__string_to_sint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9906
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9907
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9908
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9909
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9910
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9911
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9912
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9913
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9914
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9915
    }/*function_string_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9916
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9917
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9918
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9919
 *STRING_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9920
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9921
    case function_string_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9922
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9923
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9924
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9925
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9926
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9927
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9928
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9929
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9930
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9931
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9932
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9933
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9934
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9935
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9936
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9937
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9938
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9939
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9940
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9941
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9942
                s4o.print(")__string_to_sint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9943
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9944
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9945
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9946
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9947
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9948
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9949
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9950
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9951
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9952
    }/*function_string_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9953
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9954
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9955
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9956
 *STRING_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9957
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9958
    case function_string_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9959
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9960
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9961
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9962
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9963
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9964
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9965
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9966
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9967
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9968
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9969
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9970
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9971
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9972
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9973
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9974
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9975
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9976
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9977
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
  9978
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9979
                s4o.print(")__string_to_sint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9980
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9981
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9982
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9983
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9984
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9985
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9986
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9987
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9988
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9989
    }/*function_string_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9990
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9991
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9992
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9993
 *STRING_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9994
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9995
    case function_string_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9996
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9997
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9998
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
  9999
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10000
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10001
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10002
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10003
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10004
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10005
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10006
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10007
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10008
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10009
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10010
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10011
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10012
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10013
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10014
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10015
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10016
                s4o.print(")__string_to_uint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10017
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10018
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10019
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10020
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10021
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10022
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10023
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10024
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10025
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10026
    }/*function_string_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10027
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10028
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10029
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10030
 *STRING_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10031
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10032
    case function_string_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10033
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10034
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10035
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10036
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10037
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10038
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10039
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10040
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10041
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10042
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10043
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10044
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10045
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10046
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10047
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10048
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10049
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10050
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10051
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10052
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10053
                s4o.print(")__string_to_uint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10054
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10055
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10056
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10057
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10058
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10059
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10060
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10061
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10062
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10063
    }/*function_string_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10064
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10065
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10066
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10067
 *STRING_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10068
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10069
    case function_string_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10070
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10071
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10072
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10073
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10074
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10075
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10076
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10077
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10078
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10079
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10080
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10081
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10082
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10083
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10084
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10085
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10086
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10087
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10088
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10089
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10090
                s4o.print(")__string_to_uint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10091
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10092
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10093
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10094
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10095
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10096
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10097
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10098
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10099
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10100
    }/*function_string_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10101
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10102
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10103
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10104
 *STRING_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10105
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10106
    case function_string_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10107
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10108
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10109
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10110
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10111
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10112
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10113
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10114
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10115
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10116
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10117
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10118
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10119
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10120
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10121
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10122
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10123
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10124
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10125
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10126
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10127
                s4o.print(")__string_to_uint(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10128
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10129
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10130
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10131
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10132
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10133
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10134
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10135
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10136
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10137
    }/*function_string_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10138
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10139
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10140
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10141
 *STRING_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10142
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10143
    case function_string_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10144
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10145
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10146
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10147
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10148
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10149
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10150
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10151
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10152
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10153
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10154
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10155
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10156
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10157
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10158
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10159
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10160
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10161
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10162
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10163
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10164
                s4o.print(")__string_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10165
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10166
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10167
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10168
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10169
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10170
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10171
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10172
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10173
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10174
    }/*function_string_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10175
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10176
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10177
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10178
 *STRING_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10179
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10180
    case function_string_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10181
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10182
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10183
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10184
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10185
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10186
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10187
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10188
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10189
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10190
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10191
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10192
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10193
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10194
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10195
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10196
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10197
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10198
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10199
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 10200
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10201
                s4o.print(")__string_to_real(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10202
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10203
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10204
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10205
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10206
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10207
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10208
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10209
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10210
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10211
    }/*function_string_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10212
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10213
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10214
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10215
 *STRING_TO_TIME
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10216
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10217
    case function_string_to_time :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10218
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10219
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10220
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10221
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10222
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10223
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10224
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10225
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10226
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10227
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10228
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10229
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10230
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10231
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10232
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10233
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10234
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10235
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10236
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10237
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10238
                s4o.print(")__string_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10239
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10240
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10241
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10242
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10243
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10244
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10245
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10246
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10247
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10248
    }/*function_string_to_time*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10249
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10250
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10251
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10252
 *STRING_TO_DATE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10253
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10254
    case function_string_to_date :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10255
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10256
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10257
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10258
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10259
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10260
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10261
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10262
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10263
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10264
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10265
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10266
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10267
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10268
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10269
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10270
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10271
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10272
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10273
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10274
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10275
                s4o.print(")__string_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10276
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10277
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10278
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10279
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10280
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10281
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10282
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10283
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10284
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10285
    }/*function_string_to_date*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10286
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10287
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10288
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10289
 *STRING_TO_TOD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10290
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10291
    case function_string_to_tod :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10292
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10293
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10294
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10295
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10296
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10297
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10298
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10299
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10300
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10301
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10302
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10303
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10304
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10305
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10306
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10307
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10308
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10309
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10310
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10311
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10312
                s4o.print(")__string_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10313
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10314
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10315
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10316
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10317
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10318
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10319
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10320
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10321
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10322
    }/*function_string_to_tod*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10323
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10324
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10325
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10326
 *STRING_TO_DT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10327
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10328
    case function_string_to_dt :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10329
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10330
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10331
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10332
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10333
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10334
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10335
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10336
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10337
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10338
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10339
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10340
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10341
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10342
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10343
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10344
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10345
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10346
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10347
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10348
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10349
                s4o.print(")__string_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10350
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10351
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10352
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10353
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10354
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10355
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10356
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10357
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10358
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10359
    }/*function_string_to_dt*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10360
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10361
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10362
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10363
 *STRING_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10364
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10365
    case function_string_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10366
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10367
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10368
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10369
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10370
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10371
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10372
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10373
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10374
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10375
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10376
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10377
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10378
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10379
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10380
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10381
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10382
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10383
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10384
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10385
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10386
                s4o.print(")__string_to_bit(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10387
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10388
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10389
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10390
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10391
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10392
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10393
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10394
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10395
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10396
    }/*function_string_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10397
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10398
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10399
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10400
 *STRING_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10401
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10402
    case function_string_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10403
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10404
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10405
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10406
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10407
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10408
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10409
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10410
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10411
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10412
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10413
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10414
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10415
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10416
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10417
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10418
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10419
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10420
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10421
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10422
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10423
                s4o.print(")__string_to_bit(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10424
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10425
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10426
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10427
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10428
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10429
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10430
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10431
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10432
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10433
    }/*function_string_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10434
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10435
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10436
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10437
 *STRING_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10438
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10439
    case function_string_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10440
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10441
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10442
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10443
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10444
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10445
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10446
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10447
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10448
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10449
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10450
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10451
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10452
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10453
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10454
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10455
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10456
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10457
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10458
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10459
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10460
                s4o.print(")__string_to_bit(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10461
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10462
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10463
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10464
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10465
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10466
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10467
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10468
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10469
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10470
    }/*function_string_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10471
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10472
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10473
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10474
 *STRING_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10475
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10476
    case function_string_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10477
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10478
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10479
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10480
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10481
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10482
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10483
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10484
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10485
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10486
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10487
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10488
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10489
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10490
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10491
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10492
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10493
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10494
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10495
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10496
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10497
                s4o.print(")__string_to_bit(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10498
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10499
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10500
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10501
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10502
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10503
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10504
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10505
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10506
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10507
    }/*function_string_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10508
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10509
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10510
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10511
 *BYTE_TO_BOOL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10512
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10513
    case function_byte_to_bool :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10514
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10515
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10516
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10517
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10518
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10519
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10520
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10521
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10522
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10523
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10524
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10525
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10526
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10527
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10528
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10529
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10530
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10531
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10532
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10533
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10534
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10535
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10536
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10537
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10538
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10539
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10540
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10541
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10542
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10543
    }/*function_byte_to_bool*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10544
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10545
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10546
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10547
 *BYTE_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10548
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10549
    case function_byte_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10550
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10551
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10552
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10553
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10554
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10555
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10556
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10557
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10558
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10559
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10560
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10561
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10562
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10563
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10564
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10565
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10566
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10567
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10568
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10569
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10570
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10571
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10572
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10573
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10574
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10575
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10576
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10577
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10578
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10579
    }/*function_byte_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10580
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10581
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10582
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10583
 *BYTE_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10584
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10585
    case function_byte_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10586
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10587
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10588
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10589
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10590
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10591
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10592
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10593
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10594
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10595
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10596
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10597
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10598
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10599
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10600
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10601
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10602
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10603
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10604
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10605
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10606
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10607
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10608
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10609
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10610
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10611
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10612
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10613
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10614
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10615
    }/*function_byte_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10616
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10617
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10618
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10619
 *BYTE_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10620
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10621
    case function_byte_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10622
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10623
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10624
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10625
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10626
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10627
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10628
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10629
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10630
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10631
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10632
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10633
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10634
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10635
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10636
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10637
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10638
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10639
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10640
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10641
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10642
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10643
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10644
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10645
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10646
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10647
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10648
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10649
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10650
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10651
    }/*function_byte_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10652
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10653
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10654
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10655
 *BYTE_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10656
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10657
    case function_byte_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10658
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10659
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10660
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10661
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10662
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10663
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10664
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10665
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10666
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10667
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10668
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10669
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10670
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10671
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10672
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10673
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10674
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10675
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10676
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10677
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10678
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10679
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10680
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10681
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10682
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10683
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10684
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10685
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10686
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10687
    }/*function_byte_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10688
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10689
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10690
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10691
 *BYTE_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10692
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10693
    case function_byte_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10694
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10695
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10696
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10697
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10698
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10699
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10700
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10701
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10702
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10703
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10704
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10705
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10706
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10707
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10708
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10709
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10710
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10711
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10712
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10713
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10714
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10715
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10716
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10717
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10718
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10719
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10720
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10721
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10722
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10723
    }/*function_byte_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10724
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10725
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10726
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10727
 *BYTE_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10728
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10729
    case function_byte_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10730
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10731
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10732
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10733
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10734
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10735
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10736
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10737
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10738
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10739
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10740
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10741
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10742
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10743
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10744
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10745
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10746
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10747
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10748
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10749
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10750
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10751
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10752
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10753
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10754
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10755
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10756
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10757
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10758
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10759
    }/*function_byte_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10760
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10761
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10762
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10763
 *BYTE_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10764
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10765
    case function_byte_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10766
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10767
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10768
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10769
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10770
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10771
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10772
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10773
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10774
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10775
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10776
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10777
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10778
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10779
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10780
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10781
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10782
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10783
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10784
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10785
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10786
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10787
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10788
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10789
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10790
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10791
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10792
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10793
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10794
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10795
    }/*function_byte_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10796
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10797
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10798
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10799
 *BYTE_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10800
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10801
    case function_byte_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10802
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10803
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10804
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10805
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10806
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10807
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10808
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10809
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10810
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10811
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10812
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10813
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10814
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10815
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10816
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10817
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10818
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10819
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10820
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10821
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10822
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10823
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10824
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10825
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10826
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10827
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10828
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10829
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10830
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10831
    }/*function_byte_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10832
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10833
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10834
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10835
 *BYTE_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10836
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10837
    case function_byte_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10838
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10839
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10840
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10841
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10842
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10843
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10844
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10845
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10846
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10847
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10848
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10849
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10850
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10851
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10852
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10853
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10854
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10855
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10856
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10857
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10858
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10859
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10860
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10861
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10862
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10863
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10864
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10865
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10866
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10867
    }/*function_byte_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10868
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10869
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10870
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10871
 *BYTE_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10872
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10873
    case function_byte_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10874
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10875
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10876
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10877
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10878
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10879
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10880
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10881
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10882
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10883
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10884
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10885
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10886
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10887
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10888
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10889
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10890
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10891
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10892
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10893
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10894
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10895
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10896
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10897
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10898
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10899
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10900
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10901
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10902
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10903
    }/*function_byte_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10904
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10905
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10906
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10907
 *BYTE_TO_TIME
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10908
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10909
    case function_byte_to_time :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10910
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10911
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10912
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10913
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10914
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10915
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10916
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10917
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10918
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10919
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10920
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10921
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10922
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10923
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10924
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10925
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10926
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10927
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10928
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10929
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10930
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10931
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10932
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10933
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10934
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10935
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10936
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10937
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10938
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10939
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10940
    }/*function_byte_to_time*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10941
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10942
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10943
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10944
 *BYTE_TO_DATE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10945
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10946
    case function_byte_to_date :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10947
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10948
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10949
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10950
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10951
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10952
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10953
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10954
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10955
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10956
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10957
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10958
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10959
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10960
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10961
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10962
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10963
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10964
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10965
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10966
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10967
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10968
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10969
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10970
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10971
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10972
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10973
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10974
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10975
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10976
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10977
    }/*function_byte_to_date*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10978
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10979
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10980
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10981
 *BYTE_TO_TOD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10982
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10983
    case function_byte_to_tod :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10984
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10985
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10986
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10987
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10988
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10989
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10990
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10991
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10992
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10993
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10994
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10995
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10996
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10997
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10998
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 10999
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11000
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11001
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11002
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11003
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11004
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11005
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11006
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11007
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11008
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11009
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11010
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11011
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11012
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11013
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11014
    }/*function_byte_to_tod*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11015
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11016
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11017
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11018
 *BYTE_TO_DT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11019
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11020
    case function_byte_to_dt :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11021
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11022
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11023
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11024
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11025
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11026
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11027
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11028
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11029
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11030
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11031
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11032
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11033
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11034
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11035
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11036
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11037
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11038
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11039
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11040
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11041
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11042
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11043
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11044
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11045
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11046
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11047
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11048
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11049
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11050
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11051
    }/*function_byte_to_dt*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11052
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11053
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11054
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11055
 *BYTE_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11056
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11057
    case function_byte_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11058
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11059
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11060
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11061
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11062
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11063
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11064
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11065
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11066
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11067
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11068
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11069
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11070
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11071
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11072
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 11073
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 11074
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 11075
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 11076
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 11077
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11078
                s4o.print(")__bit_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11079
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11080
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11081
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11082
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11083
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11084
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11085
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11086
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11087
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11088
    }/*function_byte_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11089
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11090
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11091
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11092
 *BYTE_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11093
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11094
    case function_byte_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11095
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11096
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11097
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11098
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11099
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11100
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11101
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11102
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11103
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11104
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11105
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11106
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11107
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11108
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11109
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11110
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11111
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11112
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11113
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11114
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11115
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11116
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11117
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11118
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11119
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11120
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11121
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11122
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11123
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11124
    }/*function_byte_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11125
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11126
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11127
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11128
 *BYTE_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11129
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11130
    case function_byte_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11131
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11132
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11133
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11134
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11135
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11136
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11137
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11138
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11139
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11140
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11141
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11142
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11143
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11144
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11145
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11146
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11147
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11148
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11149
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11150
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11151
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11152
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11153
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11154
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11155
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11156
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11157
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11158
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11159
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11160
    }/*function_byte_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11161
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11162
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11163
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11164
 *BYTE_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11165
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11166
    case function_byte_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11167
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11168
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11169
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11170
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11171
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11172
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11173
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11174
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11175
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11176
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11177
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11178
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11179
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11180
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11181
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11182
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11183
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11184
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11185
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11186
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11187
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11188
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11189
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11190
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11191
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11192
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11193
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11194
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11195
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11196
    }/*function_byte_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11197
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11198
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11199
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11200
 *WORD_TO_BOOL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11201
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11202
    case function_word_to_bool :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11203
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11204
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11205
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11206
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11207
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11208
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11209
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11210
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11211
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11212
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11213
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11214
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11215
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11216
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11217
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11218
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11219
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11220
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11221
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11222
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11223
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11224
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11225
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11226
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11227
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11228
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11229
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11230
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11231
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11232
    }/*function_word_to_bool*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11233
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11234
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11235
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11236
 *WORD_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11237
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11238
    case function_word_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11239
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11240
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11241
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11242
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11243
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11244
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11245
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11246
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11247
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11248
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11249
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11250
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11251
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11252
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11253
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11254
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11255
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11256
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11257
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11258
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11259
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11260
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11261
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11262
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11263
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11264
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11265
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11266
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11267
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11268
    }/*function_word_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11269
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11270
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11271
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11272
 *WORD_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11273
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11274
    case function_word_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11275
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11276
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11277
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11278
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11279
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11280
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11281
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11282
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11283
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11284
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11285
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11286
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11287
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11288
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11289
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11290
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11291
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11292
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11293
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11294
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11295
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11296
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11297
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11298
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11299
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11300
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11301
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11302
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11303
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11304
    }/*function_word_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11305
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11306
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11307
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11308
 *WORD_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11309
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11310
    case function_word_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11311
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11312
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11313
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11314
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11315
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11316
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11317
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11318
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11319
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11320
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11321
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11322
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11323
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11324
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11325
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11326
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11327
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11328
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11329
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11330
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11331
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11332
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11333
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11334
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11335
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11336
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11337
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11338
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11339
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11340
    }/*function_word_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11341
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11342
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11343
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11344
 *WORD_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11345
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11346
    case function_word_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11347
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11348
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11349
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11350
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11351
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11352
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11353
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11354
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11355
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11356
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11357
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11358
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11359
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11360
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11361
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11362
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11363
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11364
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11365
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11366
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11367
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11368
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11369
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11370
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11371
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11372
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11373
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11374
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11375
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11376
    }/*function_word_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11377
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11378
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11379
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11380
 *WORD_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11381
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11382
    case function_word_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11383
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11384
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11385
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11386
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11387
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11388
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11389
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11390
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11391
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11392
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11393
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11394
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11395
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11396
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11397
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11398
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11399
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11400
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11401
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11402
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11403
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11404
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11405
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11406
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11407
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11408
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11409
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11410
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11411
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11412
    }/*function_word_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11413
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11414
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11415
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11416
 *WORD_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11417
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11418
    case function_word_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11419
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11420
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11421
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11422
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11423
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11424
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11425
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11426
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11427
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11428
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11429
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11430
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11431
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11432
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11433
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11434
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11435
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11436
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11437
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11438
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11439
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11440
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11441
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11442
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11443
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11444
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11445
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11446
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11447
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11448
    }/*function_word_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11449
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11450
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11451
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11452
 *WORD_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11453
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11454
    case function_word_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11455
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11456
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11457
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11458
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11459
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11460
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11461
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11462
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11463
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11464
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11465
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11466
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11467
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11468
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11469
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11470
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11471
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11472
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11473
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11474
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11475
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11476
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11477
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11478
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11479
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11480
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11481
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11482
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11483
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11484
    }/*function_word_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11485
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11486
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11487
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11488
 *WORD_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11489
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11490
    case function_word_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11491
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11492
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11493
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11494
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11495
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11496
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11497
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11498
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11499
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11500
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11501
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11502
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11503
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11504
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11505
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11506
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11507
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11508
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11509
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11510
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11511
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11512
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11513
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11514
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11515
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11516
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11517
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11518
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11519
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11520
    }/*function_word_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11521
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11522
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11523
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11524
 *WORD_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11525
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11526
    case function_word_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11527
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11528
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11529
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11530
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11531
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11532
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11533
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11534
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11535
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11536
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11537
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11538
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11539
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11540
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11541
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11542
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11543
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11544
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11545
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11546
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11547
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11548
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11549
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11550
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11551
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11552
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11553
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11554
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11555
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11556
    }/*function_word_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11557
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11558
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11559
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11560
 *WORD_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11561
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11562
    case function_word_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11563
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11564
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11565
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11566
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11567
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11568
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11569
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11570
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11571
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11572
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11573
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11574
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11575
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11576
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11577
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11578
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11579
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11580
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11581
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11582
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11583
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11584
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11585
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11586
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11587
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11588
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11589
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11590
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11591
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11592
    }/*function_word_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11593
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11594
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11595
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11596
 *WORD_TO_TIME
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11597
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11598
    case function_word_to_time :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11599
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11600
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11601
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11602
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11603
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11604
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11605
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11606
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11607
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11608
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11609
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11610
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11611
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11612
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11613
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11614
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11615
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11616
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11617
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11618
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11619
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11620
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11621
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11622
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11623
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11624
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11625
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11626
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11627
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11628
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11629
    }/*function_word_to_time*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11630
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11631
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11632
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11633
 *WORD_TO_DATE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11634
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11635
    case function_word_to_date :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11636
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11637
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11638
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11639
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11640
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11641
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11642
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11643
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11644
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11645
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11646
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11647
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11648
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11649
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11650
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11651
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11652
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11653
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11654
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11655
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11656
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11657
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11658
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11659
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11660
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11661
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11662
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11663
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11664
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11665
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11666
    }/*function_word_to_date*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11667
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11668
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11669
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11670
 *WORD_TO_TOD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11671
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11672
    case function_word_to_tod :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11673
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11674
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11675
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11676
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11677
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11678
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11679
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11680
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11681
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11682
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11683
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11684
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11685
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11686
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11687
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11688
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11689
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11690
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11691
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11692
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11693
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11694
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11695
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11696
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11697
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11698
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11699
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11700
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11701
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11702
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11703
    }/*function_word_to_tod*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11704
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11705
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11706
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11707
 *WORD_TO_DT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11708
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11709
    case function_word_to_dt :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11710
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11711
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11712
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11713
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11714
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11715
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11716
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11717
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11718
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11719
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11720
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11721
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11722
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11723
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11724
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11725
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11726
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11727
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11728
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11729
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11730
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11731
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11732
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11733
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11734
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11735
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11736
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11737
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11738
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11739
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11740
    }/*function_word_to_dt*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11741
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11742
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11743
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11744
 *WORD_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11745
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11746
    case function_word_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11747
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11748
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11749
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11750
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11751
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11752
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11753
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11754
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11755
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11756
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11757
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11758
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11759
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11760
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11761
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11762
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11763
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11764
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11765
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11766
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11767
                s4o.print(")__bit_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11768
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11769
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11770
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11771
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11772
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11773
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11774
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11775
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11776
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11777
    }/*function_word_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11778
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11779
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11780
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11781
 *WORD_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11782
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11783
    case function_word_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11784
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11785
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11786
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11787
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11788
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11789
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11790
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11791
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11792
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11793
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11794
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11795
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11796
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11797
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11798
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 11799
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 11800
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 11801
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 11802
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 11803
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11804
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11805
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11806
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11807
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11808
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11809
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11810
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11811
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11812
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11813
    }/*function_word_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11814
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11815
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11816
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11817
 *WORD_TO_DWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11818
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11819
    case function_word_to_dword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11820
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11821
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11822
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11823
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11824
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11825
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11826
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11827
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11828
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11829
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11830
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11831
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11832
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11833
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11834
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11835
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11836
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11837
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11838
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11839
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11840
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11841
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11842
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11843
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11844
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11845
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11846
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11847
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11848
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11849
    }/*function_word_to_dword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11850
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11851
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11852
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11853
 *WORD_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11854
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11855
    case function_word_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11856
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11857
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11858
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11859
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11860
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11861
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11862
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11863
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11864
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11865
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11866
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11867
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11868
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11869
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11870
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11871
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11872
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11873
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11874
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11875
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11876
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11877
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11878
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11879
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11880
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11881
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11882
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11883
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11884
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11885
    }/*function_word_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11886
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11887
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11888
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11889
 *DWORD_TO_BOOL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11890
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11891
    case function_dword_to_bool :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11892
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11893
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11894
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11895
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11896
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11897
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11898
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11899
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11900
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11901
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11902
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11903
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11904
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11905
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11906
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11907
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11908
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11909
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11910
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11911
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11912
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11913
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11914
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11915
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11916
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11917
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11918
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11919
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11920
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11921
    }/*function_dword_to_bool*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11922
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11923
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11924
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11925
 *DWORD_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11926
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11927
    case function_dword_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11928
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11929
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11930
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11931
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11932
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11933
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11934
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11935
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11936
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11937
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11938
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11939
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11940
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11941
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11942
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11943
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11944
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11945
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11946
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11947
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11948
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11949
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11950
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11951
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11952
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11953
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11954
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11955
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11956
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11957
    }/*function_dword_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11958
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11959
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11960
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11961
 *DWORD_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11962
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11963
    case function_dword_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11964
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11965
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11966
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11967
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11968
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11969
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11970
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11971
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11972
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11973
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11974
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11975
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11976
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11977
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11978
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11979
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11980
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11981
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11982
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11983
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11984
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11985
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11986
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11987
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11988
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11989
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11990
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11991
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11992
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11993
    }/*function_dword_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11994
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11995
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11996
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11997
 *DWORD_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11998
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 11999
    case function_dword_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12000
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12001
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12002
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12003
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12004
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12005
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12006
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12007
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12008
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12009
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12010
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12011
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12012
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12013
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12014
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12015
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12016
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12017
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12018
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12019
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12020
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12021
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12022
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12023
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12024
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12025
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12026
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12027
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12028
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12029
    }/*function_dword_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12030
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12031
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12032
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12033
 *DWORD_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12034
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12035
    case function_dword_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12036
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12037
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12038
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12039
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12040
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12041
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12042
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12043
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12044
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12045
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12046
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12047
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12048
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12049
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12050
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12051
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12052
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12053
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12054
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12055
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12056
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12057
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12058
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12059
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12060
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12061
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12062
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12063
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12064
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12065
    }/*function_dword_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12066
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12067
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12068
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12069
 *DWORD_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12070
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12071
    case function_dword_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12072
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12073
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12074
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12075
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12076
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12077
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12078
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12079
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12080
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12081
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12082
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12083
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12084
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12085
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12086
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12087
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12088
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12089
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12090
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12091
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12092
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12093
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12094
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12095
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12096
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12097
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12098
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12099
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12100
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12101
    }/*function_dword_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12102
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12103
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12104
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12105
 *DWORD_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12106
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12107
    case function_dword_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12108
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12109
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12110
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12111
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12112
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12113
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12114
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12115
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12116
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12117
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12118
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12119
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12120
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12121
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12122
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12123
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12124
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12125
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12126
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12127
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12128
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12129
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12130
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12131
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12132
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12133
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12134
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12135
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12136
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12137
    }/*function_dword_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12138
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12139
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12140
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12141
 *DWORD_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12142
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12143
    case function_dword_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12144
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12145
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12146
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12147
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12148
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12149
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12150
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12151
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12152
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12153
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12154
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12155
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12156
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12157
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12158
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12159
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12160
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12161
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12162
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12163
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12164
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12165
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12166
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12167
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12168
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12169
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12170
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12171
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12172
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12173
    }/*function_dword_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12174
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12175
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12176
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12177
 *DWORD_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12178
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12179
    case function_dword_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12180
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12181
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12182
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12183
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12184
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12185
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12186
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12187
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12188
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12189
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12190
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12191
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12192
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12193
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12194
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12195
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12196
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12197
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12198
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12199
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12200
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12201
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12202
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12203
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12204
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12205
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12206
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12207
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12208
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12209
    }/*function_dword_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12210
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12211
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12212
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12213
 *DWORD_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12214
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12215
    case function_dword_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12216
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12217
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12218
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12219
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12220
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12221
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12222
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12223
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12224
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12225
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12226
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12227
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12228
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12229
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12230
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12231
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12232
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12233
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12234
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12235
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12236
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12237
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12238
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12239
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12240
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12241
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12242
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12243
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12244
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12245
    }/*function_dword_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12246
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12247
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12248
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12249
 *DWORD_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12250
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12251
    case function_dword_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12252
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12253
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12254
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12255
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12256
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12257
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12258
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12259
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12260
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12261
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12262
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12263
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12264
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12265
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12266
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12267
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12268
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12269
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12270
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12271
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12272
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12273
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12274
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12275
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12276
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12277
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12278
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12279
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12280
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12281
    }/*function_dword_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12282
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12283
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12284
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12285
 *DWORD_TO_TIME
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12286
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12287
    case function_dword_to_time :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12288
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12289
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12290
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12291
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12292
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12293
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12294
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12295
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12296
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12297
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12298
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12299
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12300
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12301
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12302
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12303
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12304
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12305
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12306
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12307
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12308
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12309
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12310
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12311
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12312
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12313
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12314
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12315
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12316
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12317
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12318
    }/*function_dword_to_time*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12319
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12320
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12321
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12322
 *DWORD_TO_DATE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12323
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12324
    case function_dword_to_date :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12325
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12326
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12327
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12328
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12329
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12330
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12331
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12332
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12333
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12334
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12335
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12336
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12337
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12338
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12339
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12340
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12341
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12342
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12343
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12344
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12345
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12346
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12347
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12348
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12349
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12350
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12351
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12352
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12353
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12354
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12355
    }/*function_dword_to_date*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12356
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12357
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12358
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12359
 *DWORD_TO_TOD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12360
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12361
    case function_dword_to_tod :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12362
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12363
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12364
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12365
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12366
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12367
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12368
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12369
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12370
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12371
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12372
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12373
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12374
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12375
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12376
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12377
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12378
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12379
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12380
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12381
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12382
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12383
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12384
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12385
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12386
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12387
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12388
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12389
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12390
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12391
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12392
    }/*function_dword_to_tod*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12393
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12394
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12395
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12396
 *DWORD_TO_DT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12397
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12398
    case function_dword_to_dt :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12399
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12400
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12401
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12402
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12403
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12404
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12405
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12406
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12407
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12408
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12409
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12410
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12411
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12412
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12413
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12414
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12415
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12416
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12417
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12418
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12419
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12420
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12421
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12422
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12423
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12424
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12425
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12426
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12427
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12428
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12429
    }/*function_dword_to_dt*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12430
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12431
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12432
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12433
 *DWORD_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12434
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12435
    case function_dword_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12436
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12437
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12438
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12439
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12440
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12441
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12442
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12443
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12444
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12445
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12446
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12447
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12448
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12449
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12450
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12451
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12452
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12453
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12454
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12455
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12456
                s4o.print(")__bit_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12457
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12458
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12459
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12460
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12461
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12462
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12463
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12464
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12465
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12466
    }/*function_dword_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12467
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12468
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12469
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12470
 *DWORD_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12471
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12472
    case function_dword_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12473
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12474
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12475
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12476
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12477
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12478
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12479
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12480
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12481
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12482
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12483
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12484
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12485
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12486
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12487
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12488
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12489
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12490
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12491
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12492
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12493
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12494
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12495
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12496
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12497
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12498
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12499
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12500
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12501
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12502
    }/*function_dword_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12503
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12504
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12505
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12506
 *DWORD_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12507
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12508
    case function_dword_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12509
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12510
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12511
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12512
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12513
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12514
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12515
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12516
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12517
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12518
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12519
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12520
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12521
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12522
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12523
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12524
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12525
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12526
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12527
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12528
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12529
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12530
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12531
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12532
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12533
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12534
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12535
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12536
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12537
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12538
    }/*function_dword_to_word*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12539
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12540
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12541
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12542
 *DWORD_TO_LWORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12543
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12544
    case function_dword_to_lword :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12545
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12546
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12547
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12548
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12549
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12550
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12551
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12552
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12553
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12554
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12555
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12556
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12557
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12558
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12559
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12560
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12561
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12562
                symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12563
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 12564
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12565
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12566
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12567
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12568
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12569
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12570
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12571
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12572
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12573
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12574
    }/*function_dword_to_lword*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12575
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12576
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12577
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12578
 *LWORD_TO_BOOL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12579
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12580
    case function_lword_to_bool :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12581
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12582
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12583
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12584
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12585
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12586
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12587
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12588
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12589
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12590
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12591
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12592
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12593
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12594
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12595
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12596
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12597
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12598
                symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12599
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12600
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12601
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12602
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12603
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12604
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12605
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12606
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12607
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12608
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12609
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12610
    }/*function_lword_to_bool*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12611
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12612
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12613
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12614
 *LWORD_TO_SINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12615
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12616
    case function_lword_to_sint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12617
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12618
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12619
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12620
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12621
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12622
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12623
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12624
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12625
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12626
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12627
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12628
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12629
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12630
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12631
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12632
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12633
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12634
                symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12635
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12636
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12637
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12638
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12639
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12640
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12641
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12642
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12643
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12644
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12645
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12646
    }/*function_lword_to_sint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12647
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12648
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12649
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12650
 *LWORD_TO_INT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12651
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12652
    case function_lword_to_int :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12653
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12654
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12655
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12656
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12657
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12658
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12659
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12660
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12661
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12662
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12663
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12664
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12665
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12666
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12667
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12668
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12669
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12670
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12671
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12672
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12673
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12674
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12675
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12676
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12677
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12678
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12679
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12680
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12681
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12682
    }/*function_lword_to_int*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12683
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12684
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12685
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12686
 *LWORD_TO_DINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12687
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12688
    case function_lword_to_dint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12689
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12690
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12691
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12692
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12693
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12694
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12695
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12696
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12697
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12698
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12699
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12700
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12701
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12702
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12703
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12704
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12705
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12706
                symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12707
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12708
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12709
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12710
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12711
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12712
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12713
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12714
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12715
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12716
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12717
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12718
    }/*function_lword_to_dint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12719
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12720
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12721
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12722
 *LWORD_TO_LINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12723
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12724
    case function_lword_to_lint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12725
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12726
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12727
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12728
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12729
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12730
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12731
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12732
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12733
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12734
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12735
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12736
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12737
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12738
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12739
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12740
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12741
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12742
                symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12743
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12744
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12745
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12746
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12747
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12748
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12749
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12750
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12751
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12752
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12753
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12754
    }/*function_lword_to_lint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12755
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12756
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12757
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12758
 *LWORD_TO_USINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12759
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12760
    case function_lword_to_usint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12761
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12762
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12763
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12764
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12765
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12766
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12767
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12768
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12769
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12770
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12771
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12772
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12773
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12774
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12775
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12776
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12777
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12778
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12779
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12780
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12781
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12782
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12783
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12784
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12785
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12786
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12787
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12788
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12789
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12790
    }/*function_lword_to_usint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12791
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12792
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12793
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12794
 *LWORD_TO_UINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12795
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12796
    case function_lword_to_uint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12797
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12798
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12799
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12800
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12801
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12802
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12803
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12804
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12805
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12806
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12807
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12808
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12809
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12810
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12811
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12812
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12813
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12814
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12815
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12816
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12817
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12818
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12819
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12820
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12821
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12822
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12823
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12824
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12825
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12826
    }/*function_lword_to_uint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12827
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12828
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12829
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12830
 *LWORD_TO_UDINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12831
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12832
    case function_lword_to_udint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12833
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12834
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12835
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12836
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12837
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12838
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12839
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12840
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12841
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12842
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12843
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12844
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12845
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12846
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12847
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12848
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12849
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12850
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12851
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12852
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12853
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12854
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12855
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12856
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12857
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12858
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12859
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12860
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12861
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12862
    }/*function_lword_to_udint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12863
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12864
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12865
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12866
 *LWORD_TO_ULINT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12867
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12868
    case function_lword_to_ulint :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12869
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12870
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12871
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12872
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12873
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12874
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12875
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12876
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12877
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12878
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12879
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12880
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12881
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12882
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12883
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12884
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12885
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12886
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12887
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12888
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12889
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12890
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12891
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12892
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12893
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12894
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12895
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12896
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12897
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12898
    }/*function_lword_to_ulint*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12899
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12900
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12901
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12902
 *LWORD_TO_REAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12903
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12904
    case function_lword_to_real :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12905
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12906
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12907
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12908
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12909
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12910
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12911
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12912
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12913
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12914
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12915
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12916
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12917
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12918
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12919
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12920
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12921
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12922
                symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12923
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12924
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12925
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12926
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12927
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12928
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12929
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12930
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12931
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12932
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12933
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12934
    }/*function_lword_to_real*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12935
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12936
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12937
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12938
 *LWORD_TO_LREAL
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12939
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12940
    case function_lword_to_lreal :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12941
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12942
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12943
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12944
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12945
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12946
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12947
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12948
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12949
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12950
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12951
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12952
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12953
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12954
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12955
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12956
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12957
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12958
                symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12959
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 12960
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12961
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12962
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12963
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12964
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12965
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12966
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12967
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12968
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12969
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12970
    }/*function_lword_to_lreal*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12971
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12972
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12973
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12974
 *LWORD_TO_TIME
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12975
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12976
    case function_lword_to_time :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12977
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12978
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12979
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12980
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12981
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12982
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12983
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12984
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12985
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12986
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12987
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12988
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12989
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12990
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12991
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12992
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12993
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12994
                symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12995
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12996
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12997
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12998
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 12999
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13000
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13001
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13002
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13003
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13004
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13005
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13006
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13007
    }/*function_lword_to_time*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13008
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13009
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13010
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13011
 *LWORD_TO_DATE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13012
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13013
    case function_lword_to_date :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13014
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13015
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13016
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13017
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13018
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13019
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13020
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13021
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13022
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13023
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13024
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13025
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13026
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13027
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13028
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13029
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13030
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13031
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13032
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13033
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13034
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13035
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13036
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13037
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13038
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13039
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13040
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13041
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13042
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13043
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13044
    }/*function_lword_to_date*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13045
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13046
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13047
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13048
 *LWORD_TO_TOD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13049
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13050
    case function_lword_to_tod :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13051
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13052
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13053
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13054
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13055
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13056
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13057
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13058
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13059
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13060
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13061
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13062
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13063
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13064
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13065
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13066
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13067
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13068
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13069
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13070
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13071
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13072
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13073
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13074
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13075
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13076
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13077
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13078
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13079
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13080
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13081
    }/*function_lword_to_tod*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13082
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13083
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13084
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13085
 *LWORD_TO_DT
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13086
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13087
    case function_lword_to_dt :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13088
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13089
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13090
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13091
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13092
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13093
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13094
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13095
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13096
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13097
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13098
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13099
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13100
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13101
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13102
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13103
            {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13104
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13105
                symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13106
                s4o.print("(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13107
                return_type_symbol->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13108
                s4o.print(")__int_to_time(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13109
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13110
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13111
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13112
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13113
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13114
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13115
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13116
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13117
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13118
    }/*function_lword_to_dt*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13119
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13120
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13121
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13122
 *LWORD_TO_STRING
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13123
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13124
    case function_lword_to_string :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13125
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13126
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13127
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13128
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13129
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13130
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13131
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13132
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13133
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13134
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13135
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13136
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13137
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13138
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13139
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13140
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13141
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13142
                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13143
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13144
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13145
                s4o.print(")__bit_to_string(");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13146
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13147
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13148
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13149
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13150
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13151
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13152
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13153
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13154
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13155
    }/*function_lword_to_string*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13156
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13157
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13158
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13159
 *LWORD_TO_BYTE
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13160
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13161
    case function_lword_to_byte :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13162
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13163
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13164
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13165
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13166
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13167
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13168
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13169
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13170
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13171
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13172
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13173
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13174
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13175
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13176
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13177
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13178
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13179
                symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13180
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13181
                return_type_symbol->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13182
                s4o.print(")");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13183
                IN_param_value->accept(*this);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13184
                return NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13185
                
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13186
            }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13187
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13188
            ERROR;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13189
        }
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13190
        
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13191
    }/*function_lword_to_byte*/
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13192
    break;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13193
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13194
/****
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13195
 *LWORD_TO_WORD
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13196
 */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13197
    case function_lword_to_word :
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13198
    {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13199
        symbol_c *last_type_symbol = NULL;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13200
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13201
        {
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13202
            identifier_c param_name("IN");
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13203
            /* Get the value from a foo(<param_name> = <param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13204
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13205
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13206
            /* Get the value from a foo(<param_value>) style call */
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13207
            if (IN_param_value == NULL)
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13208
              IN_param_value = function_call_param_iterator.next();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13209
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13210
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13211
            
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13212
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13213
            {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13214
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13215
                symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13216
                s4o.print("(");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13217
                return_type_symbol->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13218
                s4o.print(")");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13219
                IN_param_value->accept(*this);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13220
                return NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13221
                
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13222
            }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13223
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13224
            ERROR;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13225
        }
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13226
        
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13227
    }/*function_lword_to_word*/
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13228
    break;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13229
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13230
/****
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13231
 *LWORD_TO_DWORD
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13232
 */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13233
    case function_lword_to_dword :
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13234
    {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13235
        symbol_c *last_type_symbol = NULL;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13236
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13237
        {
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13238
            identifier_c param_name("IN");
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13239
            /* Get the value from a foo(<param_name> = <param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13240
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13241
            
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13242
            /* Get the value from a foo(<param_value>) style call */
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13243
            if (IN_param_value == NULL)
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13244
              IN_param_value = function_call_param_iterator.next();
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13245
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13246
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 13247
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13248
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13249
            {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13250
        
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13251
                symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13252
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13253
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13254
                s4o.print(")");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13255
                IN_param_value->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13256
                return NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13257
                
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13258
            }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13259
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13260
            ERROR;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13261
        }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13262
        
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13263
    }/*function_lword_to_dword*/
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13264
    break;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13265
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13266
/****
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13267
 *TRUNC
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13268
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13269
    case function_trunc :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13270
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13271
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13272
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13273
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13274
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13275
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13276
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13277
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13278
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13279
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13280
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13281
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13282
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13283
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13284
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13285
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13286
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13287
                symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13288
                s4o.print("(int)");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13289
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13290
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13291
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13292
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13293
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13294
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13295
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13296
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13297
    }/*function_trunc*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13298
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13299
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13300
/****
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13301
 *BCD_TO_USINT
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13302
 */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13303
    case function_bcd_to_usint :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13304
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13305
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13306
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13307
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13308
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13309
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13310
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13311
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13312
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13313
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13314
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13315
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13316
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13317
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13318
            if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13319
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13320
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13321
                symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13322
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13323
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13324
                s4o.print(")__bcd_to_uint(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13325
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13326
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13327
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13328
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13329
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13330
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13331
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13332
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13333
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13334
    }/*function_bcd_to_usint*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13335
    break;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13336
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13337
/****
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13338
 *BCD_TO_UINT
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13339
 */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13340
    case function_bcd_to_uint :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13341
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13342
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13343
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13344
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13345
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13346
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13347
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13348
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13349
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13350
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13351
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13352
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13353
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13354
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13355
            if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13356
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13357
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13358
                symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13359
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13360
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13361
                s4o.print(")__bcd_to_uint(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13362
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13363
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13364
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13365
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13366
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13367
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13368
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13369
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13370
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13371
    }/*function_bcd_to_uint*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13372
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13373
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13374
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13375
 *BCD_TO_UDINT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13376
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13377
    case function_bcd_to_udint :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13378
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13379
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13380
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13381
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13382
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13383
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13384
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13385
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13386
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13387
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13388
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13389
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13390
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13391
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13392
            if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13393
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13394
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13395
                symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13396
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13397
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13398
                s4o.print(")__bcd_to_uint(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13399
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13400
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13401
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13402
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13403
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13404
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13405
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13406
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13407
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13408
    }/*function_bcd_to_udint*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13409
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13410
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13411
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13412
 *BCD_TO_ULINT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13413
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13414
    case function_bcd_to_ulint :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13415
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13416
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13417
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13418
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13419
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13420
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13421
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13422
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13423
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13424
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13425
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13426
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13427
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13428
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13429
            if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13430
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13431
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13432
                symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13433
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13434
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13435
                s4o.print(")__bcd_to_uint(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13436
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13437
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13438
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13439
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13440
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13441
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13442
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13443
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13444
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13445
    }/*function_bcd_to_ulint*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13446
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13447
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13448
/****
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13449
 *USINT_TO_BCD
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13450
 */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13451
    case function_usint_to_bcd :
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13452
    {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13453
        symbol_c *last_type_symbol = NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13454
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13455
        {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13456
            identifier_c param_name("IN");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13457
            /* Get the value from a foo(<param_name> = <param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13458
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13459
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13460
            /* Get the value from a foo(<param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13461
            if (IN_param_value == NULL)
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13462
              IN_param_value = function_call_param_iterator.next();
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13463
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13464
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13465
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13466
            if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13467
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13468
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13469
                symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13470
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13471
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13472
                s4o.print(")__uint_to_bcd(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13473
                IN_param_value->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13474
                s4o.print(")");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13475
                return NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13476
                
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13477
            }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13478
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13479
            ERROR;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13480
        }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13481
        
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13482
    }/*function_usint_to_bcd*/
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13483
    break;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13484
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13485
/****
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13486
 *UINT_TO_BCD
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13487
 */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13488
    case function_uint_to_bcd :
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13489
    {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13490
        symbol_c *last_type_symbol = NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13491
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13492
        {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13493
            identifier_c param_name("IN");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13494
            /* Get the value from a foo(<param_name> = <param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13495
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13496
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13497
            /* Get the value from a foo(<param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13498
            if (IN_param_value == NULL)
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13499
              IN_param_value = function_call_param_iterator.next();
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13500
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13501
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13502
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13503
            if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13504
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13505
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13506
                symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13507
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13508
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13509
                s4o.print(")__uint_to_bcd(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13510
                IN_param_value->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13511
                s4o.print(")");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13512
                return NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13513
                
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13514
            }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13515
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13516
            ERROR;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13517
        }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13518
        
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13519
    }/*function_uint_to_bcd*/
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13520
    break;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13521
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13522
/****
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13523
 *UDINT_TO_BCD
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13524
 */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13525
    case function_udint_to_bcd :
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13526
    {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13527
        symbol_c *last_type_symbol = NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13528
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13529
        {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13530
            identifier_c param_name("IN");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13531
            /* Get the value from a foo(<param_name> = <param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13532
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13533
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13534
            /* Get the value from a foo(<param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13535
            if (IN_param_value == NULL)
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13536
              IN_param_value = function_call_param_iterator.next();
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13537
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13538
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13539
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13540
            if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13541
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13542
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13543
                symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13544
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13545
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13546
                s4o.print(")__uint_to_bcd(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13547
                IN_param_value->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13548
                s4o.print(")");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13549
                return NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13550
                
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13551
            }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13552
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13553
            ERROR;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13554
        }
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13555
        
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13556
    }/*function_udint_to_bcd*/
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13557
    break;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13558
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13559
/****
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13560
 *ULINT_TO_BCD
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13561
 */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13562
    case function_ulint_to_bcd :
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13563
    {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13564
        symbol_c *last_type_symbol = NULL;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13565
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13566
        {
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13567
            identifier_c param_name("IN");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13568
            /* Get the value from a foo(<param_name> = <param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13569
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13570
            
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13571
            /* Get the value from a foo(<param_value>) style call */
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13572
            if (IN_param_value == NULL)
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13573
              IN_param_value = function_call_param_iterator.next();
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13574
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13575
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13576
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13577
            if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13578
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13579
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13580
                symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13581
                s4o.print("(");
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13582
                return_type_symbol->accept(*this);
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13583
                s4o.print(")__uint_to_bcd(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13584
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13585
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13586
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13587
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13588
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13589
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13590
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13591
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13592
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13593
    }/*function_ulint_to_bcd*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13594
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13595
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13596
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13597
 *DATE_AND_TIME_TO_TIME_OF_DAY
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13598
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13599
    case function_date_and_time_to_time_of_day :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13600
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13601
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13602
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13603
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13604
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13605
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13606
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13607
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13608
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13609
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13610
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13611
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13612
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13613
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13614
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13615
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13616
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13617
                symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13618
                s4o.print("__date_and_time_to_time_of_day(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13619
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13620
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13621
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13622
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13623
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13624
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13625
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13626
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13627
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13628
    }/*function_date_and_time_to_time_of_day*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13629
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13630
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13631
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13632
 *DATE_AND_TIME_TO_DATE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13633
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13634
    case function_date_and_time_to_date :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13635
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13636
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13637
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13638
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13639
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13640
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13641
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13642
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13643
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13644
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13645
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13646
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13647
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13648
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 13649
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13650
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13651
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13652
                symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 13653
                s4o.print("__date_and_time_to_date(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13654
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13655
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13656
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13657
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13658
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13659
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13660
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13661
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13662
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13663
    }/*function_date_and_time_to_date*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13664
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13665
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13666
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13667
 *ABS
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13668
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13669
    case function_abs :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13670
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13671
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13672
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13673
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13674
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13675
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13676
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13677
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13678
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13679
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13680
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13681
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13682
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13683
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13684
            if(search_expression_type->is_num_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13685
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13686
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13687
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13688
                s4o.print("__abs_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13689
                IN_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13690
                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13691
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13692
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13693
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13694
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13695
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13696
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13697
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13698
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13699
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13700
    }/*function_abs*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13701
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13702
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13703
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13704
 *SQRT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13705
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13706
    case function_sqrt :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13707
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13708
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13709
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13710
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13711
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13712
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13713
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13714
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13715
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13716
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13717
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13718
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13719
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13720
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13721
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13722
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13723
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13724
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13725
                s4o.print("sqrt(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13726
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13727
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13728
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13729
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13730
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13731
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13732
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13733
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13734
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13735
    }/*function_sqrt*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13736
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13737
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13738
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13739
 *LN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13740
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13741
    case function_ln :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13742
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13743
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13744
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13745
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13746
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13747
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13748
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13749
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13750
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13751
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13752
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13753
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13754
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13755
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13756
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13757
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13758
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13759
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13760
                s4o.print("ln(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13761
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13762
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13763
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13764
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13765
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13766
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13767
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13768
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13769
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13770
    }/*function_ln*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13771
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13772
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13773
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13774
 *LOG
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13775
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13776
    case function_log :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13777
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13778
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13779
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13780
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13781
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13782
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13783
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13784
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13785
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13786
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13787
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13788
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13789
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13790
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13791
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13792
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13793
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13794
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13795
                s4o.print("log(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13796
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13797
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13798
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13799
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13800
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13801
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13802
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13803
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13804
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13805
    }/*function_log*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13806
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13807
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13808
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13809
 *EXP
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13810
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13811
    case function_exp :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13812
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13813
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13814
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13815
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13816
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13817
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13818
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13819
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13820
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13821
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13822
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13823
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13824
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13825
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13826
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13827
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13828
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13829
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13830
                s4o.print("exp(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13831
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13832
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13833
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13834
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13835
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13836
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13837
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13838
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13839
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13840
    }/*function_exp*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13841
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13842
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13843
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13844
 *SIN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13845
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13846
    case function_sin :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13847
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13848
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13849
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13850
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13851
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13852
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13853
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13854
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13855
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13856
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13857
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13858
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13859
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13860
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13861
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13862
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13863
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13864
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13865
                s4o.print("sin(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13866
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13867
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13868
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13869
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13870
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13871
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13872
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13873
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13874
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13875
    }/*function_sin*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13876
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13877
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13878
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13879
 *COS
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13880
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13881
    case function_cos :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13882
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13883
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13884
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13885
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13886
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13887
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13888
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13889
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13890
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13891
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13892
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13893
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13894
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13895
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13896
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13897
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13898
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13899
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13900
                s4o.print("cos(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13901
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13902
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13903
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13904
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13905
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13906
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13907
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13908
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13909
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13910
    }/*function_cos*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13911
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13912
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13913
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13914
 *TAN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13915
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13916
    case function_tan :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13917
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13918
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13919
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13920
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13921
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13922
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13923
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13924
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13925
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13926
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13927
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13928
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13929
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13930
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13931
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13932
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13933
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13934
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13935
                s4o.print("tan(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13936
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13937
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13938
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13939
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13940
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13941
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13942
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13943
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13944
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13945
    }/*function_tan*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13946
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13947
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13948
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13949
 *ASIN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13950
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13951
    case function_asin :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13952
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13953
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13954
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13955
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13956
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13957
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13958
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13959
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13960
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13961
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13962
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13963
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13964
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13965
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13966
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13967
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13968
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13969
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13970
                s4o.print("asin(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13971
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13972
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13973
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13974
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13975
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13976
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13977
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13978
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13979
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13980
    }/*function_asin*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13981
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13982
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13983
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13984
 *ACOS
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 13985
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13986
    case function_acos :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13987
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13988
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13989
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13990
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13991
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13992
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13993
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13994
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13995
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13996
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13997
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13998
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 13999
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14000
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14001
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14002
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14003
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14004
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14005
                s4o.print("acos(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14006
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14007
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14008
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14009
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14010
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14011
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14012
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14013
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14014
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14015
    }/*function_acos*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14016
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14017
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14018
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14019
 *ATAN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14020
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14021
    case function_atan :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14022
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14023
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14024
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14025
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14026
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14027
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14028
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14029
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14030
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14031
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14032
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14033
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14034
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14035
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14036
            if(search_expression_type->is_real_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14037
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14038
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14039
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14040
                s4o.print("atan(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14041
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14042
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14043
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14044
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14045
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14046
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14047
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14048
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14049
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14050
    }/*function_atan*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14051
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14052
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14053
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14054
 *ADD
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14055
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14056
    case function_add :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14057
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14058
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14059
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14060
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14061
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14062
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14063
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14064
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14065
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14066
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14067
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14068
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14069
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14070
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14071
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14072
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14073
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14074
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14075
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14076
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14077
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14078
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14079
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14080
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14081
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14082
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14083
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14084
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14085
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14086
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14087
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14088
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14089
                        s4o.indent_right();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14090
                        s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14091
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14092
                        s4o.print("+\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14093
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14094
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14095
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14096
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14097
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14098
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14099
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14100
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14101
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14102
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14103
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14104
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14105
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14106
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14107
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14108
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14109
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14110
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14111
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14112
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14113
                                s4o.print("+\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14114
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14115
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14116
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14117
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14118
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14119
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14120
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14121
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14122
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14123
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14124
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14125
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14126
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14127
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14128
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14129
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14130
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14131
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14132
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14133
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14134
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14135
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14136
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14137
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14138
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14139
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14140
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14141
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14142
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14143
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14144
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14145
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14146
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14147
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14148
                        symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14149
                        s4o.print("__time_add(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14150
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14151
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14152
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14153
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14154
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14155
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14156
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14157
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14158
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14159
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14160
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14161
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14162
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14163
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14164
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14165
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14166
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14167
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14168
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14169
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14170
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14171
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14172
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14173
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14174
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14175
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14176
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14177
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14178
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14179
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14180
                        symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14181
                        s4o.print("__time_add(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14182
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14183
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14184
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14185
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14186
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14187
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14188
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14189
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14190
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14191
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14192
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14193
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14194
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14195
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14196
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14197
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14198
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14199
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14200
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14201
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14202
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14203
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14204
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14205
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14206
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14207
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14208
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14209
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14210
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14211
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14212
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14213
                        s4o.print("__time_add(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14214
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14215
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14216
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14217
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14218
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14219
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14220
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14221
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14222
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14223
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14224
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14225
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14226
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14227
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14228
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14229
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14230
    }/*function_add*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14231
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14232
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14233
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14234
 *MUL
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14235
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14236
    case function_mul :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14237
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14238
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14239
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14240
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14241
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14242
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14243
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14244
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14245
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14246
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14247
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14248
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14249
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14250
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14251
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14252
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14253
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14254
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14255
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14256
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14257
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14258
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14259
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14260
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14261
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14262
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14263
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14264
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14265
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14266
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14267
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14268
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14269
                        s4o.indent_right();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14270
                        s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14271
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14272
                        s4o.print("*\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14273
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14274
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14275
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14276
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14277
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14278
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14279
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14280
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14281
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14282
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14283
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14284
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14285
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14286
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14287
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14288
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14289
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14290
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14291
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14292
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14293
                                s4o.print("*\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14294
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14295
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14296
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14297
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14298
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14299
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14300
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14301
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14302
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14303
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14304
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14305
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14306
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14307
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14308
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14309
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14310
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14311
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14312
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14313
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14314
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14315
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14316
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14317
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14318
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14319
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14320
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14321
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14322
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14323
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14324
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14325
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14326
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14327
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14328
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14329
                        s4o.print("__time_mul(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14330
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14331
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14332
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14333
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14334
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14335
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14336
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14337
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14338
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14339
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14340
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14341
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14342
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14343
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14344
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14345
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14346
    }/*function_mul*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14347
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14348
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14349
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14350
 *SUB
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14351
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14352
    case function_sub :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14353
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14354
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14355
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14356
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14357
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14358
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14359
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14360
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14361
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14362
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14363
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14364
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14365
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14366
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14367
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14368
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14369
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14370
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14371
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14372
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14373
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14374
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14375
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14376
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14377
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14378
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14379
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14380
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14381
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14382
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14383
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14384
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14385
                        s4o.indent_right();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14386
                        s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14387
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14388
                        s4o.print("-\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14389
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14390
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14391
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14392
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14393
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14394
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14395
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14396
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14397
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14398
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14399
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14400
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14401
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14402
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14403
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14404
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14405
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14406
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14407
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14408
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14409
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14410
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14411
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14412
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14413
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14414
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14415
                    if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14416
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14417
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14418
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14419
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14420
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14421
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14422
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14423
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14424
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14425
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14426
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14427
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14428
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14429
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14430
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14431
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14432
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14433
            if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14434
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14435
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14436
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14437
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14438
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14439
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14440
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14441
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14442
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14443
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14444
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14445
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14446
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14447
                    if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14448
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14449
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14450
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14451
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14452
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14453
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14454
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14455
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14456
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14457
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14458
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14459
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14460
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14461
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14462
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14463
                        symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14464
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14465
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14466
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14467
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14468
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14469
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14470
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14471
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14472
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14473
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14474
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14475
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14476
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14477
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14478
            if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14479
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14480
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14481
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14482
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14483
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14484
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14485
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14486
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14487
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14488
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14489
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14490
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14491
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14492
                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14493
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14494
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14495
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14496
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14497
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14498
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14499
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14500
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14501
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14502
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14503
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14504
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14505
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14506
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14507
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14508
                        symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14509
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14510
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14511
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14512
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14513
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14514
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14515
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14516
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14517
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14518
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14519
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14520
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14521
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14522
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14523
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14524
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14525
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14526
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14527
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14528
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14529
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14530
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14531
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14532
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14533
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14534
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14535
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14536
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14537
                    if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14538
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14539
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14540
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14541
                        s4o.print("__time_sub(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14542
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14543
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14544
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14545
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14546
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14547
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14548
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14549
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14550
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14551
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14552
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14553
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14554
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14555
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14556
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14557
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14558
    }/*function_sub*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14559
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14560
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14561
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14562
 *DIV
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14563
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14564
    case function_div :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14565
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14566
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14567
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14568
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14569
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14570
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14571
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14572
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14573
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14574
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14575
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14576
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14577
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14578
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14579
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14580
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14581
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14582
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14583
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14584
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14585
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14586
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14587
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14588
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14589
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14590
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14591
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14592
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14593
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14594
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14595
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14596
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14597
                        s4o.indent_right();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14598
                        s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14599
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14600
                        s4o.print("/\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14601
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14602
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14603
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14604
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14605
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14606
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14607
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14608
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14609
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14610
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14611
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14612
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14613
            if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14614
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14615
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14616
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14617
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14618
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14619
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14620
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14621
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14622
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14623
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14624
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14625
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14626
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14627
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14628
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14629
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14630
                        symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14631
                        s4o.print("__time_div(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14632
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14633
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14634
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14635
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14636
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14637
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14638
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14639
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14640
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14641
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14642
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14643
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14644
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14645
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14646
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14647
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14648
    }/*function_div*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14649
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14650
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14651
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14652
 *MOD
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14653
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14654
    case function_mod :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14655
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14656
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14657
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14658
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14659
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14660
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14661
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14662
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14663
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14664
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14665
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14666
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14667
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14668
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14669
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14670
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14671
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14672
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14673
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14674
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14675
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14676
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14677
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14678
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14679
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14680
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14681
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14682
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14683
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14684
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14685
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14686
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14687
                        s4o.indent_right();
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14688
                        s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14689
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14690
                        s4o.print("%\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14691
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14692
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 14693
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14694
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14695
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14696
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14697
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14698
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14699
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14700
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14701
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14702
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14703
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14704
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14705
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14706
    }/*function_mod*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14707
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14708
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14709
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14710
 *EXPT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14711
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14712
    case function_expt :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14713
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14714
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14715
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14716
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14717
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14718
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14719
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14720
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14721
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14722
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14723
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14724
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14725
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14726
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14727
            if(search_expression_type->is_num_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14728
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14729
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14730
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14731
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14732
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14733
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14734
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14735
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14736
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14737
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14738
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14739
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14740
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14741
                    if(search_expression_type->is_num_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14742
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14743
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14744
                        symbol_c * return_type_symbol = last_type_symbol;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14745
                        s4o.print("pow(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14746
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14747
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14748
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14749
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14750
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14751
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14752
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14753
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14754
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14755
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14756
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14757
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14758
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14759
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14760
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14761
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14762
    }/*function_expt*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14763
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14764
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14765
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14766
 *MOVE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14767
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14768
    case function_move :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14769
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14770
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14771
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14772
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14773
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14774
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14775
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14776
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14777
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14778
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14779
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14780
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14781
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14782
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14783
            if(search_expression_type->is_num_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14784
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14785
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14786
                symbol_c * return_type_symbol = last_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14787
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14788
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14789
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14790
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14791
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14792
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14793
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14794
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14795
    }/*function_move*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14796
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14797
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14798
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14799
 *SHL
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14800
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14801
    case function_shl :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14802
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14803
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14804
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14805
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14806
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14807
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14808
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14809
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14810
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14811
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14812
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14813
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14814
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14815
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14816
            if(search_expression_type->is_binary_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14817
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14818
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14819
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14820
                    identifier_c param_name("N");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14821
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14822
                    symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14823
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14824
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14825
                    if (N_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14826
                      N_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14827
                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14828
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14829
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 14830
                    if(search_expression_type->is_integer_type(N_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14831
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14832
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14833
                        symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14834
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14835
                        s4o.print("<<");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14836
                        N_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14837
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14838
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14839
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14840
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14841
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14842
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14843
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14844
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14845
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14846
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14847
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14848
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14849
    }/*function_shl*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14850
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14851
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14852
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14853
 *SHR
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14854
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14855
    case function_shr :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14856
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14857
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14858
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14859
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14860
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14861
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14862
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14863
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14864
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14865
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14866
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14867
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14868
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14869
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14870
            if(search_expression_type->is_binary_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14871
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14872
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14873
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14874
                    identifier_c param_name("N");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14875
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14876
                    symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14877
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14878
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14879
                    if (N_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14880
                      N_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14881
                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14882
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14883
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 14884
                    if(search_expression_type->is_integer_type(N_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14885
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14886
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14887
                        symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14888
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14889
                        s4o.print(">>");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14890
                        N_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14891
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14892
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14893
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14894
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14895
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14896
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14897
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14898
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14899
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14900
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14901
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14902
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14903
    }/*function_shr*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14904
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14905
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14906
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14907
 *ROR
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14908
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14909
    case function_ror :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14910
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14911
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14912
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14913
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14914
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14915
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14916
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14917
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14918
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14919
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14920
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14921
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14922
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14923
            
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14924
            if(search_expression_type->is_nbinary_type(IN_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14925
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14926
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14927
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14928
                    identifier_c param_name("N");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14929
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14930
                    symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14931
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14932
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14933
                    if (N_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14934
                      N_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14935
                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14936
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14937
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 14938
                    if(search_expression_type->is_integer_type(N_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14939
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14940
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14941
                        symbol_c * return_type_symbol = IN_type_symbol;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14942
                        s4o.print("__ror_");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14943
                        IN_type_symbol->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14944
                        s4o.print("(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14945
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14946
                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14947
                        N_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14948
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14949
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14950
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14951
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14952
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14953
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14954
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14955
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14956
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14957
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14958
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14959
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14960
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14961
    }/*function_ror*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14962
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14963
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14964
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14965
 *ROL
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 14966
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14967
    case function_rol :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14968
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14969
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14970
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14971
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14972
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14973
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14974
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14975
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14976
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14977
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14978
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14979
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14980
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14981
            
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 14982
            if(search_expression_type->is_nbinary_type(IN_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14983
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14984
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14985
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14986
                    identifier_c param_name("N");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14987
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14988
                    symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14989
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14990
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14991
                    if (N_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14992
                      N_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14993
                    symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14994
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14995
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 14996
                    if(search_expression_type->is_integer_type(N_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14997
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14998
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 14999
                        symbol_c * return_type_symbol = IN_type_symbol;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 15000
                        s4o.print("__rol_");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15001
                        IN_type_symbol->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 15002
                        s4o.print("(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15003
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15004
                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15005
                        N_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15006
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15007
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15008
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15009
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15010
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15011
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15012
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15013
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15014
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15015
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15016
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15017
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15018
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15019
    }/*function_rol*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15020
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15021
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15022
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15023
 *AND
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15024
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15025
    case function_and :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15026
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15027
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15028
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15029
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15030
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15031
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15032
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15033
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15034
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15035
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15036
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15037
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15038
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15039
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15040
            if(search_expression_type->is_binary_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15041
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15042
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15043
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15044
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15045
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15046
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15047
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15048
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15049
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15050
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15051
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15052
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15053
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15054
                    if(search_expression_type->is_binary_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15055
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15056
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15057
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15058
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15059
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15060
                        if (search_expression_type->is_bool_type(last_type_symbol))
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15061
                          s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15062
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15063
                        s4o.print("&\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15064
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15065
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15066
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15067
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15068
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15069
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15070
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15071
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15072
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15073
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15074
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15075
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15076
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15077
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15078
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15079
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15080
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15081
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15082
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15083
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15084
                                s4o.print("&\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15085
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15086
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15087
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15088
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15089
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15090
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15091
                        if (search_expression_type->is_bool_type(last_type_symbol)) {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15092
                          s4o.print("&1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15093
                          s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15094
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15095
                        s4o.print("");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15096
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15097
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15098
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15099
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15100
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15101
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15102
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15103
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15104
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15105
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15106
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15107
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15108
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15109
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15110
    }/*function_and*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15111
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15112
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15113
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15114
 *OR
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15115
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15116
    case function_or :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15117
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15118
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15119
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15120
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15121
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15122
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15123
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15124
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15125
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15126
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15127
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15128
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15129
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15130
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15131
            if(search_expression_type->is_binary_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15132
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15133
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15134
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15135
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15136
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15137
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15138
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15139
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15140
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15141
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15142
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15143
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15144
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15145
                    if(search_expression_type->is_binary_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15146
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15147
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15148
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15149
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15150
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15151
                        if (search_expression_type->is_bool_type(last_type_symbol))
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15152
                          s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15153
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15154
                        s4o.print("|\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15155
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15156
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15157
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15158
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15159
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15160
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15161
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15162
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15163
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15164
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15165
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15166
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15167
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15168
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15169
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15170
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15171
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15172
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15173
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15174
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15175
                                s4o.print("|\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15176
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15177
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15178
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15179
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15180
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15181
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15182
                        if (search_expression_type->is_bool_type(last_type_symbol)) {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15183
                          s4o.print("&1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15184
                          s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15185
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15186
                        s4o.print("");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15187
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15188
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15189
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15190
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15191
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15192
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15193
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15194
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15195
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15196
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15197
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15198
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15199
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15200
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15201
    }/*function_or*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15202
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15203
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15204
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15205
 *XOR
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15206
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15207
    case function_xor :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15208
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15209
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15210
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15211
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15212
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15213
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15214
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15215
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15216
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15217
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15218
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15219
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15220
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15221
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15222
            if(search_expression_type->is_binary_type(IN1_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15223
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15224
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15225
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15226
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15227
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15228
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15229
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15230
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15231
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15232
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15233
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15234
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15235
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15236
                    if(search_expression_type->is_binary_type(IN2_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15237
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15238
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15239
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15240
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15241
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15242
                        if (search_expression_type->is_bool_type(last_type_symbol))
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15243
                          s4o.print("(\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15244
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15245
                        s4o.print("^\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15246
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15247
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15248
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15249
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15250
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15251
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15252
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15253
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15254
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15255
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15256
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15257
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15258
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15259
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15260
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15261
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15262
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15263
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15264
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15265
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15266
                                s4o.print("^\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15267
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15268
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15269
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15270
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15271
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15272
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15273
                        if (search_expression_type->is_bool_type(last_type_symbol)) {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15274
                          s4o.print("&1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15275
                          s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15276
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15277
                        s4o.print("");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15278
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15279
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15280
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15281
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15282
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15283
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15284
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15285
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15286
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15287
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15288
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15289
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15290
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15291
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15292
    }/*function_xor*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15293
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15294
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15295
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15296
 *NOT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15297
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15298
    case function_not :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15299
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15300
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15301
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15302
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15303
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15304
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15305
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15306
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15307
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15308
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15309
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15310
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15311
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15312
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15313
            if(search_expression_type->is_binary_type(IN_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15314
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15315
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15316
                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15317
                s4o.print("~");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15318
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15319
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15320
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15321
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15322
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15323
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15324
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15325
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15326
    }/*function_not*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15327
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15328
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15329
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15330
 *SEL
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15331
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15332
    case function_sel :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15333
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15334
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15335
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15336
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15337
            identifier_c param_name("G");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15338
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15339
            symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15340
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15341
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15342
            if (G_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15343
              G_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15344
            symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15345
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15346
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15347
            if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15348
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15349
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15350
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15351
                    identifier_c param_name("IN0");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15352
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15353
                    symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15354
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15355
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15356
                    if (IN0_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15357
                      IN0_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15358
                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15359
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15360
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15361
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15362
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15363
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15364
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15365
                            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15366
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15367
                            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15368
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15369
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15370
                            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15371
                              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15372
                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15373
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15374
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15375
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15376
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15377
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15378
                                symbol_c * return_type_symbol = last_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15379
                                G_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15380
                                s4o.print(" ? ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15381
                                IN1_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15382
                                s4o.print(" :  ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15383
                                IN0_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15384
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15385
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15386
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15387
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15388
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15389
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15390
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15391
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15392
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15393
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15394
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15395
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15396
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15397
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15398
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15399
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15400
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15401
    }/*function_sel*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15402
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15403
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15404
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15405
 *MAX
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15406
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15407
    case function_max :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15408
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15409
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15410
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15411
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15412
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15413
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15414
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15415
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15416
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15417
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15418
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15419
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15420
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15421
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15422
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15423
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15424
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15425
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15426
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15427
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15428
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15429
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15430
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15431
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15432
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15433
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15434
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15435
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15436
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15437
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15438
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15439
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15440
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15441
                        s4o.print("__max_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15442
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15443
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15444
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15445
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15446
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15447
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15448
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15449
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15450
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15451
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15452
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15453
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15454
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15455
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15456
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15457
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15458
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15459
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15460
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15461
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15462
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15463
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15464
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15465
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15466
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15467
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15468
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15469
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15470
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15471
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15472
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15473
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15474
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15475
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15476
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15477
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15478
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15479
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15480
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15481
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15482
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15483
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15484
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15485
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15486
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15487
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15488
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15489
    }/*function_max*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15490
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15491
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15492
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15493
 *MIN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15494
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15495
    case function_min :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15496
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15497
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15498
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15499
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15500
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15501
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15502
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15503
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15504
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15505
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15506
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15507
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15508
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15509
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15510
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15511
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15512
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15513
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15514
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15515
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15516
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15517
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15518
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15519
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15520
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15521
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15522
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15523
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15524
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15525
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15526
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15527
                        symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15528
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15529
                        s4o.print("__min_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15530
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15531
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15532
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15533
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15534
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15535
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15536
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15537
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15538
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15539
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15540
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15541
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15542
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15543
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15544
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15545
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15546
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15547
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15548
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15549
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15550
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15551
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15552
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15553
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15554
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15555
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15556
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15557
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15558
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15559
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15560
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15561
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15562
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15563
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15564
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15565
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15566
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15567
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15568
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15569
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15570
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15571
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15572
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15573
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15574
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15575
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15576
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15577
    }/*function_min*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15578
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15579
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15580
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15581
 *LIMIT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15582
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15583
    case function_limit :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15584
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15585
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15586
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15587
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15588
            identifier_c param_name("MN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15589
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15590
            symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15591
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15592
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15593
            if (MN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15594
              MN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15595
            symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15596
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15597
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15598
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15599
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15600
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15601
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15602
                    identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15603
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15604
                    symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15605
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15606
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15607
                    if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15608
                      IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15609
                    symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15610
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15611
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15612
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15613
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15614
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15615
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15616
                            identifier_c param_name("MX");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15617
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15618
                            symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15619
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15620
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15621
                            if (MX_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15622
                              MX_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15623
                            symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15624
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15625
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15626
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15627
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15628
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15629
                                symbol_c * return_type_symbol = IN_type_symbol;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15630
                                s4o.print("__limit_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15631
                                IN_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15632
                                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15633
                                MN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15634
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15635
                                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15636
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15637
                                MX_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15638
                                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15639
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15640
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15641
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15642
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15643
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15644
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15645
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15646
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15647
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15648
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15649
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15650
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15651
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15652
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15653
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15654
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15655
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15656
    }/*function_limit*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15657
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15658
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15659
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15660
 *MUX
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15661
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15662
    case function_mux :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15663
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15664
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15665
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15666
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15667
            identifier_c param_name("K");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15668
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15669
            symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15670
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15671
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15672
            if (K_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15673
              K_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15674
            symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15675
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15676
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15677
            if(search_expression_type->is_integer_type(K_type_symbol))
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15678
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15679
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15680
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15681
                    identifier_c param_name("IN0");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15682
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15683
                    symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15684
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15685
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15686
                    if (IN0_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15687
                      IN0_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15688
                    symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15689
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15690
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15691
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15692
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15693
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15694
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15695
                            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15696
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15697
                            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15698
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15699
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15700
                            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15701
                              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15702
                            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15703
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15704
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15705
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15706
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15707
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15708
                                symbol_c * return_type_symbol = last_type_symbol;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15709
                                s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15710
                                s4o.print("__mux_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15711
                                return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15712
                                s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15713
                                s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15714
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15715
                                K_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15716
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15717
                                IN0_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15718
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15719
                                IN1_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15720
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15721
                                int base_num = 2;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15722
                                symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15723
                                do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15724
                                    char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15725
                                    sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15726
                                    identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15727
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15728
                                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15729
                                    param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15730
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15731
                                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15732
                                    if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15733
                                      param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15734
                                    if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15735
                                        symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15736
                                        last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15737
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15738
                                        /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15739
                                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15740
                                        param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15741
                                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15742
                                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15743
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15744
                                }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15745
                                s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15746
                                s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15747
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15748
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15749
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15750
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15751
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15752
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15753
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15754
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15755
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15756
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15757
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15758
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15759
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15760
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15761
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15762
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15763
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15764
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15765
    }/*function_mux*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15766
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15767
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15768
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15769
 *GT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15770
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15771
    case function_gt :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15772
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15773
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15774
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15775
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15776
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15777
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15778
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15779
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15780
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15781
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15782
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15783
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15784
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15785
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15786
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15787
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15788
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15789
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15790
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15791
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15792
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15793
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15794
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15795
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15796
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15797
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15798
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15799
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15800
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15801
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15802
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15803
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15804
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15805
                        s4o.print("__gt_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15806
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15807
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15808
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15809
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15810
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15811
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15812
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15813
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15814
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15815
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15816
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15817
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15818
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15819
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15820
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15821
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15822
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15823
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15824
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15825
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15826
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15827
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15828
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15829
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15830
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15831
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15832
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15833
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15834
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15835
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15836
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15837
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15838
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15839
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15840
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15841
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15842
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15843
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15844
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15845
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15846
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15847
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15848
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15849
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15850
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15851
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15852
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15853
    }/*function_gt*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15854
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15855
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15856
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15857
 *GE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15858
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15859
    case function_ge :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15860
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15861
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15862
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15863
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15864
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15865
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15866
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15867
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15868
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15869
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15870
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15871
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15872
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15873
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15874
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15875
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15876
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15877
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15878
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15879
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15880
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15881
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15882
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15883
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15884
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15885
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15886
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15887
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15888
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15889
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15890
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15891
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15892
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15893
                        s4o.print("__ge_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15894
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15895
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15896
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15897
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15898
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15899
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15900
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15901
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15902
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15903
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15904
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15905
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15906
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15907
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15908
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15909
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15910
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15911
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15912
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15913
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15914
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15915
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15916
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15917
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15918
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15919
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15920
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15921
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15922
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15923
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15924
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15925
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15926
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15927
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15928
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15929
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15930
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15931
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15932
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15933
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15934
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15935
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15936
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15937
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15938
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15939
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15940
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15941
    }/*function_ge*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15942
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15943
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15944
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15945
 *EQ
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 15946
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15947
    case function_eq :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15948
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15949
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15950
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15951
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15952
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15953
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15954
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15955
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15956
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15957
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15958
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15959
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15960
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15961
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15962
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15963
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15964
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15965
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15966
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15967
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15968
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15969
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15970
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15971
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15972
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15973
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15974
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15975
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15976
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15977
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15978
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15979
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15980
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15981
                        s4o.print("__eq_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15982
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15983
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15984
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15985
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15986
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 15987
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15988
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15989
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15990
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15991
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15992
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15993
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15994
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15995
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15996
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15997
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15998
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 15999
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16000
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16001
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16002
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16003
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16004
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16005
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16006
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16007
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16008
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16009
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16010
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16011
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16012
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16013
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16014
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16015
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16016
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16017
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16018
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16019
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16020
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16021
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16022
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16023
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16024
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16025
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16026
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16027
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16028
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16029
    }/*function_eq*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16030
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16031
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16032
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16033
 *LT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16034
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16035
    case function_lt :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16036
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16037
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16038
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16039
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16040
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16041
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16042
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16043
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16044
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16045
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16046
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16047
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16048
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16049
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16050
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16051
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16052
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16053
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16054
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16055
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16056
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16057
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16058
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16059
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16060
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16061
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16062
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16063
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16064
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16065
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16066
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16067
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16068
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16069
                        s4o.print("__lt_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16070
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16071
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16072
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16073
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16074
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16075
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16076
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16077
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16078
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16079
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16080
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16081
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16082
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16083
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16084
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16085
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16086
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16087
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16088
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16089
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16090
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16091
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16092
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16093
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16094
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16095
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16096
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16097
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16098
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16099
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16100
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16101
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16102
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16103
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16104
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16105
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16106
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16107
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16108
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16109
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16110
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16111
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16112
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16113
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16114
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16115
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16116
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16117
    }/*function_lt*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16118
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16119
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16120
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16121
 *LE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16122
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16123
    case function_le :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16124
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16125
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16126
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16127
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16128
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16129
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16130
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16131
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16132
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16133
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16134
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16135
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16136
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16137
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16138
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16139
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16140
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16141
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16142
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16143
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16144
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16145
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16146
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16147
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16148
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16149
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16150
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16151
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16152
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16153
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16154
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16155
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16156
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16157
                        s4o.print("__le_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16158
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16159
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16160
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16161
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16162
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16163
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16164
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16165
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16166
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16167
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16168
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16169
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16170
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16171
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16172
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16173
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16174
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16175
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16176
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16177
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16178
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16179
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16180
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16181
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16182
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16183
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16184
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16185
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16186
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16187
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16188
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16189
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16190
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16191
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16192
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16193
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16194
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16195
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16196
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16197
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16198
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16199
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16200
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16201
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16202
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16203
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16204
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16205
    }/*function_le*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16206
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16207
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16208
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16209
 *NE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16210
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16211
    case function_ne :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16212
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16213
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16214
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16215
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16216
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16217
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16218
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16219
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16220
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16221
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16222
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16223
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16224
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16225
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16226
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16227
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16228
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16229
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16230
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16231
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16232
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16233
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16234
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16235
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16236
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16237
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16238
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16239
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16240
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16241
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16242
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16243
                        symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16244
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16245
                        s4o.print("__ne_");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16246
                        return_type_symbol->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16247
                        s4o.print("(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16248
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16249
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16250
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16251
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16252
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16253
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16254
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16255
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16256
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16257
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16258
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16259
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16260
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16261
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16262
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16263
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16264
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16265
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16266
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16267
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16268
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16269
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16270
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16271
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16272
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16273
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16274
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16275
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16276
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16277
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16278
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16279
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16280
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16281
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16282
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16283
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16284
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16285
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16286
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16287
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16288
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16289
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16290
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16291
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16292
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16293
    }/*function_ne*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16294
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16295
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16296
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16297
 *LEN
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16298
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16299
    case function_len :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16300
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16301
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16302
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16303
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16304
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16305
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16306
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16307
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16308
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16309
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16310
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16311
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16312
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16313
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16314
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16315
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16316
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16317
                symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16318
                s4o.print("__len(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16319
                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16320
                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16321
                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16322
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16323
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16324
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16325
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16326
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16327
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16328
    }/*function_len*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16329
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16330
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16331
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16332
 *LEFT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16333
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16334
    case function_left :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16335
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16336
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16337
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16338
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16339
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16340
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16341
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16342
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16343
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16344
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16345
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16346
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16347
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16348
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16349
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16350
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16351
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16352
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16353
                    identifier_c param_name("L");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16354
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16355
                    symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16356
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16357
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16358
                    if (L_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16359
                      L_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16360
                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16361
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16362
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16363
                    if(search_expression_type->is_integer_type(L_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16364
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16365
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16366
                        symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16367
                        s4o.print("__left(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16368
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16369
                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16370
                        L_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16371
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16372
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16373
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16374
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16375
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16376
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16377
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16378
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16379
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16380
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16381
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16382
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16383
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16384
    }/*function_left*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16385
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16386
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16387
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16388
 *RIGHT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16389
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16390
    case function_right :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16391
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16392
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16393
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16394
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16395
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16396
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16397
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16398
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16399
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16400
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16401
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16402
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16403
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16404
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16405
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16406
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16407
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16408
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16409
                    identifier_c param_name("L");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16410
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16411
                    symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16412
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16413
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16414
                    if (L_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16415
                      L_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16416
                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16417
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16418
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16419
                    if(search_expression_type->is_integer_type(L_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16420
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16421
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16422
                        symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16423
                        s4o.print("__right(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16424
                        IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16425
                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16426
                        L_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16427
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16428
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16429
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16430
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16431
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16432
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16433
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16434
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16435
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16436
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16437
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16438
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16439
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16440
    }/*function_right*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16441
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16442
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16443
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16444
 *MID
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16445
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16446
    case function_mid :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16447
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16448
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16449
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16450
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16451
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16452
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16453
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16454
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16455
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16456
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16457
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16458
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16459
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16460
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16461
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16462
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16463
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16464
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16465
                    identifier_c param_name("L");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16466
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16467
                    symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16468
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16469
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16470
                    if (L_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16471
                      L_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16472
                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16473
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16474
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16475
                    if(search_expression_type->is_integer_type(L_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16476
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16477
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16478
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16479
                            identifier_c param_name("P");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16480
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16481
                            symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16482
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16483
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16484
                            if (P_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16485
                              P_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16486
                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16487
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16488
                            
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16489
                            if(search_expression_type->is_integer_type(P_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16490
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16491
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16492
                                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16493
                                s4o.print("__mid(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16494
                                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16495
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16496
                                L_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16497
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16498
                                P_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16499
                                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16500
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16501
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16502
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16503
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16504
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16505
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16506
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16507
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16508
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16509
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16510
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16511
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16512
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16513
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16514
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16515
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16516
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16517
    }/*function_mid*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16518
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16519
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16520
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16521
 *CONCAT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16522
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16523
    case function_concat :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16524
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16525
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16526
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16527
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16528
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16529
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16530
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16531
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16532
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16533
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16534
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16535
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16536
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16537
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16538
            if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16539
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16540
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16541
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16542
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16543
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16544
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16545
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16546
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16547
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16548
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16549
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16550
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16551
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16552
                    if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16553
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16554
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16555
                        symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16556
                        s4o.print("__time_add(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16557
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16558
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16559
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16560
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16561
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16562
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16563
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16564
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16565
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16566
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16567
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16568
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16569
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16570
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16571
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16572
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16573
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16574
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16575
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16576
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16577
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16578
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16579
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16580
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16581
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16582
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16583
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16584
                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16585
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16586
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16587
                        symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16588
                        s4o.indent_right();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16589
                        s4o.print("__concat(");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16590
                        s4o.print_integer(nb_param);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16591
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16592
                        IN1_param_value->accept(*this);
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16593
                        s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16594
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16595
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16596
                        int base_num = 3;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16597
                        symbol_c *param_value = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16598
                        do{
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16599
                            char my_name[10];
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16600
                            sprintf(my_name, "IN%d", base_num++);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16601
                            identifier_c param_name(my_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16602
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16603
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16604
                            param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16605
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16606
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16607
                            if (param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16608
                              param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16609
                            if (param_value != NULL){
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16610
                                symbol_c *current_type_symbol = search_expression_type->get_type(param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16611
                                last_type_symbol = last_type_symbol && search_expression_type->is_same_type(current_type_symbol, last_type_symbol) ? search_expression_type->common_type(current_type_symbol, last_type_symbol) : current_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16612
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16613
                                /*Function specific CODE */
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16614
                                s4o.print(",\n" + s4o.indent_spaces);
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16615
                                param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16616
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16617
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16618
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16619
                        }while(param_value != NULL);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16620
                        s4o.print(")");
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16621
                        s4o.indent_left();
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16622
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16623
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16624
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16625
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16626
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16627
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16628
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16629
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16630
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16631
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16632
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16633
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16634
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16635
    }/*function_concat*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16636
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16637
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16638
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16639
 *INSERT
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16640
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16641
    case function_insert :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16642
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16643
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16644
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16645
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16646
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16647
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16648
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16649
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16650
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16651
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16652
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16653
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16654
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16655
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16656
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16657
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16658
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16659
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16660
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16661
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16662
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16663
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16664
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16665
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16666
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16667
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16668
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16669
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16670
                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16671
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16672
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16673
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16674
                            identifier_c param_name("P");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16675
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16676
                            symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16677
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16678
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16679
                            if (P_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16680
                              P_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16681
                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16682
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16683
                            
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16684
                            if(search_expression_type->is_integer_type(P_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16685
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16686
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16687
                                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16688
                                s4o.print("__insert(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16689
                                IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16690
                                s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16691
                                IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16692
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16693
                                P_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16694
                                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16695
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16696
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16697
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16698
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16699
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16700
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16701
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16702
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16703
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16704
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16705
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16706
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16707
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16708
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16709
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16710
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16711
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16712
    }/*function_insert*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16713
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16714
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16715
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16716
 *DELETE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16717
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16718
    case function_delete :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16719
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16720
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16721
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16722
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16723
            identifier_c param_name("IN");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16724
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16725
            symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16726
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16727
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16728
            if (IN_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16729
              IN_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16730
            symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16731
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16732
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16733
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16734
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16735
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16736
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16737
                    identifier_c param_name("L");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16738
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16739
                    symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16740
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16741
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16742
                    if (L_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16743
                      L_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16744
                    symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16745
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16746
                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16747
                    if(search_expression_type->is_integer_type(L_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16748
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16749
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16750
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16751
                            identifier_c param_name("P");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16752
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16753
                            symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16754
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16755
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16756
                            if (P_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16757
                              P_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16758
                            symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16759
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16760
                            
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16761
                            if(search_expression_type->is_integer_type(P_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16762
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16763
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16764
                                symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16765
                                s4o.print("__delete(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16766
                                IN_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16767
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16768
                                L_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16769
                                s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16770
                                P_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16771
                                s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16772
                                return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16773
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16774
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16775
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16776
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16777
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16778
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16779
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16780
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16781
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16782
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16783
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16784
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16785
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16786
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16787
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16788
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16789
    }/*function_delete*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16790
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16791
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16792
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16793
 *REPLACE
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16794
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16795
    case function_replace :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16796
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16797
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16798
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16799
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16800
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16801
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16802
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16803
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16804
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16805
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16806
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16807
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16808
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16809
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16810
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16811
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16812
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16813
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16814
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16815
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16816
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16817
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16818
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16819
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16820
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16821
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16822
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16823
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16824
                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16825
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16826
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16827
                        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16828
                            identifier_c param_name("L");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16829
                            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16830
                            symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16831
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16832
                            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16833
                            if (L_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16834
                              L_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16835
                            symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16836
                            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16837
                            
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16838
                            if(search_expression_type->is_integer_type(L_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16839
                            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16840
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16841
                                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16842
                                    identifier_c param_name("P");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16843
                                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16844
                                    symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16845
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16846
                                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16847
                                    if (P_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16848
                                      P_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16849
                                    symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16850
                                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16851
                                    
40
873a5b60a7ea Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents: 38
diff changeset
 16852
                                    if(search_expression_type->is_integer_type(P_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16853
                                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16854
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16855
                                        symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16856
                                        s4o.print("__replace(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16857
                                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16858
                                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16859
                                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16860
                                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16861
                                        L_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16862
                                        s4o.print(", ");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16863
                                        P_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16864
                                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16865
                                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16866
                                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16867
                                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16868
                                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16869
                                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16870
                                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16871
                                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16872
                            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16873
                            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16874
                            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16875
                        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16876
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16877
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16878
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16879
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16880
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16881
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16882
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16883
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16884
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16885
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16886
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16887
    }/*function_replace*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16888
    break;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16889
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16890
/****
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16891
 *FIND
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16892
 */
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16893
    case function_find :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16894
    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16895
        symbol_c *last_type_symbol = NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16896
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16897
        {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16898
            identifier_c param_name("IN1");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16899
            /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16900
            symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16901
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16902
            /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16903
            if (IN1_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16904
              IN1_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16905
            symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16906
            last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16907
            
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16908
            if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16909
            {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16910
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16911
                {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16912
                    identifier_c param_name("IN2");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16913
                    /* Get the value from a foo(<param_name> = <param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16914
                    symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16915
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16916
                    /* Get the value from a foo(<param_value>) style call */
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16917
                    if (IN2_param_value == NULL)
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16918
                      IN2_param_value = function_call_param_iterator.next();
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16919
                    symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16920
                    last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16921
                    
42
b45c7f34dec1 IEC std lib test enhanced string ops, from string and to string conv.
etisserant
parents: 41
diff changeset
 16922
                    if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16923
                    {
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16924
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16925
                        symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16926
                        s4o.print("__find(");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16927
                        IN1_param_value->accept(*this);
38
6cce7d14647e Stage4 changes according to new STD lib implementation
etisserant
parents: 35
diff changeset
 16928
                        s4o.print(", ");
35
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16929
                        IN2_param_value->accept(*this);
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16930
                        s4o.print(")");
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16931
                        return NULL;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16932
                        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16933
                    }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16934
                    
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16935
                    ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16936
                }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16937
                
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16938
            }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16939
            
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16940
            ERROR;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16941
        }
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16942
        
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16943
    }/*function_find*/
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16944
    break;
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16945
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16946
    case function_none :
9f3d6c089533 Generated code for il finished
lbessard
parents: 34
diff changeset
 16947
    ERROR;
33
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16948
}
4507beb2aac6 preliminary std lib support for ST
etisserant
parents:
diff changeset
 16949
return NULL;