summaryrefslogtreecommitdiff
path: root/Grammar
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-30 01:15:48 +0200
committerVictor Stinner <victor.stinner@gmail.com>2016-03-30 01:15:48 +0200
commit04408f4cf83e1861f0ac13d7c0286812c3c15f20 (patch)
tree2de6eca4bcb6b4907613a048e089fc478741b477 /Grammar
parent6ca07d629af856520ed052fa36acb2c8c14f2741 (diff)
parent7fdf492d322df451e91a322bb014070feeb7a74e (diff)
downloadcpython-04408f4cf83e1861f0ac13d7c0286812c3c15f20.tar.gz
Merge 3.5 (test_unittest)
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 99fcea026a..14bdecd0e2 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