summaryrefslogtreecommitdiff
path: root/Grammar
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-07-15 16:13:05 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-07-15 16:13:05 +0300
commiteefb633becc8ba6ae7d30c04aaa01a5740b92cbb (patch)
tree6a8d976e7b8f8426f64f6b1aa848b24363e2490a /Grammar
parent771fbd629810cb7dc48e10cc7d687b313c622fbf (diff)
parente30c0dfb84728e8c3f9e2f695b64071e53e1811b (diff)
downloadcpython-eefb633becc8ba6ae7d30c04aaa01a5740b92cbb.tar.gz
Issue #27518: Merge from 3.5
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar17
1 files changed, 11 insertions, 6 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 4307523427..9e4979e3a1 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -27,13 +27,18 @@ async_funcdef: ASYNC funcdef
funcdef: 'def' NAME parameters ['->' test] ':' suite
parameters: '(' [typedargslist] ')'
-typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [','
- ['*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef]]
- | '*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef)
+typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [',' [
+ '*' [tfpdef] (',' tfpdef ['=' test])* [',' ['**' tfpdef [',']]]
+ | '**' tfpdef [',']]]
+ | '*' [tfpdef] (',' tfpdef ['=' test])* [',' ['**' tfpdef [',']]]
+ | '**' tfpdef [','])
tfpdef: NAME [':' test]
-varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [','
- ['*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef]]
- | '*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef)
+varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' [
+ '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]]
+ | '**' vfpdef [',']]]
+ | '*' [vfpdef] (',' vfpdef ['=' test])* [',' ['**' vfpdef [',']]]
+ | '**' vfpdef [',']
+)
vfpdef: NAME
stmt: simple_stmt | compound_stmt