Patch:    ivtools-131114-scott-005
For:      ivtools-1.2.11
Author:   scott@wavesemi.com
Subject:  fix to fix in patch 004

This is an intermediate patch to ivtools-1.2.11.  To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:

	patch -p0 <ThisFile

Then rebuild with "make;make install"


Index: src/ComUtil/_parser.c
===================================================================
--- src/ComUtil/_parser.c	(revision 8289)
+++ src/ComUtil/_parser.c	(revision 8292)
@@ -1097,27 +1097,26 @@
 
 	 }
 
-      /* If left paren was encountered without a proceeding identifier */
-      /* it is not to be associated with a command.  First pop any     */
-      /* previous expression off the stack.  Then push it on the paren */
-      /* stack with a -1 indicator for the command id to show such.    */
-      /* Push the negated value of the token type onto the operator    */
-      /* stack, in order to distinguish it from the other operators.   */
-	 while ( (OperStack[TopOfOperStack].oper_type != LEFTPAREN) &&
-                 (TopOfOperStack >= 0 ))
-         {
-             if (OperStack[TopOfOperStack].oper_type == OPERATOR)
-             {
-                 OPERSTK_POP( temp_id );
-                 PFOUT( TOK_COMMAND, opr_tbl_commid( temp_id ),
-                      (opr_tbl_optype( temp_id ) == OPTYPE_BINARY ? 2 : 1), 0, 1 );
-             }
-             else
-             {
-                 OPERSTK_POP( temp_id );
-                 PFOUT( TOK_KEYWORD, temp_id, 1, 0, 0);
-             }
+      /* If left paren was encountered without a proceeding identifier   */
+      /* and a binary operator expected, output any current expression.  */
+         if( expecting==OPTYPE_BINARY ) {
+	   while ( (OperStack[TopOfOperStack].oper_type != LEFTPAREN) &&
+		   (TopOfOperStack >= 0 ))
+	     {
+	       if (OperStack[TopOfOperStack].oper_type == OPERATOR)
+		 {
+		   OPERSTK_POP( temp_id );
+		   PFOUT( TOK_COMMAND, opr_tbl_commid( temp_id ),
+			  (opr_tbl_optype( temp_id ) == OPTYPE_BINARY ? 2 : 1), 0, 1 );
+		 }
+	     }
 	 }
+
+      /* If left paren was encountered without a proceeding identifier    */
+      /* it is not to be associated with a command.  Push it on the       */
+      /* paren stack with a -1 indicator for the command id to show that. */
+      /* Push the negated value of the token type onto the operator       */
+      /* stack, in order to distinguish it from the other operators.      */
 	 PARENSTK_PUSH( toktype, -1, 1 );
 	 OPERSTK_PUSH( -toktype, LEFTPAREN );
 
