stage1_2/iec_flex.ll
changeset 948 543f8319bdf8
parent 934 2a42a68f4b59
child 952 e984cfdf3b10
equal deleted inserted replaced
947:aca1ab9fcb6d 948:543f8319bdf8
  1050 	 *       FUNCTION_BLOCKs that do not have at least one VAR_END before the body_state.
  1050 	 *       FUNCTION_BLOCKs that do not have at least one VAR_END before the body_state.
  1051 	 *       If the code has an error, and no VAR_END before the body, we will simply
  1051 	 *       If the code has an error, and no VAR_END before the body, we will simply
  1052 	 *       continue in the <vardecl_state> state, untill the end of the FUNCTION, FUNCTION_BLOCK
  1052 	 *       continue in the <vardecl_state> state, untill the end of the FUNCTION, FUNCTION_BLOCK
  1053 	 *       or PROGAM.
  1053 	 *       or PROGAM.
  1054 	 */
  1054 	 */
  1055 FUNCTION				yy_push_state(header_state); return FUNCTION;
  1055 FUNCTION				BEGIN(header_state); return FUNCTION;
  1056 FUNCTION_BLOCK				yy_push_state(header_state); return FUNCTION_BLOCK;
  1056 FUNCTION_BLOCK				BEGIN(header_state); return FUNCTION_BLOCK;
  1057 PROGRAM					yy_push_state(header_state); return PROGRAM;
  1057 PROGRAM					BEGIN(header_state); return PROGRAM;
  1058 CONFIGURATION				BEGIN(config_state); return CONFIGURATION;
  1058 CONFIGURATION				BEGIN(config_state); return CONFIGURATION;
  1059 }
  1059 }
  1060 
  1060 
  1061 	/* INITIAL -> body_state */
  1061 	/* INITIAL -> body_state */
  1062 	/* required if the function, program, etc.. has no VAR block! */
  1062 	/* required if the function, program, etc.. has no VAR block! */
  1106 }
  1106 }
  1107 
  1107 
  1108 
  1108 
  1109 	/* vardecl_list_state -> pop to $previous_state (vardecl_list_state) */
  1109 	/* vardecl_list_state -> pop to $previous_state (vardecl_list_state) */
  1110 <vardecl_state>{
  1110 <vardecl_state>{
  1111 END_VAR				yy_pop_state(); return END_VAR; /* pop back to header_state */
  1111 END_VAR				yy_pop_state(); return END_VAR; /* pop back to vardecl_list_state */
  1112 }
  1112 }
  1113 
  1113 
  1114 
  1114 
  1115 	/* body_state -> (il_state | st_state | sfc_state) */
  1115 	/* body_state -> (il_state | st_state | sfc_state) */
  1116 <body_state>{
  1116 <body_state>{