Skip to content
Permalink
Browse files

Fixed operator precedence (#2308)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12578 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 22, 2009
1 parent d7dc77a commit 9538c18ee522128e8f6276580212bda0868db265
Showing with 11 additions and 8 deletions.
  1. +11 −8 src/core/qgssearchstringparser.yy
@@ -84,18 +84,21 @@ void addToTmpNodes(QgsSearchTreeNode* node);
//%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 AND
%left OR
%left AND
%left NOT

%left COMPARISON

%left '+' '-'
%left '*' '/'
%left '^'
%left UMINUS // fictious symbol (for unary minus)


%%

root: search_cond { /*gParserRootNode = $1;*/ }

0 comments on commit 9538c18

Please sign in to comment.
You can’t perform that action at this time.