Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13456/semantics
Modified Files:
heuristic.c ns.c options.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: ns.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/ns.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- ns.c 31 Jan 2008 10:10:16 -0000 1.38
+++ ns.c 15 Feb 2008 12:37:41 -0000 1.39
@@ -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.3
diff -u -d -r1.2 -r1.3
--- options.c 11 Jan 2008 10:47:16 -0000 1.2
+++ options.c 15 Feb 2008 12:37:41 -0000 1.3
@@ -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: heuristic.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/heuristic.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- heuristic.c 11 Jan 2008 10:47:16 -0000 1.10
+++ heuristic.c 15 Feb 2008 12:37:41 -0000 1.11
@@ -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