Author: Raffael Tfirst <raffael.tfi...@gmail.com> Branch: py3.5 Changeset: r85045:b7332e2d0f64 Date: 2016-06-08 23:25 +0200 http://bitbucket.org/pypy/pypy/changeset/b7332e2d0f64/
Log: Use full Unpack Grammar, one more call argument fix diff --git a/pypy/interpreter/astcompiler/astbuilder.py b/pypy/interpreter/astcompiler/astbuilder.py --- a/pypy/interpreter/astcompiler/astbuilder.py +++ b/pypy/interpreter/astcompiler/astbuilder.py @@ -1085,8 +1085,7 @@ args = None if not keywords: keywords = None - return ast.Call(callable_expr, args, keywords, variable_arg, - keywords_arg, callable_expr.lineno, + return ast.Call(callable_expr, args, keywords, callable_expr.lineno, callable_expr.col_offset) def parse_number(self, raw): 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 @@ -128,10 +128,10 @@ classdef: 'class' NAME ['(' [arglist] ')'] ':' suite -arglist: (argument ',')* (argument [','] - |'*' test (',' argument)* [',' '**' test] - |'**' test) -#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. @@ -142,11 +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 # Really [keyword '='] test -#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] _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit