[QGIS Commit] r12578 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Dec 22 09:13:50 EST 2009


Author: wonder
Date: 2009-12-22 09:13:49 -0500 (Tue, 22 Dec 2009)
New Revision: 12578

Modified:
   trunk/qgis/src/core/qgssearchstringparser.yy
Log:
Fixed operator precedence (#2308)


Modified: trunk/qgis/src/core/qgssearchstringparser.yy
===================================================================
--- trunk/qgis/src/core/qgssearchstringparser.yy	2009-12-22 13:44:59 UTC (rev 12577)
+++ trunk/qgis/src/core/qgssearchstringparser.yy	2009-12-22 14:13:49 UTC (rev 12578)
@@ -84,18 +84,21 @@
 //%error-verbose
 
 // operator precedence
-// all operators have left associativity
-// (right associtativity is used for assignment)
-%left '^'
-%left '*' '/'
-%left '+' '-'
-%left UMINUS  // fictious symbol (for unary minus)
-%left COMPARISON
+// all operators have left associativity, i.e. 1+2+3 traslates to (1+2)+3
+// the order of operators here determines their precendence
 
+%left OR
 %left AND
-%left OR
 %left NOT
 
+%left COMPARISON
+
+%left '+' '-'
+%left '*' '/'
+%left '^'
+%left UMINUS  // fictious symbol (for unary minus)
+
+
 %%
 
 root: search_cond { /*gParserRootNode = $1;*/ }



More information about the QGIS-commit mailing list