stage1_2/iec.y
changeset 79 7417b346e5a3
parent 78 aead91ec37cd
child 85 a6e651ba55c2
equal deleted inserted replaced
78:aead91ec37cd 79:7417b346e5a3
  5178  * (Section 3.3.2.4) as being of an integer type
  5178  * (Section 3.3.2.4) as being of an integer type
  5179  * (e.g., SINT, INT, or DINT).
  5179  * (e.g., SINT, INT, or DINT).
  5180  *
  5180  *
  5181  * Obviously this presuposes that the control_variable
  5181  * Obviously this presuposes that the control_variable
  5182  * must have been declared in some VAR .. END_VAR
  5182  * must have been declared in some VAR .. END_VAR
  5183  * We could therefore change the syntax to read
  5183  * We must therefore change the syntax to read
  5184  * control_variable: prev_declared_variable_name;
  5184  * control_variable: prev_declared_variable_name;
  5185  * 
  5185  * 
  5186  * However, it is probaly best if we leave the semantic checks
  5186  * If we don't, then the correct use of any previosuly declared 
  5187  * to the semantic analyser of pass 2.
  5187  * variable would result in an incorrect syntax error
  5188 */
  5188 */
  5189 // control_variable: prev_declared_variable_name {$$ = $1;};
  5189 control_variable: prev_declared_variable_name {$$ = $1;};
  5190 control_variable: identifier {$$ = $1;};
  5190 // control_variable: identifier {$$ = $1;};
  5191 
  5191 
  5192 /* Integrated directly into for_statement */
  5192 /* Integrated directly into for_statement */
  5193 /*
  5193 /*
  5194 for_list:
  5194 for_list:
  5195   expression TO expression [BY expression]
  5195   expression TO expression [BY expression]