summaryrefslogtreecommitdiffstats
path: root/Parser/parser.c
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-04-01 05:08:41 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-04-01 05:08:41 (GMT)
commite3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d (patch)
treebfe3d2c8bdb94c077080240cc73717e16dfcd088 /Parser/parser.c
parent4ed72acd68a1a1d90946e189c94b7d656719da45 (diff)
downloadcpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.zip
cpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.tar.gz
cpython-e3944a5e1ecf67aa722fd9ce0c0a4ee72ee5ba2d.tar.bz2
The BDFL has retired! Long live the FLUFL (Friendly Language Uncle For Life)!
Diffstat (limited to 'Parser/parser.c')
-rw-r--r--Parser/parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index ff4ce16..83e5e6d 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -149,6 +149,7 @@ classify(parser_state *ps, int type, char *str)
strcmp(l->lb_str, s) != 0)
continue;
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
+#if 0
/* Leaving this in as an example */
if (!(ps->p_flags & CO_FUTURE_WITH_STATEMENT)) {
if (s[0] == 'w' && strcmp(s, "with") == 0)
@@ -157,6 +158,7 @@ classify(parser_state *ps, int type, char *str)
break; /* not a keyword yet */
}
#endif
+#endif
D(printf("It's a keyword\n"));
return n - i;
}
@@ -178,6 +180,7 @@ classify(parser_state *ps, int type, char *str)
}
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
+#if 0
/* Leaving this in as an example */
static void
future_hack(parser_state *ps)
@@ -218,6 +221,7 @@ future_hack(parser_state *ps)
}
}
}
+#endif
#endif /* future keyword */
int
@@ -278,11 +282,13 @@ PyParser_AddToken(register parser_state *ps, register int type, char *str,
d->d_name,
ps->p_stack.s_top->s_state));
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
+#if 0
if (d->d_name[0] == 'i' &&
strcmp(d->d_name,
"import_stmt") == 0)
future_hack(ps);
#endif
+#endif
s_pop(&ps->p_stack);
if (s_empty(&ps->p_stack)) {
D(printf(" ACCEPT.\n"));
@@ -296,10 +302,12 @@ PyParser_AddToken(register parser_state *ps, register int type, char *str,
if (s->s_accept) {
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
+#if 0
if (d->d_name[0] == 'i' &&
strcmp(d->d_name, "import_stmt") == 0)
future_hack(ps);
#endif
+#endif
/* Pop this dfa and try again */
s_pop(&ps->p_stack);
D(printf(" Pop ...\n"));