diff --git a/Grammar/Grammar b/Grammar/Grammar index f1b5117e91c..3d957a79940 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -23,7 +23,7 @@ eval_input: testlist NEWLINE* ENDMARKER funcdef: 'def' NAME parameters ':' suite parameters: '(' [varargslist] ')' -varargslist: (fpdef ['=' test] ',')* ('*' NAME [',' '*' '*' NAME] | '*' '*' NAME) | fpdef ['=' test] (',' fpdef ['=' test])* [','] +varargslist: (fpdef ['=' test] ',')* ('*' NAME [',' ('**'|'*' '*') NAME] | ('**'|'*' '*') NAME) | fpdef ['=' test] (',' fpdef ['=' test])* [','] fpdef: NAME | '(' fplist ')' fplist: fpdef (',' fpdef)* [','] @@ -70,11 +70,12 @@ and_expr: shift_expr ('&' shift_expr)* shift_expr: arith_expr (('<<'|'>>') arith_expr)* arith_expr: term (('+'|'-') term)* term: factor (('*'|'/'|'%') factor)* -factor: ('+'|'-'|'~') factor | atom trailer* +factor: ('+'|'-'|'~') factor | power +power: atom trailer* ('**' factor)* atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING+ lambdef: 'lambda' [varargslist] ':' test trailer: '(' [arglist] ')' | '[' subscript ']' | '.' NAME -subscript: test | [test] ':' [test] +subscript: test (',' test)* [','] | [test] ':' [test] exprlist: expr (',' expr)* [','] testlist: test (',' test)* [','] dictmaker: test ':' test (',' test ':' test)* [',']