Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision b499c18a12b7dd278c8dc3bd52533a4c43b152e6)
+++ src/Parser/lex.ll	(revision b6ad601afc2b4ebc704c5026ec01e1ef6347ff8e)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Wed Aug 29 15:02:41 2018
- * Update Count     : 686
+ * Last Modified On : Thu Nov  1 20:57:35 2018
+ * Update Count     : 687
  */
 
@@ -209,4 +209,5 @@
 __attribute__	{ KEYWORD_RETURN(ATTRIBUTE); }			// GCC
 auto			{ KEYWORD_RETURN(AUTO); }
+basetypeof		{ KEYWORD_RETURN(BASETYPEOF); }			// CFA
 _Bool			{ KEYWORD_RETURN(BOOL); }				// C99
 break			{ KEYWORD_RETURN(BREAK); }
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision b499c18a12b7dd278c8dc3bd52533a4c43b152e6)
+++ src/Parser/parser.yy	(revision b6ad601afc2b4ebc704c5026ec01e1ef6347ff8e)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 30 17:02:25 2018
-// Update Count     : 4029
+// Last Modified On : Thu Nov  1 20:59:49 2018
+// Update Count     : 4030
 //
 
@@ -186,8 +186,4 @@
 } // fieldDecl
 
-ExpressionNode *forInc( const OperKinds op ) {
-	return new ExpressionNode( build_constantInteger( *new string( op == OperKinds::LThan || op == OperKinds::LEThan ? "1" : "-1" ) ) );
-} // forInc
-
 ForCtrl * forCtrl( ExpressionNode * type, string * index, ExpressionNode * start, enum OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) {
 	ConstantExpr *constant = dynamic_cast<ConstantExpr *>(type->get_expr());
@@ -198,5 +194,6 @@
 		distAttr( DeclarationNode::newTypeof( type ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),
 		new ExpressionNode( build_binary_val( compop, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ),
-		new ExpressionNode( build_binary_val( OperKinds::PlusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
+		new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto
+											  OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
 } // forCtrl
 
@@ -261,5 +258,5 @@
 %token ZERO_T ONE_T										// CFA
 %token VALIST											// GCC
-%token TYPEOF LABEL										// GCC
+%token TYPEOF BASETYPEOF LABEL							// GCC
 %token ENUM STRUCT UNION
 %token EXCEPTION										// CFA
@@ -636,7 +633,5 @@
 		{ $$ = new ExpressionNode( build_fieldSel( $1, build_tuple( $4 ) ) ); }
 	| postfix_expression ARROW no_attr_identifier
-		{
-			$$ = new ExpressionNode( build_pfieldSel( $1, *$3 == "0" || *$3 == "1" ? build_constantInteger( *$3 ) : build_varref( $3 ) ) );
-		}
+		{ $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); }
 	| postfix_expression ARROW INTEGERconstant			// CFA, tuple index
 		{ $$ = new ExpressionNode( build_pfieldSel( $1, build_constantInteger( *$3 ) ) ); }
@@ -1146,9 +1141,9 @@
 			} else {
 				$$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
-							  OperKinds::LThan, $1->clone(), forInc( OperKinds::LThan ) );
+							  OperKinds::LThan, $1->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
 			} // if
 		}
 	| constant_expression inclexcl constant_expression	// CFA
-		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, forInc( $2 ) ); }
+		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
 	| constant_expression inclexcl constant_expression '~' constant_expression // CFA
 		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, $5 ); }
@@ -1162,5 +1157,5 @@
 				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
 					$$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
-								  OperKinds::LThan, $3->clone(), forInc( OperKinds::LThan ) );
+								  OperKinds::LThan, $3->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
 				} else {
 					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
@@ -1174,5 +1169,5 @@
 			} else {
 				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
-					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, forInc( $4 ) );
+					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
 				} else {
 					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
@@ -1855,11 +1850,15 @@
 
 indirect_type:
-	TYPEOF '(' type ')'									// GCC: typeof(x) y;
+	TYPEOF '(' type ')'									// GCC: typeof( x ) y;
 		{ $$ = $3; }
-	| TYPEOF '(' comma_expression ')'					// GCC: typeof(a+b) y;
+	| TYPEOF '(' comma_expression ')'					// GCC: typeof( a+b ) y;
 		{ $$ = DeclarationNode::newTypeof( $3 ); }
-	| ATTR_TYPEGENname '(' type ')'						// CFA: e.g., @type(x) y;
+	| BASETYPEOF '(' type ')'							// CFA: basetypeof( x ) y;
+		{ $$ = DeclarationNode::newTypeof( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ), true ); }
+	| BASETYPEOF '(' comma_expression ')'				// CFA: basetypeof( a+b ) y;
+		{ $$ = DeclarationNode::newTypeof( $3, true ); }
+	| ATTR_TYPEGENname '(' type ')'						// CFA: e.g., @type( x ) y;
 		{ $$ = DeclarationNode::newAttr( $1, $3 ); }
-	| ATTR_TYPEGENname '(' comma_expression ')'			// CFA: e.g., @type(a+b) y;
+	| ATTR_TYPEGENname '(' comma_expression ')'			// CFA: e.g., @type( a+b ) y;
 		{ $$ = DeclarationNode::newAttr( $1, $3 ); }
 	| ZERO_T											// CFA
