[Erp5-report] r26800 - /erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 5 14:07:37 CEST 2009


Author: vincent
Date: Tue May  5 14:07:36 2009
New Revision: 26800

URL: http://svn.erp5.org?rev=26800&view=rev
Log:
Regroup 'WORD' and 'STRING' tokens under a new non-terminal 'string' rule.

Modified:
    erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py

Modified: erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py?rev=26800&r1=26799&r2=26800&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/SearchText/AdvancedSearchTextParser.py [utf8] Tue May  5 14:07:36 2009
@@ -216,14 +216,17 @@
       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)
 




More information about the Erp5-report mailing list