Update of /cvsroot/monetdb/pathfinder/compiler/core
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14404/compiler/core

Modified Files:
      Tag: M5XQ
        simplify.brg 
Log Message:
propagated changes of Thursday Nov 05 2009 - Monday Nov 09 2009
from the development trunk to the M5XQ branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/05 - singhan: compiler/core/simplify.brg,1.45
  XQuery full-text search support initial version!
  
  This initial version provides support to
  
  -ftcontains keyword,
  
  e.g., for $f in doc("menu.xml")//food[./name ftcontains "Belgian Waffles"]
  return $f
  The above query will return all the food nodes that has some relevancy over 
"Belgian Waffles"
  
  -initial score variable support
  
  e.g., for $f score $s in doc("menu.xml")//food[./name ftcontains "Belgian 
Waffles"]
  return $s
  The above query will return the relevancy score of all the matched food 
nodes, however since its an initial version, the support to this score variable 
is very limited.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: simplify.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/core/simplify.brg,v
retrieving revision 1.43.4.1
retrieving revision 1.43.4.2
diff -u -d -r1.43.4.1 -r1.43.4.2
--- simplify.brg        7 May 2009 14:45:43 -0000       1.43.4.1
+++ simplify.brg        9 Nov 2009 00:03:41 -0000       1.43.4.2
@@ -221,6 +221,9 @@
   /* Pathfinder extension: XRPC */
 %term xrpc               = 76 /**< XRPC calls: "execute at" */
 
+  /* Associated For variable holders */
+%term vars               = 77 /**< variable pair (position. var + score. var) 
of a for */
+
 %%
 
 Query:              main (FunctionDecls, CoreExpr)              =   1 (10);
@@ -230,7 +233,7 @@
                                                                      
 CoreExpr:           flwr (OptBindExpr, WhereExpr)               =  32 (10);
 CoreExpr:           flwr (OptBindExpr, OrdWhereExpr)            =  33 (10);
-                                                                     
+
 OptBindExpr:        for_ (forbind (forvars (var, nil),               
                                    LiteralValue),                    
                           OptBindExpr)                          =   2 (10);
@@ -378,6 +381,20 @@
 /* Pathfinder extension: XRPC */
 CoreExpr:           xrpc (CoreExpr, FunExpr)                    = 124 (10);
 
+/* full-text score variable extension */
+OptBindExpr:        for_ (forbind (forvars (var, 
+                                            vars (nil, OptVar)),               
+                                   LiteralValue),                    
+                          OptBindExpr)                          = 125 (10);
+OptBindExpr:        for_ (forbind (forvars (var, 
+                                            vars (var, OptVar)),               
+                                   LiteralValue),                    
+                          OptBindExpr)                          = 126 (10);
+OptBindExpr:        for_ (forbind (forvars (var, vars(
+                                            OptVar, OptVar)),            
+                                   CoreExpr),                            
+                          OptBindExpr)                          = 127 (10);
+
 %%
 
 /** Maximum number of pattern leaves */
@@ -719,6 +736,27 @@
                  */
                 p->sem.fun->core = R(p);
                 break;
+           
+            /* OptBindExpr:        for_ (forbind (forvars (var, 
+                                                           vars (nil, var)),
+                                                  LiteralValue),
+                                         OptBindExpr) */
+            case 125:
+                *p = *let (letbind (LLL(p), LR(p)), R(p));
+                relabel (p, kids);
+                rewrite_again = true;
+                break;
+            
+            /* OptBindExpr:        for_ (forbind (forvars (var, vars(
+                                                           var, var)),
+                                                  LiteralValue),
+                                         OptBindExpr) */
+            case 126:
+                *p = *let (letbind (LLL(p), LR(p)),
+                           let (letbind (LLRL(p), num (1)), R(p)));
+                relabel (p, kids);
+                rewrite_again = true;
+                break;
 
             default:
                 break;


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to