Update of /cvsroot/monetdb/pathfinder/compiler/algebra
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3432/algebra
Modified Files:
core2alg.brg
Log Message:
-- Extracted defines for child node accesses (e.g. L(p), LRLR(p), ...)
and placed them in a new file child_mnemonic.h.
Index: core2alg.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/core2alg.brg,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- core2alg.brg 31 Jan 2008 16:26:24 -0000 1.61
+++ core2alg.brg 15 Feb 2008 12:15:54 -0000 1.62
@@ -51,6 +51,9 @@
#include "algebra.h"
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
+
/*
* Accessors for the burg matcher
*/
@@ -272,41 +275,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))))
-
/** Algebra equivalent of a Core tree node */
#define A(p) ((p)->alg)
@@ -1480,8 +1448,8 @@
atom = lit_bln (true);
}
else if (PFty_equality (t, PFty_untypedAtomic ())) {
- atom = lit_str ("");
algty = atom.type = aat_uA;
+ atom = lit_str ("");
}
else
PFoops (OOPS_FATAL,
-------------------------------------------------------------------------
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