Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26738/compiler/include
Modified Files:
algebra.h builtins.h mil.h mil_mnemonic.h
Log Message:
* Algebra / MIL implementation of XQuery builtin function fn:translate.
* Erase trailing space chars.
* Introduce new algebra types for the document management functions:
- aat_docmgmt
- aat_str1
- aat_str2
* Algebra implementation of the following document management functions:
- pf:add-doc(str,str)
- pf:add-doc(str,str, str)
- pf:add-doc(str,str, int)
- pf:add-doc(str,str, str, int)
- pf:del-doc(str)
mil code generation and runtime DocmgmTape function are still missing.
Index: mil_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil_mnemonic.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- mil_mnemonic.h 17 Jan 2008 14:10:53 -0000 1.42
+++ mil_mnemonic.h 18 Jan 2008 16:11:37 -0000 1.43
@@ -352,6 +352,9 @@
/** Multiplexed toLower() function `[toLower](a)' */
#define mtoLower(a) PFmil_mtoLower ((a))
+/** Multiplexed translate() function `[translate](a,b,c)' */
+#define mtranslate(a,b,c) PFmil_mtranslate ((a),(b),(c))
+
/** Multiplexed normSpace() function `[normSpace](a)' */
#define mnorm_space(a) PFmil_mnorm_space ((a))
Index: algebra.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/algebra.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- algebra.h 11 Jan 2008 10:47:03 -0000 1.67
+++ algebra.h 18 Jan 2008 16:11:37 -0000 1.68
@@ -99,6 +99,16 @@
#define aat_pre1 0x00002000 /**< a node is represented by a pre value... */
#define aat_pfrag1 0x00001000 /**< ...and a node fragment */
+/**
+ * The following types are for the document management functions. We introduce
+ * one new type, aat_docmgmt, to signify document management queries, and reuse
+ * types from the update functions since doc management and update functions
+ * can not be together in the same query.
+ */
+#define aat_docmgmt 0x00020000 /**< represents the doc management type */
+#define aat_str1 0x00001000 /**< second string param of a docmgmt fun */
+#define aat_str2 0x00002000 /**< third string param of a docmgmt fun */
+
/** Simple atomic types in our algebra */
typedef unsigned int PFalg_simple_type_t;
@@ -299,6 +309,7 @@
, alg_fun_fn_normalize_space /**< fn:normalize-space */
, alg_fun_fn_upper_case /**< fn:upper-case */
, alg_fun_fn_lower_case /**< fn:lower-case */
+ , alg_fun_fn_translate /**< fn:translate */
, alg_fun_fn_contains /**< fn:contains */
, alg_fun_fn_starts_with /**< fn:starts-with */
, alg_fun_fn_ends_with /**< fn:ends-with */
@@ -315,6 +326,11 @@
, alg_fun_fn_qname /**< fn:QName */
, alg_fun_pf_fragment /**< #pf:fragment */
, alg_fun_pf_supernode /**< #pf:supernode */
+ , alg_fun_pf_add_doc /**< pf:add-doc */
+ , alg_fun_pf_add_doc_str /**< pf:add-doc */
+ , alg_fun_pf_add_doc_int /**< pf:add-doc */
+ , alg_fun_pf_add_doc_str_int /**< pf:add-doc */
+ , alg_fun_pf_del_doc /**< pf:del-doc */
, alg_fun_upd_rename /**< upd:rename */
, alg_fun_upd_delete /**< upd:delete */
, alg_fun_upd_insert_into_as_first /**< upd:insertIntoAsFirst */
@@ -443,7 +459,7 @@
/**
* Checks whether a name is unique or not.
*/
-bool PFalg_is_unq_name(PFalg_att_t att);
+bool PFalg_is_unq_name(PFalg_att_t att);
/**
* Create a unique name based on an id @a id and
Index: builtins.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/builtins.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- builtins.h 11 Jan 2008 10:47:04 -0000 1.43
+++ builtins.h 18 Jan 2008 16:11:37 -0000 1.44
@@ -316,6 +316,10 @@
bool ordering,
struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_fn_translate (const PFla_op_t *loop,
+ bool ordering,
+ struct PFla_pair_t *args);
+
/* 7.5. Functions Based on Substring Matching */
struct PFla_pair_t PFbui_fn_contains (const PFla_op_t *loop,
bool ordering,
@@ -640,6 +644,18 @@
struct PFla_pair_t *args);
struct PFla_pair_t PFbui_pf_supernode (const PFla_op_t *loop, bool ordering,
struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_add_doc (const PFla_op_t *loop, bool ordering,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_add_doc_str (const PFla_op_t *loop, bool ordering,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_add_doc_int (const PFla_op_t *loop, bool ordering,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_add_doc_str_int (const PFla_op_t *loop,
+ bool ordering,
+ struct PFla_pair_t *args);
+struct PFla_pair_t PFbui_pf_del_doc (const PFla_op_t *loop, bool ordering,
+ struct PFla_pair_t *args);
+
/* #3. UPDATE FUNCTIONS */
struct PFla_pair_t PFbui_upd_rename (const PFla_op_t *loop, bool ordering,
Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- mil.h 17 Jan 2008 14:10:53 -0000 1.52
+++ mil.h 18 Jan 2008 16:11:37 -0000 1.53
@@ -263,6 +263,7 @@
, m_mlength /**< Multiplexed length() function `[length](a)' */
, m_mtoUpper /**< Multiplexed toUpper() function `[toUpper](a)' */
, m_mtoLower /**< Multiplexed toLower() function `[toLower](a)' */
+ , m_mtranslate /**< Multiplexed translate() func `[translate](a,b,c)' */
, m_mnorm_space /**< Multiplexed normSpace() function */
, m_mpcre_match /**< Multiplexed pcre_match() function */
@@ -834,6 +835,9 @@
/** Multiplexed toLower() function `[toLower](a)' */
PFmil_t * PFmil_mtoLower (const PFmil_t *);
+/** Multiplexed translate() function `[translate](a,b,c)' */
+PFmil_t * PFmil_mtranslate (const PFmil_t *, const PFmil_t *, const PFmil_t *);
+
/** Multiplexed normSpace() function `[normSpace](a)' */
PFmil_t * PFmil_mnorm_space (const PFmil_t *);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins