Tcl Source Code

Artifact [05c2ebe8df]
Login

Artifact 05c2ebe8dfaded90ebffa076e08983eb868f77c0:

Attachment "expon.patch" to ticket [1556802fff] added by dgp 2006-09-12 10:18:39.
Index: generic/tclParseExpr.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclParseExpr.c,v
retrieving revision 1.44
diff -u -r1.44 tclParseExpr.c
--- generic/tclParseExpr.c	30 Aug 2006 20:46:20 -0000	1.44
+++ generic/tclParseExpr.c	12 Sep 2006 03:13:12 -0000
@@ -529,8 +529,8 @@
 		    break;
 		}
 
-		/* Special association rules for the ternary operators */
 		if (prec[otherPtr->lexeme] == precedence) {
+		    /* Special association rules for the ternary operators. */
 		    if ((otherPtr->lexeme == QUESTION) 
 			    && (lastOrphanPtr->lexeme != COLON)) {
 			break;
@@ -539,6 +539,10 @@
 			    && (nodePtr->lexeme == QUESTION)) {
 			break;
 		    }
+		    /* Right association rules for exponentiation. */
+		    if (nodePtr->lexeme == EXPON) {
+			break;
+		    }
 		}
 
 		/* Some checks before linking */