Commit ee8b2ea3 authored by Vincent Pelletier's avatar Vincent Pelletier

ZSQLCatalog.SearchText: Fix parsing of COLUMN OPERATOR string

...when COLUMN is not a valid column (hence mutated to a STRING_PREFIX
token at lexer level).
Kudos to Tristan for triggering this bug.
parent 7f9a9700
...@@ -275,9 +275,10 @@ class AdvancedSearchTextParser(lexer): ...@@ -275,9 +275,10 @@ class AdvancedSearchTextParser(lexer):
def p_string(self, p): def p_string(self, p):
'''string : WORD '''string : WORD
| STRING | STRING
| STRING_PREFIX string''' | STRING_PREFIX string
if len(p) == 3: | STRING_PREFIX OPERATOR string'''
p[0] = p[1] + p[2] if len(p) > 2:
p[0] = ''.join(p[1:])
else: else:
p[0] = p[1] p[0] = p[1]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment