summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-30 16:17:54 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-30 16:17:54 (GMT)
commit408027ea4635de5c892b28c4fdf41840eb9089a4 (patch)
tree26a28bfbfa94697565ce4440da84772e2bb96acb /Parser
parenta0dc1c4a613f11e1b6e20fa25658823533ca201b (diff)
downloadcpython-408027ea4635de5c892b28c4fdf41840eb9089a4.zip
cpython-408027ea4635de5c892b28c4fdf41840eb9089a4.tar.gz
cpython-408027ea4635de5c892b28c4fdf41840eb9089a4.tar.bz2
Rename DEBUG macro to Py_DEBUG
Diffstat (limited to 'Parser')
-rw-r--r--Parser/acceler.c4
-rw-r--r--Parser/grammar.c2
-rw-r--r--Parser/parser.c10
-rw-r--r--Parser/pgen.c2
-rw-r--r--Parser/tokenizer.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/Parser/acceler.c b/Parser/acceler.c
index 025f01f..ef1edc3 100644
--- a/Parser/acceler.c
+++ b/Parser/acceler.c
@@ -56,14 +56,14 @@ addaccelerators(g)
{
dfa *d;
int i;
-#ifdef DEBUG
+#ifdef Py_DEBUG
fprintf(stderr, "Adding parser accelerators ...\n");
#endif
d = g->g_dfa;
for (i = g->g_ndfas; --i >= 0; d++)
fixdfa(g, d);
g->g_accel = 1;
-#ifdef DEBUG
+#ifdef Py_DEBUG
fprintf(stderr, "Done.\n");
#endif
}
diff --git a/Parser/grammar.c b/Parser/grammar.c
index 51bf90e..5eebd31 100644
--- a/Parser/grammar.c
+++ b/Parser/grammar.c
@@ -171,7 +171,7 @@ translatelabels(g)
{
int i;
-#ifdef DEBUG
+#ifdef Py_DEBUG
printf("Translating labels ...\n");
#endif
/* Don't translate EMPTY */
diff --git a/Parser/parser.c b/Parser/parser.c
index e6fc180..e42fb11 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -44,7 +44,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "errcode.h"
-#ifdef DEBUG
+#ifdef Py_DEBUG
extern int debugging;
#define D(x) if (!debugging); else x
#else
@@ -85,7 +85,7 @@ s_push(s, d, parent)
return 0;
}
-#ifdef DEBUG
+#ifdef Py_DEBUG
static void s_pop PROTO((stack *));
@@ -98,7 +98,7 @@ s_pop(s)
s->s_top++;
}
-#else /* !DEBUG */
+#else /* !Py_DEBUG */
#define s_pop(s) (s)->s_top++
@@ -309,7 +309,7 @@ addtoken(ps, type, str, lineno)
}
-#ifdef DEBUG
+#ifdef Py_DEBUG
/* DEBUG OUTPUT */
@@ -379,7 +379,7 @@ printtree(ps)
printf("\n");
}
-#endif /* DEBUG */
+#endif /* Py_DEBUG */
/*
diff --git a/Parser/pgen.c b/Parser/pgen.c
index c5a0618..9668630 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -166,7 +166,7 @@ addnfa(gr, name)
return nf;
}
-#ifdef DEBUG
+#ifdef Py_DEBUG
static char REQNFMT[] = "metacompile: less than %d children\n";
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 8a726e0..75c1e4e 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -736,7 +736,7 @@ tok_get(tok, p_start, p_end)
}
-#ifdef DEBUG
+#ifdef Py_DEBUG
void
tok_dump(type, start, end)