0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00
cpython/Parser
Tim Peters fe2127d3cb Ugly. A pile of new xxxFlags() functions, to communicate to the parser
that 'yield' is a keyword.  This doesn't help test_generators at all!  I
don't know why not.  These things do work now (and didn't before this
patch):

1. "from __future__ import generators" now works in a native shell.

2. Similarly "python -i xxx.py" now has generators enabled in the
   shell if xxx.py had them enabled.

3. This program (which was my doctest proxy) works fine:

from __future__ import generators

source = """\
def f():
    yield 1
"""

exec compile(source, "", "single") in globals()
print type(f())
2001-07-16 05:37:24 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
acceler.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
assert.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
bitset.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
firstsets.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
grammar1.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
grammar.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
intrcheck.c RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
listnode.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
metagrammar.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
myreadline.c RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
node.c More limits.h stuff in node.c. 2000-09-26 06:11:54 +00:00
parser.c Preliminary support for "from __future__ import generators" to enable 2001-07-15 21:08:29 +00:00
parser.h Preliminary support for "from __future__ import generators" to enable 2001-07-15 21:08:29 +00:00
parsetok.c Ugly. A pile of new xxxFlags() functions, to communicate to the parser 2001-07-16 05:37:24 +00:00
pgen.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pgen.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pgenmain.c Take output filenames as arguments instead of hard-coding them. 2001-02-16 03:57:53 +00:00
printgrammar.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
tokenizer.c SF but #417587: compiler warnings compiling 2.1. 2001-04-21 02:46:11 +00:00
tokenizer.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00