]> granicus.if.org Git - python/commitdiff
John Aycock correctly pointed out that the grammar for
authorTim Peters <tim.peters@gmail.com>
Thu, 23 May 2002 20:05:40 +0000 (20:05 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 23 May 2002 20:05:40 +0000 (20:05 +0000)
"power" was formally ambiguous.  Here's his fix.

Grammar/Grammar
Misc/ACKS
Python/graminit.c

index 6ac0cbc3cd9ed4c52abcfc7a4dd2c94e88f861f9..27cf1cbbb8a002f32cff20711e5087d9b13b5ea5 100644 (file)
@@ -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
index 5adfd51b594ffd13e9908998c2de6d74807aaf14..2c1ad20ff2a323b8771492eea42537968e152db6 100644 (file)
--- 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
index 11e07054d8c411952aa7ab98ce5dda57e246f7c5..b14fdf95059ba1b789cb6ddb28d4f06c5a6369c8 100644 (file)
@@ -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},