diff options
author | Thomas Wouters <thomas@python.org> | 2006-02-27 00:24:13 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-02-27 00:24:13 (GMT) |
commit | dca3b9c797f6dd4b08d590fa2aa1031e22ab598e (patch) | |
tree | d2b7aa53793110100965906b1266296d08bd4ec1 /Include/graminit.h | |
parent | d3a5f53a27be821cfdff869fd8ad93a060497e8c (diff) | |
download | cpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.zip cpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.tar.gz cpython-dca3b9c797f6dd4b08d590fa2aa1031e22ab598e.tar.bz2 |
PEP 308 implementation, including minor refdocs and some testcases. It
breaks the parser module, because it adds the if/else construct as well as
two new grammar rules for backward compatibility. If no one else fixes
parsermodule, I guess I'll go ahead and fix it later this week.
The TeX code was checked with texcheck.py, but not rendered. There is
actually a slight incompatibility:
>>> (x for x in lambda:0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: iteration over non-sequence
changes into
>>> (x for x in lambda: 0)
File "<stdin>", line 1
(x for x in lambda: 0)
^
SyntaxError: invalid syntax
Since there's no way the former version can be useful, it's probably a
bugfix ;)
Diffstat (limited to 'Include/graminit.h')
-rw-r--r-- | Include/graminit.h | 77 |
1 files changed, 40 insertions, 37 deletions
diff --git a/Include/graminit.h b/Include/graminit.h index 2c855ea..e804734 100644 --- a/Include/graminit.h +++ b/Include/graminit.h @@ -40,40 +40,43 @@ #define try_stmt 295 #define except_clause 296 #define suite 297 -#define test 298 -#define and_test 299 -#define not_test 300 -#define comparison 301 -#define comp_op 302 -#define expr 303 -#define xor_expr 304 -#define and_expr 305 -#define shift_expr 306 -#define arith_expr 307 -#define term 308 -#define factor 309 -#define power 310 -#define atom 311 -#define listmaker 312 -#define testlist_gexp 313 -#define lambdef 314 -#define trailer 315 -#define subscriptlist 316 -#define subscript 317 -#define sliceop 318 -#define exprlist 319 -#define testlist 320 -#define testlist_safe 321 -#define dictmaker 322 -#define classdef 323 -#define arglist 324 -#define argument 325 -#define list_iter 326 -#define list_for 327 -#define list_if 328 -#define gen_iter 329 -#define gen_for 330 -#define gen_if 331 -#define testlist1 332 -#define encoding_decl 333 -#define yield_expr 334 +#define testlist_safe 298 +#define old_test 299 +#define old_lambdef 300 +#define test 301 +#define or_test 302 +#define and_test 303 +#define not_test 304 +#define comparison 305 +#define comp_op 306 +#define expr 307 +#define xor_expr 308 +#define and_expr 309 +#define shift_expr 310 +#define arith_expr 311 +#define term 312 +#define factor 313 +#define power 314 +#define atom 315 +#define listmaker 316 +#define testlist_gexp 317 +#define lambdef 318 +#define trailer 319 +#define subscriptlist 320 +#define subscript 321 +#define sliceop 322 +#define exprlist 323 +#define testlist 324 +#define dictmaker 325 +#define classdef 326 +#define arglist 327 +#define argument 328 +#define list_iter 329 +#define list_for 330 +#define list_if 331 +#define gen_iter 332 +#define gen_for 333 +#define gen_if 334 +#define testlist1 335 +#define encoding_decl 336 +#define yield_expr 337 |