absyntax/absyntax.def
changeset 406 6381589697ff
parent 399 55b074ea7255
child 498 0637a4490c8c
equal deleted inserted replaced
405:7b5d67d1aeef 406:6381589697ff
   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 parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
   923 /* NOTE: The parameters 'called_function_declaration' is used to pass 
   924  *       data between the stage 3 and stage 4.
   924  *       data between the stage 3 and stage 4.
   925  *       See the comment above function_invocation_c for more details 
   925  *       See the comment above function_invocation_c for more details 
   926  */
   926  */
   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 SYM_REF2(il_function_call_c, function_name, il_operand_list, symbol_c *called_function_declaration; int extensible_param_count;)
   928 
   928 
   929 
   929 
   930 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */
   930 /* | il_expr_operator '(' [il_operand] eol_list [simple_instr_list] ')' */
   931 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)
   932 
   932 
   941  */
   941  */
   942 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)
   943 
   943 
   944 
   944 
   945 /* | function_name '(' eol_list [il_param_list] ')' */
   945 /* | function_name '(' eol_list [il_param_list] ')' */
   946 /* NOTE: The parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
   946 /* NOTE: The parameters 'called_function_declaration' is used to pass 
   947  *       data between the stage 3 and stage 4.
   947  *       data between the stage 3 and stage 4.
   948  *       See the comment above function_invocation_c for more details 
   948  *       See the comment above function_invocation_c for more details 
   949  */
   949  */
   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;)
   950 SYM_REF2(il_formal_funct_call_c, function_name, il_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
   951 
   951 
   952 /* | il_operand_list ',' il_operand */
   952 /* | il_operand_list ',' il_operand */
   953 SYM_LIST(il_operand_list_c)
   953 SYM_LIST(il_operand_list_c)
   954 
   954 
   955 /* | simple_instr_list il_simple_instruction */
   955 /* | simple_instr_list il_simple_instruction */
  1045 SYM_REF1(neg_expression_c, exp)
  1045 SYM_REF1(neg_expression_c, exp)
  1046 SYM_REF1(not_expression_c, exp)
  1046 SYM_REF1(not_expression_c, exp)
  1047 
  1047 
  1048 /*    formal_param_list -> may be NULL ! */
  1048 /*    formal_param_list -> may be NULL ! */
  1049 /* nonformal_param_list -> may be NULL ! */
  1049 /* nonformal_param_list -> may be NULL ! */
  1050 /* NOTE: The parameters 'called_function_declaration' and 'overloaded_return_type' are used to pass 
  1050 /* NOTE: The parameters 'called_function_declaration' is used to pass 
  1051  *        data between the stage 3 and stage 4.
  1051  *        data between the stage 3 and stage 4.
  1052  *       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
  1053  *       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,
  1054  *       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.
  1055  *       Stage 3 does this to verify semantic correctnes.
  1055  *       Stage 3 does this to verify semantic correctnes.
  1056  *       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.
  1057  *       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,
  1058  *       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
  1059  *       for stage 4 to use it later on.
  1059  *       for stage 4 to use it later on.
  1060  */
  1060  */
  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;)
  1061 SYM_REF3(function_invocation_c, function_name, formal_param_list, nonformal_param_list, symbol_c *called_function_declaration; int extensible_param_count;)
  1062 
  1062 
  1063 
  1063 
  1064 /********************/
  1064 /********************/
  1065 /* B 3.2 Statements */
  1065 /* B 3.2 Statements */
  1066 /********************/
  1066 /********************/