Commit 8944f9c7 authored by Vincent Pelletier's avatar Vincent Pelletier

Regroup 'WORD' and 'STRING' tokens under a new non-terminal 'string' rule.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26800 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9babb1a
......@@ -216,14 +216,17 @@ class AdvancedSearchTextParser(lexer):
p[0] = p[1].push('and', p[3])
def p_value(self, p):
'''value : OPERATOR STRING
| OPERATOR WORD
| STRING
| WORD'''
'''value : OPERATOR string
| string'''
if len(p) == 2:
p[0] = ValueNode(p[1])
else:
p[0] = ValueNode(p[2], comparison_operator=p[1])
def p_string(self, p):
'''string : WORD
| STRING'''
p[0] = p[1]
update_docstrings(AdvancedSearchTextParser)
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