Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision c4f68dcd3fea60da49bcba686a6f6a3b92f92e2f)
+++ src/Parser/parser.yy	(revision 1997b4e812dbb8458b745e5395a203821f48882c)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul 25 15:54:35 2018
-// Update Count     : 3841
+// Last Modified On : Sat Aug  4 09:38:36 2018
+// Update Count     : 3986
 //
 
@@ -186,4 +186,12 @@
 } // fieldDecl
 
+ForCtrl * forCtrl( ExpressionNode * type, string * index, ExpressionNode * start, ExpressionNode * comp, ExpressionNode * inc ) {
+	return new ForCtrl(
+		distAttr( DeclarationNode::newTypeof( type ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),
+		new ExpressionNode( build_binary_val( OperKinds::LThan, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ),
+		new ExpressionNode( build_binary_val( OperKinds::PlusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
+} // forCtrl
+
+
 bool forall = false, yyy = false;						// aggregate have one or more forall qualifiers ?
 
@@ -217,6 +225,6 @@
 	WaitForStmt * wfs;
 	Expression * constant;
-	IfCtl * ifctl;
-	ForCtl * fctl;
+	IfCtrl * ifctl;
+	ForCtrl * fctl;
 	LabelNode * label;
 	InitializerNode * in;
@@ -1049,11 +1057,11 @@
 if_control_expression:
 	comma_expression
-		{ $$ = new IfCtl( nullptr, $1 ); }
+		{ $$ = new IfCtrl( nullptr, $1 ); }
 	| c_declaration										// no semi-colon
-		{ $$ = new IfCtl( $1, nullptr ); }
+		{ $$ = new IfCtrl( $1, nullptr ); }
 	| cfa_declaration									// no semi-colon
-		{ $$ = new IfCtl( $1, nullptr ); }
+		{ $$ = new IfCtrl( $1, nullptr ); }
 	| declaration comma_expression						// semi-colon separated
-		{ $$ = new IfCtl( $1, $2 ); }
+		{ $$ = new IfCtrl( $1, $2 ); }
  	;
 
@@ -1111,6 +1119,10 @@
 	WHILE '(' push if_control_expression ')' statement pop
 		{ $$ = new StatementNode( build_while( $4, $6 ) ); }
+	| WHILE '(' ')' statement							// CFA => while ( 1 )
+		{ $$ = new StatementNode( build_while( new IfCtrl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), $4 ) ); }
 	| DO statement WHILE '(' comma_expression ')' ';'
 		{ $$ = new StatementNode( build_do_while( $5, $2 ) ); }
+	| DO statement WHILE '(' ')' ';'					// CFA => do while( 1 )
+		{ $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), $2 ) ); }
 	| FOR '(' push for_control_expression ')' statement pop
 		{ $$ = new StatementNode( build_for( $4, $6 ) ); }
@@ -1118,8 +1130,60 @@
 
 for_control_expression:
-	comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt
-		{ $$ = new ForCtl( $1, $3, $5 ); }
-	| declaration comma_expression_opt ';' comma_expression_opt // C99
-		{ $$ = new ForCtl( $1, $2, $4 ); }
+	comma_expression_opt								// CFA
+		{
+			if ( ! $1 ) {								// => for ( ;; )
+				$$ = new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr );
+			} else {
+				$$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), $1->clone(),
+							 new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
+			} // if
+		}
+	| constant_expression '~' constant_expression		// CFA
+		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
+	| constant_expression '~' constant_expression '~' constant_expression // CFA
+		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $3, $5 ); }
+	| comma_expression_opt ';' comma_expression			// CFA
+		{
+			if ( ! $1 ) {
+				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
+			} else if ( ! $3 ) {
+				SemanticError( yylloc, "Missing loop range." ); $$ = nullptr;
+			} else {
+				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
+					$$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), $3->clone(),
+								 new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
+				} else {
+					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
+				} // if
+			} // if
+		}
+	| comma_expression_opt ';' constant_expression '~' constant_expression // CFA
+		{
+			if ( ! $1 ) {
+				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
+			} else {
+				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
+					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
+				} else {
+					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
+				} // if
+			} // if
+		}
+	| comma_expression_opt ';' constant_expression '~' constant_expression '~' constant_expression // CFA
+		{
+			if ( ! $1 ) {
+				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
+			} else {
+				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
+					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $5, $7 );
+				} else {
+					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
+				} // if
+			} // if
+		}
+	| comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt
+		{ $$ = new ForCtrl( $1, $3, $5 ); }
+	| declaration comma_expression_opt ';' comma_expression_opt // C99, declaration has ';'
+		{ $$ = new ForCtrl( $1, $2, $4 ); }
  	;
 
