--- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > I was wrong. Turns out the bug was in the SQLite grammar > file parse.y. It was assigning the same precedence to the > ones-complement ~ operator and the NOT operator. But > ~ should have higher precedence, it seems. Fixed by > check-in [4548].
Just to confirm, if you mix multiple operators in the same Lemon rule must you take manual precautions that they do not have different precedences? It would be pretty cool if that expansion could happen automatically since the action specified in the grammar is the same: original rule: expr(A) ::= NOT|BITNOT(B) expr(X). { A = sqlite3PExpr(pParse, @B, X, 0, 0); sqlite3ExprSpan(A,&B,&X->span); } your grammar correction: expr(A) ::= NOT(B) expr(X). { A = sqlite3PExpr(pParse, @B, X, 0, 0); sqlite3ExprSpan(A,&B,&X->span); } expr(A) ::= BITNOT(B) expr(X). { A = sqlite3PExpr(pParse, @B, X, 0, 0); sqlite3ExprSpan(A,&B,&X->span); } ...or perhaps have Lemon issue a warning of an operator precedence problem? ____________________________________________________________________________________ Get easy, one-click access to your favorites. Make Yahoo! your homepage. http://www.yahoo.com/r/hs ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------