[Python-checkins] CVS: python/dist/src/Parser parsetok.c,2.29,2.30
Neil Schemenauer
nascheme@users.sourceforge.net
Fri, 22 Mar 2002 15:53:05 -0800
Update of /cvsroot/python/python/dist/src/Parser
In directory usw-pr-cvs1:/tmp/cvs-serv25676/Parser
Modified Files:
parsetok.c
Log Message:
Disable the parser hacks that enabled the "yield" keyword using a future
statement.
Index: parsetok.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/parsetok.c,v
retrieving revision 2.29
retrieving revision 2.30
diff -C2 -d -r2.29 -r2.30
*** parsetok.c 5 Jan 2002 21:40:08 -0000 2.29
--- parsetok.c 22 Mar 2002 23:53:03 -0000 2.30
***************
*** 84,89 ****
--- 84,91 ----
Return error code. */
+ #if 0 /* future keyword */
static char yield_msg[] =
"%s:%d: Warning: 'yield' will become a reserved keyword in the future\n";
+ #endif
static node *
***************
*** 100,105 ****
--- 102,109 ----
return NULL;
}
+ #if 0 /* future keyword */
if (flags & PyPARSE_YIELD_IS_KEYWORD)
ps->p_generators = 1;
+ #endif
for (;;) {
***************
*** 131,134 ****
--- 135,139 ----
str[len] = '\0';
+ #if 0 /* future keyword */
/* Warn about yield as NAME */
if (type == NAME && !ps->p_generators &&
***************
*** 138,141 ****
--- 143,147 ----
"<string>" : err_ret->filename,
tok->lineno);
+ #endif
if ((err_ret->error =