stage1_2/iec.y
changeset 133 fff75b8283be
parent 131 f55ef301e14c
child 134 0e43c556cd2d
equal deleted inserted replaced
132:39f88c3d803d 133:fff75b8283be
  2509 | type_declaration_list type_declaration error
  2509 | type_declaration_list type_declaration error
  2510 	{$$ = NULL;
  2510 	{$$ = NULL;
  2511 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of data type declaration.");
  2511 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of data type declaration.");
  2512 	 yyerrok;
  2512 	 yyerrok;
  2513 	}
  2513 	}
       
  2514 | type_declaration_list error ';'
       
  2515 	{$$ = NULL;
       
  2516 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid data type declaration.");
       
  2517 	 yyerrok;
       
  2518 	}
  2514 | type_declaration_list ';'
  2519 | type_declaration_list ';'
  2515 	{$$ = NULL;
  2520 	{$$ = NULL;
  2516 	 yynerrs++;
  2521 	 yynerrs++;
  2517 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after data type declaration.");
  2522 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after data type declaration.");
  2518 	}
  2523 	}
  3061 | structure_element_declaration_list structure_element_declaration error
  3066 | structure_element_declaration_list structure_element_declaration error
  3062 	{$$ = NULL;
  3067 	{$$ = NULL;
  3063 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of structure element declaration.");
  3068 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of structure element declaration.");
  3064 	 yyerrok;
  3069 	 yyerrok;
  3065 	}
  3070 	}
       
  3071 | structure_element_declaration_list error ';'
       
  3072 	{$$ = NULL;
       
  3073 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid structure element declaration.");
       
  3074 	 yyerrok;
       
  3075 	}
  3066 | structure_element_declaration_list ';'
  3076 | structure_element_declaration_list ';'
  3067 	{$$ = NULL;
  3077 	{$$ = NULL;
  3068 	 yynerrs++;
  3078 	 yynerrs++;
  3069 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after structure element declaration.");
  3079 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after structure element declaration.");
  3070 	}
  3080 	}
  3455 | input_declaration_list input_declaration ';'
  3465 | input_declaration_list input_declaration ';'
  3456 	{$$ = $1; $$->add_element($2);}
  3466 	{$$ = $1; $$->add_element($2);}
  3457 /* ERROR_CHECK_BEGIN */
  3467 /* ERROR_CHECK_BEGIN */
  3458 | input_declaration error
  3468 | input_declaration error
  3459 	{$$ = NULL;
  3469 	{$$ = NULL;
  3460 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of input variable declaration.");
  3470 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of input variable(s) declaration.");
  3461 	 yyerrok;
  3471 	 yyerrok;
  3462 	}
  3472 	}
  3463 | input_declaration_list input_declaration error
  3473 | input_declaration_list input_declaration error
  3464 	{$$ = NULL;
  3474 	{$$ = NULL;
  3465 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of input variable declaration.");
  3475 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of input variable(s) declaration.");
       
  3476 	 yyerrok;
       
  3477 	}
       
  3478 | input_declaration_list error ';'
       
  3479 	{$$ = NULL;
       
  3480 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid input variable(s) declaration.");
  3466 	 yyerrok;
  3481 	 yyerrok;
  3467 	}
  3482 	}
  3468 | input_declaration_list ';'
  3483 | input_declaration_list ';'
  3469 	{$$ = NULL;
  3484 	{$$ = NULL;
  3470 	 yynerrs++;
  3485 	 yynerrs++;
  3471 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after input variable declaration.");
  3486 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after input variable(s) declaration.");
  3472 	}
  3487 	}
  3473 /* ERROR_CHECK_END */
  3488 /* ERROR_CHECK_END */
  3474 ;
  3489 ;
  3475 
  3490 
  3476 
  3491 
  3782 | var_declaration_list var_declaration ';'
  3797 | var_declaration_list var_declaration ';'
  3783 	{$$ = $1; $$->add_element($2);}
  3798 	{$$ = $1; $$->add_element($2);}
  3784 /* ERROR_CHECK_BEGIN */
  3799 /* ERROR_CHECK_BEGIN */
  3785 | var_declaration error
  3800 | var_declaration error
  3786 	{$$ = NULL;
  3801 	{$$ = NULL;
  3787 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of variable declaration.");
  3802 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of variable(s) declaration.");
  3788 	 yyerrok;
  3803 	 yyerrok;
  3789 	}
  3804 	}
  3790 | var_declaration_list var_declaration error
  3805 | var_declaration_list var_declaration error
  3791 	{$$ = NULL;
  3806 	{$$ = NULL;
  3792 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of variable declaration.");
  3807 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of variable(s) declaration.");
       
  3808 	 yyerrok;
       
  3809 	}
       
  3810 | var_declaration_list error ';'
       
  3811 	{$$ = NULL;
       
  3812 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid variable(s) declaration.");
  3793 	 yyerrok;
  3813 	 yyerrok;
  3794 	}
  3814 	}
  3795 | var_declaration_list ';'
  3815 | var_declaration_list ';'
  3796 	{$$ = NULL;
  3816 	{$$ = NULL;
  3797 	 yynerrs++;
  3817 	 yynerrs++;
  3798 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after variable declaration.");
  3818 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after variable(s) declaration.");
  3799 	}
  3819 	}
  3800 /* ERROR_CHECK_END */
  3820 /* ERROR_CHECK_END */
  3801 ;
  3821 ;
  3802 
  3822 
  3803 
  3823 
  3994 | located_var_decl_list located_var_decl error
  4014 | located_var_decl_list located_var_decl error
  3995 	{$$ = NULL;
  4015 	{$$ = NULL;
  3996 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of located variable declaration.");
  4016 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of located variable declaration.");
  3997 	 yyerrok;
  4017 	 yyerrok;
  3998 	}
  4018 	}
       
  4019 | located_var_decl_list error ';'
       
  4020 	{$$ = NULL;
       
  4021 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid located variable declaration.");
       
  4022 	 yyerrok;
       
  4023 	}
  3999 | located_var_decl_list ';'
  4024 | located_var_decl_list ';'
  4000 	{$$ = NULL;
  4025 	{$$ = NULL;
  4001 	 yynerrs++;
  4026 	 yynerrs++;
  4002 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after located variable declaration.");
  4027 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after located variable declaration.");
  4003 	}
  4028 	}
  4091 	 yyerrok;
  4116 	 yyerrok;
  4092 	}
  4117 	}
  4093 | external_declaration_list external_declaration error
  4118 | external_declaration_list external_declaration error
  4094 	{$$ = NULL;
  4119 	{$$ = NULL;
  4095 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of external variable declaration.");
  4120 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of external variable declaration.");
       
  4121 	 yyerrok;
       
  4122 	}
       
  4123 | external_declaration_list error ';'
       
  4124 	{$$ = NULL;
       
  4125 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid external variable declaration.");
  4096 	 yyerrok;
  4126 	 yyerrok;
  4097 	}
  4127 	}
  4098 | external_declaration_list ';'
  4128 | external_declaration_list ';'
  4099 	{$$ = NULL;
  4129 	{$$ = NULL;
  4100 	 yynerrs++;
  4130 	 yynerrs++;
  4241 | global_var_decl_list global_var_decl ';'
  4271 | global_var_decl_list global_var_decl ';'
  4242 	{$$ = $1; $$->add_element($2);}
  4272 	{$$ = $1; $$->add_element($2);}
  4243 /* ERROR_CHECK_BEGIN */
  4273 /* ERROR_CHECK_BEGIN */
  4244 | global_var_decl error
  4274 | global_var_decl error
  4245 	{$$ = NULL;
  4275 	{$$ = NULL;
  4246 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of global variable declaration.");
  4276 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of global variable(s) declaration.");
  4247 	 yyerrok;
  4277 	 yyerrok;
  4248 	}
  4278 	}
  4249 | global_var_decl_list global_var_decl error
  4279 | global_var_decl_list global_var_decl error
  4250 	{$$ = NULL;
  4280 	{$$ = NULL;
  4251 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of global variable declaration.");
  4281 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of global variable(s) declaration.");
       
  4282 	 yyerrok;
       
  4283 	}
       
  4284 | global_var_decl_list error ';'
       
  4285 	{$$ = NULL;
       
  4286 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid global variable(s) declaration.");
  4252 	 yyerrok;
  4287 	 yyerrok;
  4253 	}
  4288 	}
  4254 | global_var_decl_list ';'
  4289 | global_var_decl_list ';'
  4255 	{$$ = NULL;
  4290 	{$$ = NULL;
  4256 	 yynerrs++;
  4291 	 yynerrs++;
  4257 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after global variable declaration.");
  4292 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after global variable(s) declaration.");
  4258 	}
  4293 	}
  4259 /* ERROR_CHECK_END */
  4294 /* ERROR_CHECK_END */
  4260 ;
  4295 ;
  4261 
  4296 
  4262 
  4297 
  4577 | incompl_located_var_decl_list incompl_located_var_decl error
  4612 | incompl_located_var_decl_list incompl_located_var_decl error
  4578 	{$$ = NULL;
  4613 	{$$ = NULL;
  4579 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of incomplete located variable declaration.");
  4614 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of incomplete located variable declaration.");
  4580 	 yyerrok;
  4615 	 yyerrok;
  4581 	}
  4616 	}
       
  4617 | incompl_located_var_decl_list error ';'
       
  4618 	{$$ = NULL;
       
  4619 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid incomplete located variable declaration.");
       
  4620 	 yyerrok;
       
  4621 	}
  4582 | incompl_located_var_decl_list ';'
  4622 | incompl_located_var_decl_list ';'
  4583 	{$$ = NULL;
  4623 	{$$ = NULL;
  4584 	 yynerrs++;
  4624 	 yynerrs++;
  4585 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after incomplete located variable declaration.");
  4625 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after incomplete located variable declaration.");
  4586 	}
  4626 	}
  4660 | var_init_decl_list var_init_decl ';'
  4700 | var_init_decl_list var_init_decl ';'
  4661 	{$$ = $1; $$->add_element($2);}
  4701 	{$$ = $1; $$->add_element($2);}
  4662 /* ERROR_CHECK_BEGIN */
  4702 /* ERROR_CHECK_BEGIN */
  4663 | var_init_decl_list var_init_decl error
  4703 | var_init_decl_list var_init_decl error
  4664 	{$$ = NULL;
  4704 	{$$ = NULL;
  4665 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of variable declaration.");
  4705 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of variable(s) declaration.");
       
  4706 	 yyerrok;
       
  4707 	}
       
  4708 | var_init_decl_list error ';'
       
  4709 	{$$ = NULL;
       
  4710 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid variable(s) declaration.");
  4666 	 yyerrok;
  4711 	 yyerrok;
  4667 	}
  4712 	}
  4668 /* ERROR_CHECK_END */
  4713 /* ERROR_CHECK_END */
  4669 ;
  4714 ;
  4670 
  4715 
  5008 	{$$ = new var_declarations_list_c(locloc(@1));$$->add_element($1);}
  5053 	{$$ = new var_declarations_list_c(locloc(@1));$$->add_element($1);}
  5009 | io_OR_function_var_declarations_list io_var_declarations
  5054 | io_OR_function_var_declarations_list io_var_declarations
  5010 	{$$ = $1; $$->add_element($2);}
  5055 	{$$ = $1; $$->add_element($2);}
  5011 | io_OR_function_var_declarations_list function_var_decls
  5056 | io_OR_function_var_declarations_list function_var_decls
  5012 	{$$ = $1; $$->add_element($2);}
  5057 	{$$ = $1; $$->add_element($2);}
  5013 /* ERROR_CHECK_BEGIN */
       
  5014 | io_OR_function_var_declarations_list error 
       
  5015 	{$$ = NULL;
       
  5016 	 print_err_msg(current_filename, locf(@1), locl(@1), "unexpected token after variable(s) declaration in function declaration.");
       
  5017 	 yyerrok;
       
  5018 	}
       
  5019 /* ERROR_CHECK_END */
       
  5020 ;
  5058 ;
  5021 
  5059 
  5022 
  5060 
  5023 io_var_declarations:
  5061 io_var_declarations:
  5024   input_declarations
  5062   input_declarations
  5059 	 yyerrok;
  5097 	 yyerrok;
  5060 	}
  5098 	}
  5061 | var2_init_decl_list var2_init_decl error
  5099 | var2_init_decl_list var2_init_decl error
  5062 	{$$ = NULL;
  5100 	{$$ = NULL;
  5063 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of function variable(s) declaration.");
  5101 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of function variable(s) declaration.");
       
  5102 	 yyerrok;
       
  5103 	}
       
  5104 | var2_init_decl_list error ';'
       
  5105 	{$$ = NULL;
       
  5106 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid function variable(s) declaration.");
  5064 	 yyerrok;
  5107 	 yyerrok;
  5065 	}
  5108 	}
  5066 | var2_init_decl_list ';'
  5109 | var2_init_decl_list ';'
  5067 	{$$ = NULL;
  5110 	{$$ = NULL;
  5068 	 yynerrs++;
  5111 	 yynerrs++;
  5164   {$$ = new var_declarations_list_c(locloc(@$));$$->add_element($1);}
  5207   {$$ = new var_declarations_list_c(locloc(@$));$$->add_element($1);}
  5165 | io_OR_other_var_declarations_list io_var_declarations
  5208 | io_OR_other_var_declarations_list io_var_declarations
  5166 	{$$ = $1; $$->add_element($2);}
  5209 	{$$ = $1; $$->add_element($2);}
  5167 | io_OR_other_var_declarations_list other_var_declarations
  5210 | io_OR_other_var_declarations_list other_var_declarations
  5168 	{$$ = $1; $$->add_element($2);}
  5211 	{$$ = $1; $$->add_element($2);}
  5169 /* ERROR_CHECK_BEGIN */
       
  5170 | io_OR_other_var_declarations_list error 
       
  5171 	{$$ = NULL;
       
  5172 	 print_err_msg(current_filename, locf(@1), locl(@1), "unexpected token after variable(s) declaration in function declaration.");
       
  5173 	 yyerrok;
       
  5174 	}
       
  5175 /* ERROR_CHECK_END */
       
  5176 ;
  5212 ;
  5177 
  5213 
  5178 /* NOTE:
  5214 /* NOTE:
  5179  *  The IEC specification gives the following definition:
  5215  *  The IEC specification gives the following definition:
  5180  *  other_var_declarations ::=
  5216  *  other_var_declarations ::=
  5226 | temp_var_decls_list temp_var_decl ';'
  5262 | temp_var_decls_list temp_var_decl ';'
  5227 	{$$ = $1; $$->add_element($2);}
  5263 	{$$ = $1; $$->add_element($2);}
  5228 /* ERROR_CHECK_BEGIN */
  5264 /* ERROR_CHECK_BEGIN */
  5229 | temp_var_decl error
  5265 | temp_var_decl error
  5230 	{$$ = NULL;
  5266 	{$$ = NULL;
  5231 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of temporary variable declaration.");
  5267 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at end of temporary variable(s) declaration.");
  5232 	 yyerrok;
  5268 	 yyerrok;
  5233 	}
  5269 	}
  5234 | temp_var_decls_list temp_var_decl error
  5270 | temp_var_decls_list temp_var_decl error
  5235 	{$$ = NULL;
  5271 	{$$ = NULL;
  5236 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of temporary variable declaration.");
  5272 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at end of temporary variable(s) declaration.");
       
  5273 	 yyerrok;
       
  5274 	}
       
  5275 | temp_var_decls_list error ';'
       
  5276 	{$$ = NULL;
       
  5277 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid temporary variable(s) declaration.");
  5237 	 yyerrok;
  5278 	 yyerrok;
  5238 	}
  5279 	}
  5239 | temp_var_decls_list ';'
  5280 | temp_var_decls_list ';'
  5240 	{$$ = NULL;
  5281 	{$$ = NULL;
  5241 	 yynerrs++;
  5282 	 yynerrs++;
  5242 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after temporary variable declaration.");
  5283 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after temporary variable(s) declaration.");
  5243 	}
  5284 	}
  5244 /* ERROR_CHECK_END */
  5285 /* ERROR_CHECK_END */
  5245 ;
  5286 ;
  5246 
  5287 
  5247 
  5288 
  5344 	{$$ = $1; $$->add_element($2);}
  5385 	{$$ = $1; $$->add_element($2);}
  5345 /*
  5386 /*
  5346 | program_var_declarations_list program_access_decls
  5387 | program_var_declarations_list program_access_decls
  5347 	{$$ = $1; $$->add_element($2);}
  5388 	{$$ = $1; $$->add_element($2);}
  5348 */
  5389 */
  5349 /* ERROR_CHECK_BEGIN */
       
  5350 | program_var_declarations_list error 
       
  5351 	{$$ = NULL;
       
  5352 	 print_err_msg(current_filename, locf(@1), locl(@1), "unexpected token after variable(s) declaration in program declaration.");
       
  5353 	 yyerrok;
       
  5354 	}
       
  5355 /* ERROR_CHECK_END */
       
  5356 ;
  5390 ;
  5357 
  5391 
  5358 
  5392 
  5359 /* TODO ... */
  5393 /* TODO ... */
  5360 /*
  5394 /*
  6053 | task_configuration_list task_configuration ';'
  6087 | task_configuration_list task_configuration ';'
  6054 	{$$ = $1; $$->add_element($2);}
  6088 	{$$ = $1; $$->add_element($2);}
  6055 /* ERROR_CHECK_BEGIN */
  6089 /* ERROR_CHECK_BEGIN */
  6056 | task_configuration_list task_configuration error
  6090 | task_configuration_list task_configuration error
  6057   {$$ = NULL;
  6091   {$$ = NULL;
  6058 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at the end of task configuration in resource declaration.");
  6092 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of task configuration in resource declaration.");
  6059 	 yyerrok;
  6093 	 yyerrok;
  6060 	}
  6094 	}
  6061 | task_configuration_list ';'
  6095 | task_configuration_list ';'
  6062   {$$ = NULL;
  6096   {$$ = NULL;
  6063 	 yynerrs++;
  6097 	 yynerrs++;
  6064 	 print_err_msg(current_filename, locf(@1), locl(@1), "unexpected ';' after task configuration in resource declaration.");
  6098 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after task configuration in resource declaration.");
  6065 	}
  6099 	}
  6066 /* ERROR_CHECK_END */
  6100 /* ERROR_CHECK_END */
  6067 ;
  6101 ;
  6068 
  6102 
  6069 
  6103 
  6082 | program_configuration_list program_configuration error
  6116 | program_configuration_list program_configuration error
  6083   {$$ = NULL;
  6117   {$$ = NULL;
  6084 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of program configuration in resource declaration.");
  6118 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of program configuration in resource declaration.");
  6085 	 yyerrok;
  6119 	 yyerrok;
  6086 	}
  6120 	}
       
  6121 | program_configuration_list error ';'
       
  6122   {$$ = NULL;
       
  6123 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid program configuration in resource declaration.");
       
  6124 	 yyerrok;
       
  6125 	}
  6087 | program_configuration_list ';'
  6126 | program_configuration_list ';'
  6088   {$$ = NULL;
  6127   {$$ = NULL;
  6089 	 yynerrs++;
  6128 	 yynerrs++;
  6090 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after program configuration in resource declaration.");
  6129 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after program configuration in resource declaration.");
  6091 	}
  6130 	}
  6129 	 yyerrok;
  6168 	 yyerrok;
  6130 	}
  6169 	}
  6131 | access_declaration_list access_declaration error
  6170 | access_declaration_list access_declaration error
  6132   {$$ = NULL;
  6171   {$$ = NULL;
  6133 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of access variable declaration.");
  6172 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of access variable declaration.");
       
  6173 	 yyerrok;
       
  6174 	}
       
  6175 | access_declaration_list error ';'
       
  6176   {$$ = NULL;
       
  6177 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid access variable declaration.");
  6134 	 yyerrok;
  6178 	 yyerrok;
  6135 	}
  6179 	}
  6136 | access_declaration_list ';'
  6180 | access_declaration_list ';'
  6137   {$$ = NULL;
  6181   {$$ = NULL;
  6138 	 yynerrs++;
  6182 	 yynerrs++;
  6680 	 yyerrok;
  6724 	 yyerrok;
  6681 	}
  6725 	}
  6682 | instance_specific_init_list instance_specific_init error
  6726 | instance_specific_init_list instance_specific_init error
  6683   {$$ = NULL;
  6727   {$$ = NULL;
  6684 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of configuration variable initialization.");
  6728 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of configuration variable initialization.");
       
  6729 	 yyerrok;
       
  6730 	}
       
  6731 | instance_specific_init_list error ';'
       
  6732   {$$ = NULL;
       
  6733 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid configuration variable initialization.");
  6685 	 yyerrok;
  6734 	 yyerrok;
  6686 	}
  6735 	}
  6687 | instance_specific_init_list ';'
  6736 | instance_specific_init_list ';'
  6688   {$$ = NULL;
  6737   {$$ = NULL;
  6689 	 yynerrs++;
  6738 	 yynerrs++;
  7912 | statement_list statement ';'
  7961 | statement_list statement ';'
  7913 	{$$ = $1; $$->add_element($2);}
  7962 	{$$ = $1; $$->add_element($2);}
  7914 | statement_list pragma
  7963 | statement_list pragma
  7915 	{$$ = $1; $$->add_element($2);}
  7964 	{$$ = $1; $$->add_element($2);}
  7916 /* ERROR_CHECK_BEGIN */
  7965 /* ERROR_CHECK_BEGIN */
  7917 | statement_list error
  7966 | statement error
  7918 	{$$ = $1;
  7967 	{$$ = NULL;
  7919 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at the end of statement in ST statement.");
  7968 	 print_err_msg(current_filename, locf(@1), locl(@1), "';' missing at the end of statement in ST statement.");
  7920 	 yyerrok;
  7969 	 yyerrok;
  7921 	}
  7970 	}
       
  7971 | statement_list statement error
       
  7972 	{$$ = NULL;
       
  7973 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of statement in ST statement.");
       
  7974 	 yyerrok;
       
  7975 	}
  7922 | statement_list error ';'
  7976 | statement_list error ';'
  7923 	{$$ = $1;
  7977 	{$$ = NULL;
  7924 	 print_err_msg(current_filename, locf(@1), locl(@3), "invalid statement in ST statement.");
  7978 	 print_err_msg(current_filename, locf(@3), locl(@3), "invalid statement in ST statement.");
  7925 	 yyerrok;
  7979 	 yyerrok;
  7926 	}
  7980 	}
  7927 | statement_list statement error
  7981 | statement_list ';'
  7928 	{$$ = $1;
  7982 	{$$ = NULL;
  7929 	 print_err_msg(current_filename, locf(@2), locl(@2), "';' missing at the end of statement in ST statement.");
  7983 	 print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after statement in ST statement.");
  7930 	 yyerrok;
  7984 	 yyerrok;
  7931 	}
  7985 	}
  7932 /* ERROR_CHECK_END */
  7986 /* ERROR_CHECK_END */
  7933 ;
  7987 ;
  7934 
  7988 
  7947 assignment_statement:
  8001 assignment_statement:
  7948   variable ASSIGN expression
  8002   variable ASSIGN expression
  7949 	{$$ = new assignment_statement_c($1, $3, locloc(@$));}
  8003 	{$$ = new assignment_statement_c($1, $3, locloc(@$));}
  7950 /* ERROR_CHECK_BEGIN */
  8004 /* ERROR_CHECK_BEGIN */
  7951 | variable ASSIGN error
  8005 | variable ASSIGN error
  7952 	{$$ = $1;
  8006 	{$$ = NULL;
  7953 	 print_err_msg(current_filename, locf(@1), locl(@1), "invalid expression after ':=' in ST assignment statement.");
  8007 	 print_err_msg(current_filename, locf(@1), locl(@1), "invalid expression after ':=' in ST assignment statement.");
  7954 	 yyerrok;
  8008 	 yyerrok;
  7955 	}
  8009 	}
  7956 /* ERROR_CHECK_END */
  8010 /* ERROR_CHECK_END */
  7957 ;
  8011 ;
  7981 	{$$ = new fb_invocation_c($1, $3, locloc(@$));}
  8035 	{$$ = new fb_invocation_c($1, $3, locloc(@$));}
  7982 | prev_declared_fb_name '(' param_assignment_nonformal_list ')'
  8036 | prev_declared_fb_name '(' param_assignment_nonformal_list ')'
  7983 	{$$ = new fb_invocation_c($1, $3, locloc(@$));}
  8037 	{$$ = new fb_invocation_c($1, $3, locloc(@$));}
  7984 /* ERROR_CHECK_BEGIN */
  8038 /* ERROR_CHECK_BEGIN */
  7985 | prev_declared_fb_name ')'
  8039 | prev_declared_fb_name ')'
  7986 	{$$ = $1;
  8040 	{$$ = NULL;
  7987 	 yynerrs++;
  8041 	 yynerrs++;
  7988 	 print_err_msg(current_filename, locf(@1), locl(@1), "'(' missing after function block name in ST statement.");
  8042 	 print_err_msg(current_filename, locf(@1), locl(@1), "'(' missing after function block name in ST statement.");
  7989 	}
  8043 	}
  7990 | prev_declared_fb_name param_assignment_formal_list ')'
  8044 | prev_declared_fb_name param_assignment_formal_list ')'
  7991 	{$$ = $1;
  8045 	{$$ = NULL;
  7992 	 yynerrs++;
  8046 	 yynerrs++;
  7993 	 print_err_msg(current_filename, locf(@1), locl(@1), "'(' missing after function block name in ST statement.");
  8047 	 print_err_msg(current_filename, locf(@1), locl(@1), "'(' missing after function block name in ST statement.");
  7994 	}
  8048 	}
  7995 | prev_declared_fb_name error ')'
  8049 | prev_declared_fb_name error ')'
  7996 	{$$ = $1;
  8050 	{$$ = NULL;
  7997 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  8051 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  7998 	 yyerrok;
  8052 	 yyerrok;
  7999 	}
  8053 	}
  8000 | prev_declared_fb_name error param_assignment_formal_list ')'
  8054 | prev_declared_fb_name error param_assignment_formal_list ')'
  8001 	{$$ = $1;
  8055 	{$$ = NULL;
  8002 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  8056 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  8003 	 yyerrok;
  8057 	 yyerrok;
  8004 	}
  8058 	}
  8005 | prev_declared_fb_name error param_assignment_nonformal_list ')'
  8059 | prev_declared_fb_name error param_assignment_nonformal_list ')'
  8006 	{$$ = $1;
  8060 	{$$ = NULL;
  8007 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  8061 	 print_err_msg(current_filename, locf(@1), locl(@1), "expecting '(' after function block name in ST statement.");
  8008 	 yyerrok;
  8062 	 yyerrok;
  8009 	}
  8063 	}
  8010 | prev_declared_fb_name '(' error ')'
  8064 | prev_declared_fb_name '(' error ')'
  8011 	{$$ = $1;
  8065 	{$$ = NULL;
  8012 	 print_err_msg(current_filename, locf(@1), locl(@1), "invalid parameter list in function block invocation in ST statement.");
  8066 	 print_err_msg(current_filename, locf(@1), locl(@1), "invalid parameter list in function block invocation in ST statement.");
  8013 	 yyerrok;
  8067 	 yyerrok;
  8014 	}
  8068 	}
  8015 | prev_declared_fb_name '(' error
  8069 | prev_declared_fb_name '(' error
  8016 	{$$ = $1;
  8070 	{$$ = NULL;
  8017 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8071 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8018 	 yyerrok;
  8072 	 yyerrok;
  8019 	}
  8073 	}
  8020 | prev_declared_fb_name '(' param_assignment_formal_list error
  8074 | prev_declared_fb_name '(' param_assignment_formal_list error
  8021 	{$$ = $1;
  8075 	{$$ = NULL;
  8022 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8076 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8023 	 yyerrok;
  8077 	 yyerrok;
  8024 	}
  8078 	}
  8025 | prev_declared_fb_name '(' param_assignment_nonformal_list error
  8079 | prev_declared_fb_name '(' param_assignment_nonformal_list error
  8026 	{$$ = $1;
  8080 	{$$ = NULL;
  8027 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8081 	 print_err_msg(current_filename, locf(@1), locl(@1), "')' missing after parameter list of function block invocation in ST statement.");
  8028 	 yyerrok;
  8082 	 yyerrok;
  8029 	}
  8083 	}
  8030 /* ERROR_CHECK_END */
  8084 /* ERROR_CHECK_END */
  8031 ;
  8085 ;