Skip to content

Commit

Permalink
Fixed operator precedence (#2308)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12578 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 22, 2009
1 parent d7dc77a commit 9538c18
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/core/qgssearchstringparser.yy
Expand Up @@ -84,18 +84,21 @@ void addToTmpNodes(QgsSearchTreeNode* node);
//%error-verbose //%error-verbose


// operator precedence // operator precedence
// all operators have left associativity // all operators have left associativity, i.e. 1+2+3 traslates to (1+2)+3
// (right associtativity is used for assignment) // the order of operators here determines their precendence
%left '^'
%left '*' '/'
%left '+' '-'
%left UMINUS // fictious symbol (for unary minus)
%left COMPARISON


%left AND
%left OR %left OR
%left AND
%left NOT %left NOT


%left COMPARISON

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


%% %%


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

0 comments on commit 9538c18

Please sign in to comment.