Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3432/semantics

Modified Files:
        normalize.brg typecheck.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: typecheck.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/typecheck.brg,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- typecheck.brg       30 Jan 2008 15:29:23 -0000      1.65
+++ typecheck.brg       15 Feb 2008 12:15:58 -0000      1.66
@@ -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: normalize.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/normalize.brg,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- normalize.brg       11 Jan 2008 10:47:16 -0000      1.23
+++ normalize.brg       15 Feb 2008 12:15:57 -0000      1.24
@@ -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
 


-------------------------------------------------------------------------
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

Reply via email to