summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-05-23 20:05:40 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-05-23 20:05:40 (GMT)
commit84ee323cb9fd8a43cb5b6d8fa948fc3d16ded121 (patch)
tree7ef75912f15d6e4ce41509eb130e6cd52cf4dd7a
parentc32f0336e062dd36f82fb236c66ac25e2bac217b (diff)
downloadcpython-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.
-rw-r--r--Grammar/Grammar2
-rw-r--r--Misc/ACKS1
-rw-r--r--Python/graminit.c5
3 files changed, 4 insertions, 4 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
diff --git a/Misc/ACKS b/Misc/ACKS
index 5adfd51..2c1ad20 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -20,6 +20,7 @@ Oliver Andrich
Ross Andrus
Jason Asbahr
David Ascher
+John Aycock
Donovan Baarda
Alfonso Baciero
Stig Bakken
diff --git a/Python/graminit.c b/Python/graminit.c
index 11e0705..b14fdf9 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -1005,15 +1005,14 @@ static arc arcs_48_1[3] = {
static arc arcs_48_2[1] = {
{119, 3},
};
-static arc arcs_48_3[2] = {
- {24, 2},
+static arc arcs_48_3[1] = {
{0, 3},
};
static state states_48[4] = {
{1, arcs_48_0},
{3, arcs_48_1},
{1, arcs_48_2},
- {2, arcs_48_3},
+ {1, arcs_48_3},
};
static arc arcs_49_0[7] = {
{16, 1},