Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13456/sql
Modified Files:
sql_opt.c sqlprint.c
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: sql_opt.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sql_opt.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sql_opt.c 11 Jan 2008 10:47:18 -0000 1.2
+++ sql_opt.c 15 Feb 2008 12:37:41 -0000 1.3
@@ -40,21 +40,8 @@
#include <assert.h>
#include <string.h>
-/*
- * Easily access subtree parts.
- */
-/* starting from p, make a left step */
-#define L(p) (p->child[0])
-/* starting from p, make a right step */
-#define R(p) (p->child[1])
-/* ... and so on */
-#define LL(p) L(L(p))
-#define LR(p) R(L(p))
-#define RL(p) L(R(p))
-#define RR(p) R(R(p))
-#define RLR(p) R(L(R(p)))
-#define RLL(p) L(L(R(p)))
-#define RLRL(p) L(R(L(R(p))))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
/* encoding for the different node types in out XML scheme
!!! Keep this aligned with the SQL code generation !!! */
Index: sqlprint.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sqlprint.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- sqlprint.c 5 Feb 2008 14:29:33 -0000 1.46
+++ sqlprint.c 15 Feb 2008 12:37:41 -0000 1.47
@@ -39,16 +39,8 @@
#include "oops.h"
#include "prettyp.h"
-/*
- * Easily access subtree parts.
- */
-/** starting from p, make a left step */
-#define L(p) ((p)->child[0])
-/** starting from p, make a right step */
-#define R(p) ((p)->child[1])
-/** starting from p, make a right step
- * then a left step */
-#define RL(p) L(R(p))
+/* Easily access subtree-parts */
+#include "child_mnemonic.h"
/* shortcut for pretty printing */
#define pretty_dump(f,i) PFprettyp_extended ((f), 70, (i))
-------------------------------------------------------------------------
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