[pypy-commit] pypy py3.5-raffael_t: Remove undefined Grammar again, so that only @ is new (fix Assertionerror)

raff...@gmail.com pypy.commits at gmail.com
Tue Apr 26 19:32:49 EDT 2016


Author: raffael.tfirst at gmail.com
Branch: py3.5-raffael_t
Changeset: r83945:a88ed4caa6dd
Date: 2016-03-22 22:48 +0100
http://bitbucket.org/pypy/pypy/changeset/a88ed4caa6dd/

Log:	Remove undefined Grammar again, so that only @ is new (fix
	Assertionerror)

diff --git a/pypy/interpreter/pyparser/data/Grammar3.5 b/pypy/interpreter/pyparser/data/Grammar3.5
--- a/pypy/interpreter/pyparser/data/Grammar3.5
+++ b/pypy/interpreter/pyparser/data/Grammar3.5
@@ -119,14 +119,19 @@
 sliceop: ':' [test]
 exprlist: (expr|star_expr) (',' (expr|star_expr))* [',']
 testlist: test (',' test)* [',']
-dictorsetmaker: ( ((test ':' test | '**' expr)
-                   (comp_for | (',' (test ':' test | '**' expr))* [','])) |
-                  ((test | star_expr)
-                   (comp_for | (',' (test | star_expr))* [','])) )
+dictorsetmaker: ( (test ':' test (comp_for | (',' test ':' test)* [','])) |
+                  (test (comp_for | (',' test)* [','])) )
+#dictorsetmaker: ( ((test ':' test | '**' expr)
+#                   (comp_for | (',' (test ':' test | '**' expr))* [','])) |
+#                  ((test | star_expr)
+#                   (comp_for | (',' (test | star_expr))* [','])) )
 
 classdef: 'class' NAME ['(' [arglist] ')'] ':' suite
 
-arglist: argument (',' argument)*  [',']
+arglist: (argument ',')* (argument [',']
+                         |'*' test (',' argument)* [',' '**' test] 
+                         |'**' test)
+#arglist: argument (',' argument)*  [',']
 
 # The reason that keywords are test nodes instead of NAME is that using NAME
 # results in an ambiguity. ast.c makes sure it's a NAME.
@@ -137,10 +142,11 @@
 # Illegal combinations and orderings are blocked in ast.c:
 # multiple (test comp_for) arguements are blocked; keyword unpackings
 # that precede iterable unpackings are blocked; etc.
-argument: ( test [comp_for] |
-            test '=' test |
-            '**' test |
-            '*' test )
+argument: test [comp_for] | test '=' test  # Really [keyword '='] test
+#argument: ( test [comp_for] |
+#            test '=' test |
+#            '**' test |
+#            '*' test )
 
 comp_iter: comp_for | comp_if
 comp_for: 'for' exprlist 'in' or_test [comp_iter]


More information about the pypy-commit mailing list