From 9a570b438604abb7a5dcd881e3825dfe84e99d77 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Tue, 14 Jul 2015 10:39:38 +0200 Subject: [PATCH] Use regexp constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The regexp used was not even the same oneā€¦ --- relational/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relational/parser.py b/relational/parser.py index 2173222..2b361be 100644 --- a/relational/parser.py +++ b/relational/parser.py @@ -374,7 +374,7 @@ def tokenize(expression): items.append(expression[0]) expression = expression[1:].strip() # 1 char from the expression state = 4 - elif re.match(r'[_0-9A-Za-z]', expression[0]) == None: # At this point we only have relation names, so we raise errors for anything else + elif re.match(rtypes.RELATION_NAME_REGEXP, expression[0]) == None: # At this point we only have relation names, so we raise errors for anything else raise TokenizerException( "Unexpected '%c' in '%s'" % (expression[0], expression)) else: # Relation (hopefully)