summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-07-03 18:36:59 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-07-03 18:36:59 (GMT)
commitbc7f1bb6531a5d8ea8b36f402906f9f1efc33811 (patch)
treeea49aa1ffa53098b7a88aa1f17a3b80760547383 /generic/tclCompExpr.c
parent1aeaf606c44565ed85466396527aa5fc16781621 (diff)
downloadtcl-bc7f1bb6531a5d8ea8b36f402906f9f1efc33811.zip
tcl-bc7f1bb6531a5d8ea8b36f402906f9f1efc33811.tar.gz
tcl-bc7f1bb6531a5d8ea8b36f402906f9f1efc33811.tar.bz2
* generic/tclCompExpr.c: Revised #define values so that there
is now more expansion room to define more BINARY operators.
Diffstat (limited to 'generic/tclCompExpr.c')
-rw-r--r--generic/tclCompExpr.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 2741f8d..fb3d1f4 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompExpr.c,v 1.56 2007/07/02 17:13:47 dgp Exp $
+ * RCS: @(#) $Id: tclCompExpr.c,v 1.57 2007/07/03 18:37:00 dgp Exp $
*/
#include "tclInt.h"
@@ -21,9 +21,9 @@
* lexemes found.
*/
-#define LEAF (1<<7)
-#define UNARY (1<<6)
-#define BINARY (1<<5)
+#define LEAF (3<<6)
+#define UNARY (2<<6)
+#define BINARY (1<<6)
#define NODE_TYPE ( LEAF | UNARY | BINARY)
@@ -195,8 +195,12 @@ ParseExpr(
static const unsigned char prec[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 15, 15, 5, 16, 16, 16, 13, 13, 11, 10, 9, 6, 6, 14, 14,
13, 13, 12, 12, 8, 7, 12, 12, 17, 12, 12, 3, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 18, 18, 18, 2, 4, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0,
};
@@ -1508,6 +1512,8 @@ CompileExprTree(
static const int instruction[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, INST_ADD, INST_SUB, 0, /* COMMA */
INST_MULT, INST_DIV, INST_MOD, INST_LT,
INST_GT, INST_BITAND, INST_BITXOR, INST_BITOR,
@@ -1517,6 +1523,8 @@ CompileExprTree(
INST_STR_EQ, INST_STR_NEQ, INST_EXPON, INST_LIST_IN,
INST_LIST_NOT_IN, 0, /* CLOSE_PAREN */ 0, /* END */
0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, INST_UPLUS, INST_UMINUS, 0, /* FUNCTION */
0, /* START */ 0, /* OPEN_PAREN */
INST_LNOT, INST_BITNOT