[Commits] (twl) Add support for full text operator

commits at osafoundation.org commits at osafoundation.org
Tue Aug 31 12:32:05 PDT 2004


Commit by: twl
Modified files:
internal/queryparser/QueryParser.g 1.3 1.4

Log message:
Add support for full text operator
Allow parameters sa leaf expression values in 'where' clause
Allow queries in 'in' clause


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/queryparser/QueryParser.g.diff?r1=text&tr1=1.3&r2=text&tr2=1.4

Index: internal/queryparser/QueryParser.g
diff -u internal/queryparser/QueryParser.g:1.3 internal/queryparser/QueryParser.g:1.4
--- internal/queryparser/QueryParser.g:1.3	Fri Aug 20 18:17:49 2004
+++ internal/queryparser/QueryParser.g	Tue Aug 31 12:32:03 2004
@@ -1,5 +1,5 @@
-__revision__  = "$Revision: 1.3 $"
-__date__      = "$Date: 2004/08/21 01:17:49 $"
+__revision__  = "$Revision: 1.4 $"
+__date__      = "$Date: 2004/08/31 19:32:03 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Founation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -60,7 +60,9 @@
                    ( name_expr 'where' and_or_expr 
                      {{ return [ 'for', ID, name_expr, and_or_expr ] }} END 
                    | STRING 'where' and_or_expr 
-                     {{ return [ 'for', ID, STRING, and_or_expr ] }} END )
+                     {{ return [ 'for', ID, STRING, and_or_expr ] }} END 
+                   | stmt 'where' and_or_expr )
+                     {{ return [ 'for', stmt, and_or_expr ] }} END
 
     rule and_or_expr: rel_expr
          {{ result = rel_expr }}
@@ -85,7 +87,8 @@
     rule unary_expr: {{ UNOP = None }} [ UNOP ] value_expr
          {{ return if_none_set(UNOP,value_expr,[ UNOP, value_expr ]) }}
 
-    rule value_expr: constant {{ return constant }}
+    rule value_expr: constant {{ return constant }} 
+         | PARAM {{ return PARAM }}
          | ID {{ result = ID }}
            [ "\(" {{ arg_list = [] }} [ arg_list ] {{ result = make_op(result,'fn',arg_list) }} "\)"
              | {{ result = [result] }} ("\\." ID {{ result.append(ID) }} )+
@@ -101,6 +104,11 @@
                     ( ',' and_or_expr {{ result.append(and_or_expr) }} )*
                     {{ return result }}
 
-    rule name_expr: ID {{ return ID }} | PARAM {{ return PARAM }}
+    rule str_list: STRING {{ result = [ STRING ]  }}
+                   ( ',' STRING {{ result.append(STRING) }} )*
+                   {{ return result }}
+
+    rule name_expr: ID {{ return ID }} | PARAM {{ return PARAM }} 
+                    | 'ftcontains' "\(" str_list "\)" {{ return ('ftcontains', str_list) }}
 
 %%



More information about the Commits mailing list