Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14645/compiler/semantics
Modified Files:
Tag: PF_ROX
heuristic.c normalize.brg ns.c options.c typecheck.brg
xquery_fo.c
Log Message:
propagated changes of Friday 15 Feb 2008 - Monday Feb 18 2008
from the development trunk to the PF_ROX branch
Index: normalize.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/normalize.brg,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -u -d -r1.23 -r1.23.4.1
--- normalize.brg 11 Jan 2008 10:47:16 -0000 1.23
+++ normalize.brg 18 Feb 2008 16:57:39 -0000 1.23.4.1
@@ -44,6 +44,9 @@
#include "qname.h"
#include "mem.h"
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
/*
* Accessors for the burg matcher
*/
@@ -614,28 +617,6 @@
%%
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) (LEFT_CHILD(p))
-/** starting from p, make a step right */
-#define R(p) (RIGHT_CHILD(p))
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** starting from p, make a step left, then a step right */
-#define LR(p) R(L(p))
-/** starting from p, make a step right, then a step left */
-#define RL(p) L(R(p))
-/** starting from p, make two steps right */
-#define RR(p) R(R(p))
-/* ... and so on ... */
-#define RRL(p) L(R(R(p)))
-#define RRRL(p) L(R(R(R(p))))
-#define RRRRL(p) L(R(R(R(R(p)))))
-#define RRRRRL(p) L(R(R(R(R(R(p))))))
-#define RRRRRR(p) R(R(R(R(R(R(p))))))
-
/** Maximum number of pattern leaves */
#define MAX_KIDS 10
Index: ns.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/ns.c,v
retrieving revision 1.37.4.1
retrieving revision 1.37.4.2
diff -u -d -r1.37.4.1 -r1.37.4.2
--- ns.c 9 Feb 2008 08:40:35 -0000 1.37.4.1
+++ ns.c 18 Feb 2008 16:57:39 -0000 1.37.4.2
@@ -82,13 +82,8 @@
/* PFstrdup() */
#include "mem.h"
-/* short-hands for tree navigation */
-#define L(p) (p)->child[0]
-#define R(p) (p)->child[1]
-#define LL(p) L(L(p))
-#define LR(p) R(L(p))
-#define RL(p) L(R(p))
-#define RR(p) R(R(p))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
/**
* When we encounter a p_req_name node, this describes the QName of
Index: options.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/options.c,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -u -d -r1.2 -r1.2.4.1
--- options.c 11 Jan 2008 10:47:16 -0000 1.2
+++ options.c 18 Feb 2008 16:57:39 -0000 1.2.4.1
@@ -61,8 +61,8 @@
#include "options.h"
-#define L(p) ((p)->child[0])
-#define R(p) ((p)->child[1])
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
/**
* This is the environment we populate.
Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.150
retrieving revision 1.150.2.1
diff -u -d -r1.150 -r1.150.2.1
--- xquery_fo.c 18 Jan 2008 16:11:39 -0000 1.150
+++ xquery_fo.c 18 Feb 2008 16:57:40 -0000 1.150.2.1
@@ -1213,7 +1213,7 @@
.arity = 0, .sig_count = 1, .sigs = { {
.ret_ty = PFty_xs_string () } },
.alg = NULL }
- , /* fn:name (node) as string */
+ , /* fn:name (node?) as string */
{ .ns = PFns_fn, .loc = "name",
.arity = 1, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_opt (PFty_node ()) },
@@ -1226,7 +1226,7 @@
.arity = 0, .sig_count = 1, .sigs = { {
.ret_ty = PFty_xs_string () } },
.alg = NULL }
- , /* fn:local-name (node) as string */
+ , /* fn:local-name (node?) as string */
{ .ns = PFns_fn, .loc = "local-name",
.arity = 1, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_opt (PFty_node ()) },
@@ -1239,7 +1239,7 @@
.arity = 0, .sig_count = 1, .sigs = { {
.ret_ty = PFty_xs_string () } },
.alg = NULL }
- , /* fn:namespace-uri (node) as string */
+ , /* fn:namespace-uri (node?) as string */
{ .ns = PFns_fn, .loc = "namespace-uri",
.arity = 1, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_opt (PFty_node ()) },
Index: typecheck.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/typecheck.brg,v
retrieving revision 1.64.4.1
retrieving revision 1.64.4.2
diff -u -d -r1.64.4.1 -r1.64.4.2
--- typecheck.brg 9 Feb 2008 08:40:35 -0000 1.64.4.1
+++ typecheck.brg 18 Feb 2008 16:57:39 -0000 1.64.4.2
@@ -50,6 +50,9 @@
#include "subtyping.h"
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
/*
* Accessors for the burg matcher
*/
@@ -298,41 +301,6 @@
%%
-/*
- * Easily access subtree-parts.
- */
-/** starting from p, make a step left */
-#define L(p) (LEFT_CHILD(p))
-/** starting from p, make a step right */
-#define R(p) (RIGHT_CHILD(p))
-/** starting from p, make two steps left */
-#define LL(p) L(L(p))
-/** starting from p, make a step left, then a step right */
-#define LR(p) R(L(p))
-/** starting from p, make a step right, then a step left */
-#define RL(p) L(R(p))
-/** starting from p, make two steps right */
-#define RR(p) R(R(p))
-/* ... and so on ... */
-#define RRL(p) L(R(R(p)))
-#define RRRL(p) L(R(R(R(p))))
-#define RRRRL(p) L(R(R(R(R(p)))))
-#define RRRRRL(p) L(R(R(R(R(R(p))))))
-#define RRRRRR(p) R(R(R(R(R(R(p))))))
-#define LLR(p) R(L(L(p)))
-#define RRR(p) R(R(R(p)))
-#define LLL(p) L(L(L(p)))
-#define LLLL(p) L(L(L(L(p))))
-#define LLLLL(p) L(L(L(L(L(p)))))
-#define LLLLR(p) R(L(L(L(L(p)))))
-#define LLLR(p) R(L(L(L(p))))
-#define RLL(p) L(L(R(p)))
-#define RLLR(p) R(L(L(R(p))))
-#define RLLL(p) L(L(L(R(p))))
-#define RLR(p) R(L(R(p)))
-#define RRLL(p) L(L(R(R(p))))
-#define RRLR(p) R(L(R(R(p))))
-
/** Type of a core tree node */
#define TY(p) ((p)->type)
Index: heuristic.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/heuristic.c,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -u -d -r1.10 -r1.10.4.1
--- heuristic.c 11 Jan 2008 10:47:16 -0000 1.10
+++ heuristic.c 18 Feb 2008 16:57:38 -0000 1.10.4.1
@@ -240,14 +240,8 @@
#include "qname.h"
#include "mem.h"
-/* some abssyn tree helper macros and constructor functions
- */
-#define L(p) ((p)->child[0])
-#define R(p) ((p)->child[1])
-#define LL(p) L(L(p))
-#define LR(p) R(L(p))
-#define RL(p) L(R(p))
-#define RR(p) R(R(p))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
#define nil p_leaf (p_nil, p->loc)
#define dot p_leaf (p_dot, p->loc)
-------------------------------------------------------------------------
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