[Gridflow-cvs] [svn] commit: r6335 - /trunk/src/expr.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Sep 24 11:27:15 EDT 2010


Author: matju
Date: Fri Sep 24 11:27:14 2010
New Revision: 6335

Log:
fix == and !=

Modified:
    trunk/src/expr.cxx

Modified: trunk/src/expr.cxx
==============================================================================
--- trunk/src/expr.cxx (original)
+++ trunk/src/expr.cxx Fri Sep 24 11:27:14 2010
@@ -40,7 +40,7 @@
 		while (*s && isspace(*s)) s++;
 		if (!*s) tok.a_type=A_NULL;
 		else if (isdigit(*s) || *s=='.') {char *e; tok = strtof(s,&e); s=(const char *)e;}
-		else if (strchr("+-*/%&|^<>=",*s)) {
+		else if (strchr("+-*/%&|^<>=!",*s)) {
 			char t[3]={0,0,0};
 			t[0]=*s++;
 			if (*s==s[-1] || *s=='=') t[1]=*s++;
@@ -73,6 +73,7 @@
 				case A_OP: {
 					int priority1 = prevop.a_type!=A_NULL ? priorities[prevop.a_symbol] : 42;
 					int priority2 =                       priorities[tok.a_symbol];
+					if (!priority2) RAISE("unknown operator '%s'",tok.a_symbol->s_name);
 					if (priority1 <= priority2) {
 						code.push_back(prevop);
 						parse(s,level,tok);



More information about the Gridflow-cvs mailing list