[pypy-commit] pypy py3k: (antocuni, romain) port the py3k grammar for the new tuple unpacking (with parenthesis)
rguillebert
noreply at buildbot.pypy.org
Tue Jan 17 17:30:36 CET 2012
Author: Romain Guillebert <romain.py at gmail.com>
Branch: py3k
Changeset: r51409:e110ee00c88b
Date: 2012-01-17 17:30 +0100
http://bitbucket.org/pypy/pypy/changeset/e110ee00c88b/
Log: (antocuni, romain) port the py3k grammar for the new tuple unpacking
(with parenthesis)
diff --git a/pypy/interpreter/pyparser/data/Grammar3.2 b/pypy/interpreter/pyparser/data/Grammar3.2
--- a/pypy/interpreter/pyparser/data/Grammar3.2
+++ b/pypy/interpreter/pyparser/data/Grammar3.2
@@ -104,11 +104,10 @@
factor: ('+'|'-'|'~') factor | power
power: atom trailer* ['**' factor]
atom: ('(' [yield_expr|testlist_comp] ')' |
- '[' [listmaker] ']' |
+ '[' [testlist_comp] ']' |
'{' [dictorsetmaker] '}' |
NAME | NUMBER | STRING+)
-listmaker: test ( list_for | (',' test)* [','] )
-testlist_comp: test ( comp_for | (',' test)* [','] )
+testlist_comp: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
lambdef: 'lambda' [varargslist] ':' test
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
subscriptlist: subscript (',' subscript)* [',']
More information about the pypy-commit
mailing list