stage1_2/iec_bison.yy
changeset 1014 a61f8f58f612
parent 1012 1f2af384fb1f
child 1016 91bef6704b44
--- a/stage1_2/iec_bison.yy	Wed May 11 19:38:31 2016 +0100
+++ b/stage1_2/iec_bison.yy	Fri May 13 12:18:50 2016 +0100
@@ -650,6 +650,9 @@
 %token TIME_OF_DAY
 %token TOD
 
+/* A non-standard extension! */
+%token VOID
+
 /******************************************************/
 /* Symbols defined in                                 */
 /* "Safety Software Technical Specification,          */
@@ -5008,6 +5011,14 @@
 	 direct_variable_symtable.pop();
 	 library_element_symtable.insert($1, prev_declared_derived_function_name_token);
 	}
+/* | FUNCTION derived_function_name ':' VOID io_OR_function_var_declarations_list function_body END_FUNCTION */
+| function_name_declaration ':' VOID io_OR_function_var_declarations_list function_body END_FUNCTION
+	{$$ = new function_declaration_c($1, new void_c(locloc(@3)), $4, $5, locloc(@$));
+	 if (!runtime_options.disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */
+	 variable_name_symtable.pop();
+	 direct_variable_symtable.pop();
+	 library_element_symtable.insert($1, prev_declared_derived_function_name_token);
+	}
 /* ERROR_CHECK_BEGIN */
 | function_name_declaration elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION
 	{$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing after function name in function declaration."); yynerrs++;}