From 84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 23 May 2002 20:05:40 +0000 Subject: John Aycock correctly pointed out that the grammar for "power" was formally ambiguous. Here's his fix. --- Grammar/Grammar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Grammar') diff --git a/Grammar/Grammar b/Grammar/Grammar index 6ac0cbc3cd9..27cf1cbbb8a 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -79,7 +79,7 @@ shift_expr: arith_expr (('<<'|'>>') arith_expr)* arith_expr: term (('+'|'-') term)* term: factor (('*'|'/'|'%'|'//') factor)* factor: ('+'|'-'|'~') factor | power -power: atom trailer* ('**' factor)* +power: atom trailer* ['**' factor] atom: '(' [testlist] ')' | '[' [listmaker] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING+ listmaker: test ( list_for | (',' test)* [','] ) lambdef: 'lambda' [varargslist] ':' test -- cgit v1.2.3-65-gdbad