diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-05-23 20:05:40 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-05-23 20:05:40 (GMT) |
commit | 84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121 (patch) | |
tree | 7ef75912f15d6e4ce41509eb130e6cd52cf4dd7a /Grammar | |
parent | c32f0336e062dd36f82fb236c66ac25e2bac217b (diff) | |
download | cpython-84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121.zip cpython-84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121.tar.gz cpython-84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121.tar.bz2 |
John Aycock correctly pointed out that the grammar for
"power" was formally ambiguous. Here's his fix.
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 6ac0cbc..27cf1cb 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 |