Author: Romain Guillebert <romain...@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)* [',']
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to