[Commits] (twl) handle method calls

commits at osafoundation.org commits at osafoundation.org
Fri Aug 20 18:17:51 PDT 2004


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

Log message:
handle method calls


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

Index: internal/queryparser/QueryParser.g
diff -u internal/queryparser/QueryParser.g:1.2 internal/queryparser/QueryParser.g:1.3
--- internal/queryparser/QueryParser.g:1.2	Thu Aug 19 17:11:02 2004
+++ internal/queryparser/QueryParser.g	Fri Aug 20 18:17:49 2004
@@ -1,5 +1,5 @@
-__revision__  = "$Revision: 1.2 $"
-__date__      = "$Date: 2004/08/20 00:11:02 $"
+__revision__  = "$Revision: 1.3 $"
+__date__      = "$Date: 2004/08/21 01:17:49 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Founation"
 __license__   = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -38,22 +38,22 @@
     token ID: '[a-zA-Z]+'
     token END: '$'
 
-    rule stmt: union_stmt {{ return union_stmt }} 
-        | intersection_stmt {{ return intersection_stmt }}
-        | difference_stmt {{ return difference_stmt }}
-        | for_stmt {{ return for_stmt }}
+    rule stmt: union_stmt {{ return union_stmt }} END
+        | intersection_stmt {{ return intersection_stmt }} END
+        | difference_stmt {{ return difference_stmt }} END
+        | for_stmt {{ return for_stmt }} END
 
     rule stmt_list: stmt {{ result = [ stmt ] }}
         (',' stmt {{ result.append(stmt) }} )*
         {{ return result }}
 
-    rule union_stmt: 'union' '\(' stmt_list '\)' 
+    rule union_stmt: 'union' "\(" stmt_list "\)"
         {{ return [ 'union', stmt_list] }}
 
-    rule intersection_stmt: 'intersect' '\(' stmt {{ stmt1 = stmt }} ',' stmt {{ stmt2 = stmt }} '\)'
+    rule intersection_stmt: 'intersect' "\(" stmt {{ stmt1 = stmt }} ',' stmt {{ stmt2 = stmt }} "\)"
         {{ return [ 'intersect', stmt1, stmt2] }}
 
-    rule difference_stmt: 'difference' '\(' stmt {{ stmt1 = stmt }} ',' stmt {{ stmt2=stmt }}  '\)'
+    rule difference_stmt: 'difference' "\(" stmt {{ stmt1 = stmt }} ',' stmt {{ stmt2=stmt }}  "\)"
         {{ return [ 'difference', stmt1, stmt2] }}
 
     rule for_stmt: 'for' ID 'in' 
@@ -87,9 +87,10 @@
 
     rule value_expr: constant {{ return constant }}
          | ID {{ result = ID }}
-           [ "\(" [ arg_list {{ result = make_op(result,'fn',arg_list) }} ] '\)'
-            | {{ result = [result] }} ("\." ID {{ result.append(ID) }} )+
-              {{ result = make_op(result,'path',None) }}
+           [ "\(" {{ arg_list = [] }} [ arg_list ] {{ result = make_op(result,'fn',arg_list) }} "\)"
+             | {{ result = [result] }} ("\\." ID {{ result.append(ID) }} )+
+               {{ result = make_op(result,'path',None) }}
+               [ "\(" [ arg_list {{ result = ['method', result, arg_list] }} ] "\)" ]
            ]
          {{ return result }}
 



More information about the Commits mailing list