absyntax/absyntax.def
changeset 399 55b074ea7255
parent 350 2c3c4dc34979
child 406 6381589697ff
child 495 8c6823fee086
equal deleted inserted replaced
398:f1f3facc59e7 399:55b074ea7255
   918 
   918 
   919 /* | il_simple_operator [il_operand] */
   919 /* | il_simple_operator [il_operand] */
   920 SYM_REF2(il_simple_operation_c, il_simple_operator, il_operand)
   920 SYM_REF2(il_simple_operation_c, il_simple_operator, il_operand)
   921 
   921 
   922 /* | function_name [il_operand_list] */
   922 /* | function_name [il_operand_list] */
   923 /* NOTE: The parameter 'called_function_declaration' is used to pass data between the stage 3 and stage 4.
   923 /* NOTE: The parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
       
   924  *       data between the stage 3 and stage 4.
   924  *       See the comment above function_invocation_c for more details 
   925  *       See the comment above function_invocation_c for more details 
   925  */
   926  */
   926 SYM_REF2(il_function_call_c, function_name, il_operand_list, symbol_c *called_function_declaration; int extensible_param_count;)
   927 SYM_REF2(il_function_call_c, function_name, il_operand_list, symbol_c *called_function_declaration; symbol_c *overloaded_return_type; int extensible_param_count;)
   927 
   928 
   928 
   929 
   929 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */
   930 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */
   930 SYM_REF3(il_expression_c, il_expr_operator, il_operand, simple_instr_list)
   931 SYM_REF3(il_expression_c, il_expr_operator, il_operand, simple_instr_list)
   931 
   932 
   940  */
   941  */
   941 SYM_REF4(il_fb_call_c, il_call_operator, fb_name, il_operand_list, il_param_list)
   942 SYM_REF4(il_fb_call_c, il_call_operator, fb_name, il_operand_list, il_param_list)
   942 
   943 
   943 
   944 
   944 /* | function_name '(' eol_list [il_param_list] ')' */
   945 /* | function_name '(' eol_list [il_param_list] ')' */
   945 /* NOTE: The parameter 'called_function_declaration' is used to pass data between the stage 3 and stage 4.
   946 /* NOTE: The parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
       
   947  *       data between the stage 3 and stage 4.
   946  *       See the comment above function_invocation_c for more details 
   948  *       See the comment above function_invocation_c for more details 
   947  */
   949  */
   948 SYM_REF2(il_formal_funct_call_c, function_name, il_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
   950 SYM_REF2(il_formal_funct_call_c, function_name, il_param_list, symbol_c *called_function_declaration; symbol_c *overloaded_return_type; int extensible_param_count;)
   949 
   951 
   950 /* | il_operand_list ',' il_operand */
   952 /* | il_operand_list ',' il_operand */
   951 SYM_LIST(il_operand_list_c)
   953 SYM_LIST(il_operand_list_c)
   952 
   954 
   953 /* | simple_instr_list il_simple_instruction */
   955 /* | simple_instr_list il_simple_instruction */
  1043 SYM_REF1(neg_expression_c, exp)
  1045 SYM_REF1(neg_expression_c, exp)
  1044 SYM_REF1(not_expression_c, exp)
  1046 SYM_REF1(not_expression_c, exp)
  1045 
  1047 
  1046 /*    formal_param_list -> may be NULL ! */
  1048 /*    formal_param_list -> may be NULL ! */
  1047 /* nonformal_param_list -> may be NULL ! */
  1049 /* nonformal_param_list -> may be NULL ! */
  1048 /* NOTE: The parameter 'called_function_declaration' is used to pass data between the stage 3 and stage 4.
  1050 /* NOTE: The parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
       
  1051  *        data between the stage 3 and stage 4.
  1049  *       The IEC 61131-3 standard allows for overloaded standard functions. This means that some
  1052  *       The IEC 61131-3 standard allows for overloaded standard functions. This means that some
  1050  *       function calls are not compeletely defined by the name of the function being called,
  1053  *       function calls are not compeletely defined by the name of the function being called,
  1051  *       and need to be disambiguated with using the data types of the parameters being passed.
  1054  *       and need to be disambiguated with using the data types of the parameters being passed.
  1052  *       Stage 3 does this to verify semantic correctnes.
  1055  *       Stage 3 does this to verify semantic correctnes.
  1053  *       Stage 4 also needs to do this in order to determine which function to call.
  1056  *       Stage 4 also needs to do this in order to determine which function to call.
  1054  *       It does not make sense to determine the exact function being called twice (once in stage 3,
  1057  *       It does not make sense to determine the exact function being called twice (once in stage 3,
  1055  *       and again in stage 4), so stage 3 will store this infor in the parameter called_function_declaration
  1058  *       and again in stage 4), so stage 3 will store this infor in the parameter called_function_declaration
  1056  *       for stage 4 to use it later on.
  1059  *       for stage 4 to use it later on.
  1057  */
  1060  */
  1058 SYM_REF3(function_invocation_c, function_name, formal_param_list, nonformal_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
  1061 SYM_REF3(function_invocation_c, function_name, formal_param_list, nonformal_param_list, symbol_c *called_function_declaration; symbol_c *overloaded_return_type; int extensible_param_count;)
  1059 
  1062 
  1060 
  1063 
  1061 /********************/
  1064 /********************/
  1062 /* B 3.2 Statements */
  1065 /* B 3.2 Statements */
  1063 /********************/
  1066 /********************/