Use regexp constant

The regexp used was not even the same one…
master
Salvo 'LtWorf' Tomaselli 2015-07-14 10:39:38 +07:00
parent 33d9545d66
commit 9a570b4386
1 changed files with 1 additions and 1 deletions

@ -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)