# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1246365754 -7200
#      Tue Jun 30 14:42:34 2009 +0200
# Node ID c7fcc55208309e8e6d7de0e302b13385424291c6
# Parent  8dc9b6836a630a25d96cb0fbab1382cb30936e6f
fix grammar error: missing IS operator

diff --git a/parser.g b/parser.g
--- a/parser.g
+++ b/parser.g
@@ -88,7 +88,7 @@
     token FALSE:       r'(?i)FALSE'
     token NULL:        r'(?i)NULL'
     token EXISTS:      r'(?i)EXISTS'
-    token CMP_OP:      r'(?i)<=|<|>=|>|~=|=|LIKE|ILIKE'
+    token CMP_OP:      r'(?i)<=|<|>=|>|~=|=|LIKE|ILIKE|IS'
     token ADD_OP:      r'\+|-'
     token MUL_OP:      r'\*|/'
     token FUNCTION:    r'[A-Za-z_]+\s*(?=\()'
diff --git a/parser.py b/parser.py
--- a/parser.py
+++ b/parser.py
@@ -94,7 +94,7 @@
         ('FALSE', re.compile('(?i)FALSE')),
         ('NULL', re.compile('(?i)NULL')),
         ('EXISTS', re.compile('(?i)EXISTS')),
-        ('CMP_OP', re.compile('(?i)<=|<|>=|>|~=|=|LIKE|ILIKE')),
+        ('CMP_OP', re.compile('(?i)<=|<|>=|>|~=|=|LIKE|ILIKE|IS')),
         ('ADD_OP', re.compile('\\+|-')),
         ('MUL_OP', re.compile('\\*|/')),
         ('FUNCTION', re.compile('[A-Za-z_]+\\s*(?=\\()')),
@@ -228,20 +228,17 @@
     def dorderby(self, S, _parent=None):
         _context = self.Context(_parent, self._scanner, 'dorderby', [S])
         orderby = self.orderby(S, _context)
-        if orderby:
-            warn('ORDERBY is now before WHERE clause', stacklevel=14)
+        if orderby: warn('ORDERBY is now before WHERE clause')
 
     def dgroupby(self, S, _parent=None):
         _context = self.Context(_parent, self._scanner, 'dgroupby', [S])
         groupby = self.groupby(S, _context)
-        if groupby:
-            warn('GROUPBY is now before WHERE clause', stacklevel=14)
+        if groupby: warn('GROUPBY is now before WHERE clause')
 
     def dlimit_offset(self, S, _parent=None):
         _context = self.Context(_parent, self._scanner, 'dlimit_offset', [S])
         limit_offset = self.limit_offset(S, _context)
-        if limit_offset:
-            warn('LIMIT/OFFSET are now before WHERE clause', stacklevel=14)
+        if limit_offset: warn('LIMIT/OFFSET are now before WHERE clause')
 
     def groupby(self, S, _parent=None):
         _context = self.Context(_parent, self._scanner, 'groupby', [S])