647 %token DATE |
647 %token DATE |
648 %token DATE_AND_TIME |
648 %token DATE_AND_TIME |
649 %token DT |
649 %token DT |
650 %token TIME_OF_DAY |
650 %token TIME_OF_DAY |
651 %token TOD |
651 %token TOD |
|
652 |
|
653 /* A non-standard extension! */ |
|
654 %token VOID |
652 |
655 |
653 /******************************************************/ |
656 /******************************************************/ |
654 /* Symbols defined in */ |
657 /* Symbols defined in */ |
655 /* "Safety Software Technical Specification, */ |
658 /* "Safety Software Technical Specification, */ |
656 /* Part 1: Concepts and Function Blocks, */ |
659 /* Part 1: Concepts and Function Blocks, */ |
5006 if (!runtime_options.disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */ |
5009 if (!runtime_options.disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */ |
5007 variable_name_symtable.pop(); |
5010 variable_name_symtable.pop(); |
5008 direct_variable_symtable.pop(); |
5011 direct_variable_symtable.pop(); |
5009 library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
5012 library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
5010 } |
5013 } |
|
5014 /* | FUNCTION derived_function_name ':' VOID io_OR_function_var_declarations_list function_body END_FUNCTION */ |
|
5015 | function_name_declaration ':' VOID io_OR_function_var_declarations_list function_body END_FUNCTION |
|
5016 {$$ = new function_declaration_c($1, new void_c(locloc(@3)), $4, $5, locloc(@$)); |
|
5017 if (!runtime_options.disable_implicit_en_eno) add_en_eno_param_decl_c::add_to($$); /* add EN and ENO declarations, if not already there */ |
|
5018 variable_name_symtable.pop(); |
|
5019 direct_variable_symtable.pop(); |
|
5020 library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
|
5021 } |
5011 /* ERROR_CHECK_BEGIN */ |
5022 /* ERROR_CHECK_BEGIN */ |
5012 | function_name_declaration elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
5023 | function_name_declaration elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
5013 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing after function name in function declaration."); yynerrs++;} |
5024 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing after function name in function declaration."); yynerrs++;} |
5014 | function_name_declaration derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
5025 | function_name_declaration derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
5015 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing after function name in function declaration."); yynerrs++;} |
5026 {$$ = NULL; print_err_msg(locl(@1), locf(@2), "':' missing after function name in function declaration."); yynerrs++;} |