Use regexp constant
The regexp used was not even the same one…
This commit is contained in:
parent
33d9545d66
commit
9a570b4386
@ -374,7 +374,7 @@ def tokenize(expression):
|
|||||||
items.append(expression[0])
|
items.append(expression[0])
|
||||||
expression = expression[1:].strip() # 1 char from the expression
|
expression = expression[1:].strip() # 1 char from the expression
|
||||||
state = 4
|
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(
|
raise TokenizerException(
|
||||||
"Unexpected '%c' in '%s'" % (expression[0], expression))
|
"Unexpected '%c' in '%s'" % (expression[0], expression))
|
||||||
else: # Relation (hopefully)
|
else: # Relation (hopefully)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user