diff --git a/Grammar/Grammar b/Grammar/Grammar index 2a361ece4e2..d7aaffd60e1 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -24,8 +24,7 @@ decorators: decorator+ decorated: decorators (classdef | funcdef) funcdef: 'def' NAME parameters ['->' test] ':' suite parameters: '(' [typedargslist] ')' -typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* - [',' '/' (',' tfpdef ['=' test])*] [',' +typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [',' ['*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef]] | '*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef) tfpdef: NAME [':' test] diff --git a/Python/graminit.c b/Python/graminit.c index 271342454d3..e04999bbff2 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -160,8 +160,8 @@ static state states_7[4] = { }; static arc arcs_8_0[3] = { {28, 1}, - {32, 2}, - {33, 3}, + {31, 2}, + {32, 3}, }; static arc arcs_8_1[3] = { {29, 4}, @@ -179,11 +179,10 @@ static arc arcs_8_3[1] = { static arc arcs_8_4[1] = { {24, 9}, }; -static arc arcs_8_5[5] = { +static arc arcs_8_5[4] = { {28, 10}, {31, 11}, - {32, 12}, - {33, 3}, + {32, 3}, {0, 5}, }; static arc arcs_8_6[2] = { @@ -191,8 +190,8 @@ static arc arcs_8_6[2] = { {0, 6}, }; static arc arcs_8_7[2] = { - {28, 13}, - {33, 3}, + {28, 12}, + {32, 3}, }; static arc arcs_8_8[1] = { {0, 8}, @@ -206,76 +205,54 @@ static arc arcs_8_10[3] = { {29, 4}, {0, 10}, }; -static arc arcs_8_11[2] = { +static arc arcs_8_11[3] = { + {28, 13}, {30, 14}, {0, 11}, }; static arc arcs_8_12[3] = { - {28, 15}, - {30, 16}, + {30, 7}, + {29, 15}, {0, 12}, }; -static arc arcs_8_13[3] = { - {30, 7}, - {29, 17}, +static arc arcs_8_13[2] = { + {30, 14}, {0, 13}, }; -static arc arcs_8_14[4] = { - {28, 18}, - {32, 12}, - {33, 3}, - {0, 14}, +static arc arcs_8_14[2] = { + {28, 16}, + {32, 3}, }; -static arc arcs_8_15[2] = { - {30, 16}, - {0, 15}, -}; -static arc arcs_8_16[2] = { - {28, 19}, - {33, 3}, -}; -static arc arcs_8_17[1] = { +static arc arcs_8_15[1] = { {24, 6}, }; -static arc arcs_8_18[3] = { +static arc arcs_8_16[3] = { {30, 14}, - {29, 20}, - {0, 18}, + {29, 17}, + {0, 16}, }; -static arc arcs_8_19[3] = { - {30, 16}, - {29, 21}, - {0, 19}, +static arc arcs_8_17[1] = { + {24, 13}, }; -static arc arcs_8_20[1] = { - {24, 11}, -}; -static arc arcs_8_21[1] = { - {24, 15}, -}; -static state states_8[22] = { +static state states_8[18] = { {3, arcs_8_0}, {3, arcs_8_1}, {3, arcs_8_2}, {1, arcs_8_3}, {1, arcs_8_4}, - {5, arcs_8_5}, + {4, arcs_8_5}, {2, arcs_8_6}, {2, arcs_8_7}, {1, arcs_8_8}, {2, arcs_8_9}, {3, arcs_8_10}, - {2, arcs_8_11}, + {3, arcs_8_11}, {3, arcs_8_12}, - {3, arcs_8_13}, - {4, arcs_8_14}, - {2, arcs_8_15}, - {2, arcs_8_16}, + {2, arcs_8_13}, + {2, arcs_8_14}, + {1, arcs_8_15}, + {3, arcs_8_16}, {1, arcs_8_17}, - {3, arcs_8_18}, - {3, arcs_8_19}, - {1, arcs_8_20}, - {1, arcs_8_21}, }; static arc arcs_9_0[1] = { {21, 1}, @@ -297,9 +274,9 @@ static state states_9[4] = { {1, arcs_9_3}, }; static arc arcs_10_0[3] = { - {35, 1}, - {32, 2}, - {33, 3}, + {34, 1}, + {31, 2}, + {32, 3}, }; static arc arcs_10_1[3] = { {29, 4}, @@ -307,20 +284,20 @@ static arc arcs_10_1[3] = { {0, 1}, }; static arc arcs_10_2[3] = { - {35, 6}, + {34, 6}, {30, 7}, {0, 2}, }; static arc arcs_10_3[1] = { - {35, 8}, + {34, 8}, }; static arc arcs_10_4[1] = { {24, 9}, }; static arc arcs_10_5[4] = { - {35, 10}, - {32, 11}, - {33, 3}, + {34, 10}, + {31, 11}, + {32, 3}, {0, 5}, }; static arc arcs_10_6[2] = { @@ -328,8 +305,8 @@ static arc arcs_10_6[2] = { {0, 6}, }; static arc arcs_10_7[2] = { - {35, 12}, - {33, 3}, + {34, 12}, + {32, 3}, }; static arc arcs_10_8[1] = { {0, 8}, @@ -344,7 +321,7 @@ static arc arcs_10_10[3] = { {0, 10}, }; static arc arcs_10_11[3] = { - {35, 13}, + {34, 13}, {30, 14}, {0, 11}, }; @@ -358,8 +335,8 @@ static arc arcs_10_13[2] = { {0, 13}, }; static arc arcs_10_14[2] = { - {35, 16}, - {33, 3}, + {34, 16}, + {32, 3}, }; static arc arcs_10_15[1] = { {24, 6}, @@ -414,14 +391,14 @@ static state states_12[2] = { {1, arcs_12_1}, }; static arc arcs_13_0[1] = { - {36, 1}, + {35, 1}, }; static arc arcs_13_1[2] = { - {37, 2}, + {36, 2}, {2, 3}, }; static arc arcs_13_2[2] = { - {36, 1}, + {35, 1}, {2, 3}, }; static arc arcs_13_3[1] = { @@ -434,6 +411,7 @@ static state states_13[4] = { {1, arcs_13_3}, }; static arc arcs_14_0[8] = { + {37, 1}, {38, 1}, {39, 1}, {40, 1}, @@ -441,7 +419,6 @@ static arc arcs_14_0[8] = { {42, 1}, {43, 1}, {44, 1}, - {45, 1}, }; static arc arcs_14_1[1] = { {0, 1}, @@ -451,20 +428,20 @@ static state states_14[2] = { {1, arcs_14_1}, }; static arc arcs_15_0[1] = { - {46, 1}, + {45, 1}, }; static arc arcs_15_1[3] = { - {47, 2}, + {46, 2}, {29, 3}, {0, 1}, }; static arc arcs_15_2[2] = { - {48, 4}, + {47, 4}, {9, 4}, }; static arc arcs_15_3[2] = { - {48, 5}, - {46, 5}, + {47, 5}, + {45, 5}, }; static arc arcs_15_4[1] = { {0, 4}, @@ -483,7 +460,7 @@ static state states_15[6] = { }; static arc arcs_16_0[2] = { {24, 1}, - {49, 1}, + {48, 1}, }; static arc arcs_16_1[2] = { {30, 2}, @@ -491,7 +468,7 @@ static arc arcs_16_1[2] = { }; static arc arcs_16_2[3] = { {24, 1}, - {49, 1}, + {48, 1}, {0, 2}, }; static state states_16[3] = { @@ -500,6 +477,7 @@ static state states_16[3] = { {3, arcs_16_2}, }; static arc arcs_17_0[12] = { + {49, 1}, {50, 1}, {51, 1}, {52, 1}, @@ -511,7 +489,6 @@ static arc arcs_17_0[12] = { {58, 1}, {59, 1}, {60, 1}, - {61, 1}, }; static arc arcs_17_1[1] = { {0, 1}, @@ -521,10 +498,10 @@ static state states_17[2] = { {1, arcs_17_1}, }; static arc arcs_18_0[1] = { - {62, 1}, + {61, 1}, }; static arc arcs_18_1[1] = { - {63, 2}, + {62, 2}, }; static arc arcs_18_2[1] = { {0, 2}, @@ -535,7 +512,7 @@ static state states_18[3] = { {1, arcs_18_2}, }; static arc arcs_19_0[1] = { - {64, 1}, + {63, 1}, }; static arc arcs_19_1[1] = { {0, 1}, @@ -545,11 +522,11 @@ static state states_19[2] = { {1, arcs_19_1}, }; static arc arcs_20_0[5] = { + {64, 1}, {65, 1}, {66, 1}, {67, 1}, {68, 1}, - {69, 1}, }; static arc arcs_20_1[1] = { {0, 1}, @@ -559,7 +536,7 @@ static state states_20[2] = { {1, arcs_20_1}, }; static arc arcs_21_0[1] = { - {70, 1}, + {69, 1}, }; static arc arcs_21_1[1] = { {0, 1}, @@ -569,7 +546,7 @@ static state states_21[2] = { {1, arcs_21_1}, }; static arc arcs_22_0[1] = { - {71, 1}, + {70, 1}, }; static arc arcs_22_1[1] = { {0, 1}, @@ -579,7 +556,7 @@ static state states_22[2] = { {1, arcs_22_1}, }; static arc arcs_23_0[1] = { - {72, 1}, + {71, 1}, }; static arc arcs_23_1[2] = { {9, 2}, @@ -594,7 +571,7 @@ static state states_23[3] = { {1, arcs_23_2}, }; static arc arcs_24_0[1] = { - {48, 1}, + {47, 1}, }; static arc arcs_24_1[1] = { {0, 1}, @@ -604,14 +581,14 @@ static state states_24[2] = { {1, arcs_24_1}, }; static arc arcs_25_0[1] = { - {73, 1}, + {72, 1}, }; static arc arcs_25_1[2] = { {24, 2}, {0, 1}, }; static arc arcs_25_2[2] = { - {74, 3}, + {73, 3}, {0, 2}, }; static arc arcs_25_3[1] = { @@ -628,8 +605,8 @@ static state states_25[5] = { {1, arcs_25_4}, }; static arc arcs_26_0[2] = { + {74, 1}, {75, 1}, - {76, 1}, }; static arc arcs_26_1[1] = { {0, 1}, @@ -639,10 +616,10 @@ static state states_26[2] = { {1, arcs_26_1}, }; static arc arcs_27_0[1] = { - {77, 1}, + {76, 1}, }; static arc arcs_27_1[1] = { - {78, 2}, + {77, 2}, }; static arc arcs_27_2[1] = { {0, 2}, @@ -653,32 +630,32 @@ static state states_27[3] = { {1, arcs_27_2}, }; static arc arcs_28_0[1] = { - {74, 1}, + {73, 1}, }; static arc arcs_28_1[3] = { + {78, 2}, {79, 2}, - {80, 2}, {12, 3}, }; static arc arcs_28_2[4] = { + {78, 2}, {79, 2}, - {80, 2}, {12, 3}, - {77, 4}, + {76, 4}, }; static arc arcs_28_3[1] = { - {77, 4}, + {76, 4}, }; static arc arcs_28_4[3] = { - {32, 5}, + {31, 5}, {13, 6}, - {81, 5}, + {80, 5}, }; static arc arcs_28_5[1] = { {0, 5}, }; static arc arcs_28_6[1] = { - {81, 7}, + {80, 7}, }; static arc arcs_28_7[1] = { {15, 5}, @@ -697,7 +674,7 @@ static arc arcs_29_0[1] = { {21, 1}, }; static arc arcs_29_1[2] = { - {83, 2}, + {82, 2}, {0, 1}, }; static arc arcs_29_2[1] = { @@ -716,7 +693,7 @@ static arc arcs_30_0[1] = { {12, 1}, }; static arc arcs_30_1[2] = { - {83, 2}, + {82, 2}, {0, 1}, }; static arc arcs_30_2[1] = { @@ -732,14 +709,14 @@ static state states_30[4] = { {1, arcs_30_3}, }; static arc arcs_31_0[1] = { - {82, 1}, + {81, 1}, }; static arc arcs_31_1[2] = { {30, 2}, {0, 1}, }; static arc arcs_31_2[2] = { - {82, 1}, + {81, 1}, {0, 2}, }; static state states_31[3] = { @@ -748,7 +725,7 @@ static state states_31[3] = { {2, arcs_31_2}, }; static arc arcs_32_0[1] = { - {84, 1}, + {83, 1}, }; static arc arcs_32_1[2] = { {30, 0}, @@ -762,7 +739,7 @@ static arc arcs_33_0[1] = { {21, 1}, }; static arc arcs_33_1[2] = { - {79, 0}, + {78, 0}, {0, 1}, }; static state states_33[2] = { @@ -770,7 +747,7 @@ static state states_33[2] = { {2, arcs_33_1}, }; static arc arcs_34_0[1] = { - {85, 1}, + {84, 1}, }; static arc arcs_34_1[1] = { {21, 2}, @@ -785,7 +762,7 @@ static state states_34[3] = { {2, arcs_34_2}, }; static arc arcs_35_0[1] = { - {86, 1}, + {85, 1}, }; static arc arcs_35_1[1] = { {21, 2}, @@ -800,7 +777,7 @@ static state states_35[3] = { {2, arcs_35_2}, }; static arc arcs_36_0[1] = { - {87, 1}, + {86, 1}, }; static arc arcs_36_1[1] = { {24, 2}, @@ -823,11 +800,11 @@ static state states_36[5] = { {1, arcs_36_4}, }; static arc arcs_37_0[8] = { + {87, 1}, {88, 1}, {89, 1}, {90, 1}, {91, 1}, - {92, 1}, {19, 1}, {18, 1}, {17, 1}, @@ -840,7 +817,7 @@ static state states_37[2] = { {1, arcs_37_1}, }; static arc arcs_38_0[1] = { - {93, 1}, + {92, 1}, }; static arc arcs_38_1[1] = { {24, 2}, @@ -852,8 +829,8 @@ static arc arcs_38_3[1] = { {26, 4}, }; static arc arcs_38_4[3] = { - {94, 1}, - {95, 5}, + {93, 1}, + {94, 5}, {0, 4}, }; static arc arcs_38_5[1] = { @@ -876,7 +853,7 @@ static state states_38[8] = { {1, arcs_38_7}, }; static arc arcs_39_0[1] = { - {96, 1}, + {95, 1}, }; static arc arcs_39_1[1] = { {24, 2}, @@ -888,7 +865,7 @@ static arc arcs_39_3[1] = { {26, 4}, }; static arc arcs_39_4[2] = { - {95, 5}, + {94, 5}, {0, 4}, }; static arc arcs_39_5[1] = { @@ -911,13 +888,13 @@ static state states_39[8] = { {1, arcs_39_7}, }; static arc arcs_40_0[1] = { - {97, 1}, + {96, 1}, }; static arc arcs_40_1[1] = { - {63, 2}, + {62, 2}, }; static arc arcs_40_2[1] = { - {98, 3}, + {97, 3}, }; static arc arcs_40_3[1] = { {9, 4}, @@ -929,7 +906,7 @@ static arc arcs_40_5[1] = { {26, 6}, }; static arc arcs_40_6[2] = { - {95, 7}, + {94, 7}, {0, 6}, }; static arc arcs_40_7[1] = { @@ -954,7 +931,7 @@ static state states_40[10] = { {1, arcs_40_9}, }; static arc arcs_41_0[1] = { - {99, 1}, + {98, 1}, }; static arc arcs_41_1[1] = { {25, 2}, @@ -963,8 +940,8 @@ static arc arcs_41_2[1] = { {26, 3}, }; static arc arcs_41_3[2] = { - {100, 4}, - {101, 5}, + {99, 4}, + {100, 5}, }; static arc arcs_41_4[1] = { {25, 6}, @@ -979,9 +956,9 @@ static arc arcs_41_7[1] = { {26, 9}, }; static arc arcs_41_8[4] = { - {100, 4}, - {95, 10}, - {101, 5}, + {99, 4}, + {94, 10}, + {100, 5}, {0, 8}, }; static arc arcs_41_9[1] = { @@ -994,7 +971,7 @@ static arc arcs_41_11[1] = { {26, 12}, }; static arc arcs_41_12[2] = { - {101, 5}, + {100, 5}, {0, 12}, }; static state states_41[13] = { @@ -1013,10 +990,10 @@ static state states_41[13] = { {2, arcs_41_12}, }; static arc arcs_42_0[1] = { - {102, 1}, + {101, 1}, }; static arc arcs_42_1[1] = { - {103, 2}, + {102, 2}, }; static arc arcs_42_2[2] = { {30, 1}, @@ -1039,11 +1016,11 @@ static arc arcs_43_0[1] = { {24, 1}, }; static arc arcs_43_1[2] = { - {83, 2}, + {82, 2}, {0, 1}, }; static arc arcs_43_2[1] = { - {104, 3}, + {103, 3}, }; static arc arcs_43_3[1] = { {0, 3}, @@ -1055,14 +1032,14 @@ static state states_43[4] = { {1, arcs_43_3}, }; static arc arcs_44_0[1] = { - {105, 1}, + {104, 1}, }; static arc arcs_44_1[2] = { {24, 2}, {0, 1}, }; static arc arcs_44_2[2] = { - {83, 3}, + {82, 3}, {0, 2}, }; static arc arcs_44_3[1] = { @@ -1086,14 +1063,14 @@ static arc arcs_45_1[1] = { {0, 1}, }; static arc arcs_45_2[1] = { - {106, 3}, + {105, 3}, }; static arc arcs_45_3[1] = { {6, 4}, }; static arc arcs_45_4[2] = { {6, 4}, - {107, 1}, + {106, 1}, }; static state states_45[5] = { {2, arcs_45_0}, @@ -1103,21 +1080,21 @@ static state states_45[5] = { {2, arcs_45_4}, }; static arc arcs_46_0[2] = { - {108, 1}, - {109, 2}, + {107, 1}, + {108, 2}, }; static arc arcs_46_1[2] = { - {93, 3}, + {92, 3}, {0, 1}, }; static arc arcs_46_2[1] = { {0, 2}, }; static arc arcs_46_3[1] = { - {108, 4}, + {107, 4}, }; static arc arcs_46_4[1] = { - {95, 5}, + {94, 5}, }; static arc arcs_46_5[1] = { {24, 2}, @@ -1131,8 +1108,8 @@ static state states_46[6] = { {1, arcs_46_5}, }; static arc arcs_47_0[2] = { - {108, 1}, - {111, 1}, + {107, 1}, + {110, 1}, }; static arc arcs_47_1[1] = { {0, 1}, @@ -1142,10 +1119,10 @@ static state states_47[2] = { {1, arcs_47_1}, }; static arc arcs_48_0[1] = { - {112, 1}, + {111, 1}, }; static arc arcs_48_1[2] = { - {34, 2}, + {33, 2}, {25, 3}, }; static arc arcs_48_2[1] = { @@ -1165,17 +1142,17 @@ static state states_48[5] = { {1, arcs_48_4}, }; static arc arcs_49_0[1] = { - {112, 1}, + {111, 1}, }; static arc arcs_49_1[2] = { - {34, 2}, + {33, 2}, {25, 3}, }; static arc arcs_49_2[1] = { {25, 3}, }; static arc arcs_49_3[1] = { - {110, 4}, + {109, 4}, }; static arc arcs_49_4[1] = { {0, 4}, @@ -1188,10 +1165,10 @@ static state states_49[5] = { {1, arcs_49_4}, }; static arc arcs_50_0[1] = { - {113, 1}, + {112, 1}, }; static arc arcs_50_1[2] = { - {114, 0}, + {113, 0}, {0, 1}, }; static state states_50[2] = { @@ -1199,10 +1176,10 @@ static state states_50[2] = { {2, arcs_50_1}, }; static arc arcs_51_0[1] = { - {115, 1}, + {114, 1}, }; static arc arcs_51_1[2] = { - {116, 0}, + {115, 0}, {0, 1}, }; static state states_51[2] = { @@ -1210,11 +1187,11 @@ static state states_51[2] = { {2, arcs_51_1}, }; static arc arcs_52_0[2] = { - {117, 1}, - {118, 2}, + {116, 1}, + {117, 2}, }; static arc arcs_52_1[1] = { - {115, 2}, + {114, 2}, }; static arc arcs_52_2[1] = { {0, 2}, @@ -1225,10 +1202,10 @@ static state states_52[3] = { {1, arcs_52_2}, }; static arc arcs_53_0[1] = { - {104, 1}, + {103, 1}, }; static arc arcs_53_1[2] = { - {119, 0}, + {118, 0}, {0, 1}, }; static state states_53[2] = { @@ -1236,25 +1213,25 @@ static state states_53[2] = { {2, arcs_53_1}, }; static arc arcs_54_0[10] = { + {119, 1}, {120, 1}, {121, 1}, {122, 1}, {123, 1}, {124, 1}, {125, 1}, - {126, 1}, - {98, 1}, - {117, 2}, - {127, 3}, + {97, 1}, + {116, 2}, + {126, 3}, }; static arc arcs_54_1[1] = { {0, 1}, }; static arc arcs_54_2[1] = { - {98, 1}, + {97, 1}, }; static arc arcs_54_3[2] = { - {117, 1}, + {116, 1}, {0, 3}, }; static state states_54[4] = { @@ -1264,10 +1241,10 @@ static state states_54[4] = { {2, arcs_54_3}, }; static arc arcs_55_0[1] = { - {32, 1}, + {31, 1}, }; static arc arcs_55_1[1] = { - {104, 2}, + {103, 2}, }; static arc arcs_55_2[1] = { {0, 2}, @@ -1278,10 +1255,10 @@ static state states_55[3] = { {1, arcs_55_2}, }; static arc arcs_56_0[1] = { - {128, 1}, + {127, 1}, }; static arc arcs_56_1[2] = { - {129, 0}, + {128, 0}, {0, 1}, }; static state states_56[2] = { @@ -1289,10 +1266,10 @@ static state states_56[2] = { {2, arcs_56_1}, }; static arc arcs_57_0[1] = { - {130, 1}, + {129, 1}, }; static arc arcs_57_1[2] = { - {131, 0}, + {130, 0}, {0, 1}, }; static state states_57[2] = { @@ -1300,10 +1277,10 @@ static state states_57[2] = { {2, arcs_57_1}, }; static arc arcs_58_0[1] = { - {132, 1}, + {131, 1}, }; static arc arcs_58_1[2] = { - {133, 0}, + {132, 0}, {0, 1}, }; static state states_58[2] = { @@ -1311,11 +1288,11 @@ static state states_58[2] = { {2, arcs_58_1}, }; static arc arcs_59_0[1] = { - {134, 1}, + {133, 1}, }; static arc arcs_59_1[3] = { + {134, 0}, {135, 0}, - {136, 0}, {0, 1}, }; static state states_59[2] = { @@ -1323,11 +1300,11 @@ static state states_59[2] = { {3, arcs_59_1}, }; static arc arcs_60_0[1] = { - {137, 1}, + {136, 1}, }; static arc arcs_60_1[3] = { + {137, 0}, {138, 0}, - {139, 0}, {0, 1}, }; static state states_60[2] = { @@ -1335,11 +1312,11 @@ static state states_60[2] = { {3, arcs_60_1}, }; static arc arcs_61_0[1] = { - {140, 1}, + {139, 1}, }; static arc arcs_61_1[5] = { - {32, 0}, {31, 0}, + {140, 0}, {141, 0}, {142, 0}, {0, 1}, @@ -1349,13 +1326,13 @@ static state states_61[2] = { {5, arcs_61_1}, }; static arc arcs_62_0[4] = { + {137, 1}, {138, 1}, - {139, 1}, {143, 1}, {144, 2}, }; static arc arcs_62_1[1] = { - {140, 2}, + {139, 2}, }; static arc arcs_62_2[1] = { {0, 2}, @@ -1370,11 +1347,11 @@ static arc arcs_63_0[1] = { }; static arc arcs_63_1[3] = { {146, 1}, - {33, 2}, + {32, 2}, {0, 1}, }; static arc arcs_63_2[1] = { - {140, 3}, + {139, 3}, }; static arc arcs_63_3[1] = { {0, 3}, @@ -1392,13 +1369,13 @@ static arc arcs_64_0[10] = { {21, 4}, {153, 4}, {154, 5}, - {80, 4}, + {79, 4}, {155, 4}, {156, 4}, {157, 4}, }; static arc arcs_64_1[3] = { - {48, 6}, + {47, 6}, {147, 6}, {15, 4}, }; @@ -1439,7 +1416,7 @@ static state states_64[9] = { }; static arc arcs_65_0[2] = { {24, 1}, - {49, 1}, + {48, 1}, }; static arc arcs_65_1[3] = { {158, 2}, @@ -1451,7 +1428,7 @@ static arc arcs_65_2[1] = { }; static arc arcs_65_3[3] = { {24, 4}, - {49, 4}, + {48, 4}, {0, 3}, }; static arc arcs_65_4[2] = { @@ -1468,7 +1445,7 @@ static state states_65[5] = { static arc arcs_66_0[3] = { {13, 1}, {148, 2}, - {79, 3}, + {78, 3}, }; static arc arcs_66_1[2] = { {14, 4}, @@ -1557,16 +1534,16 @@ static state states_69[3] = { {1, arcs_69_2}, }; static arc arcs_70_0[2] = { - {104, 1}, - {49, 1}, + {103, 1}, + {48, 1}, }; static arc arcs_70_1[2] = { {30, 2}, {0, 1}, }; static arc arcs_70_2[3] = { - {104, 1}, - {49, 1}, + {103, 1}, + {48, 1}, {0, 2}, }; static state states_70[3] = { @@ -1683,8 +1660,8 @@ static state states_73[8] = { }; static arc arcs_74_0[3] = { {163, 1}, - {32, 2}, - {33, 3}, + {31, 2}, + {32, 3}, }; static arc arcs_74_1[2] = { {30, 4}, @@ -1698,8 +1675,8 @@ static arc arcs_74_3[1] = { }; static arc arcs_74_4[4] = { {163, 1}, - {32, 2}, - {33, 3}, + {31, 2}, + {32, 3}, {0, 4}, }; static arc arcs_74_5[2] = { @@ -1711,7 +1688,7 @@ static arc arcs_74_6[1] = { }; static arc arcs_74_7[2] = { {163, 5}, - {33, 3}, + {32, 3}, }; static state states_74[8] = { {3, arcs_74_0}, @@ -1755,16 +1732,16 @@ static state states_76[2] = { {1, arcs_76_1}, }; static arc arcs_77_0[1] = { - {97, 1}, + {96, 1}, }; static arc arcs_77_1[1] = { - {63, 2}, + {62, 2}, }; static arc arcs_77_2[1] = { - {98, 3}, + {97, 3}, }; static arc arcs_77_3[1] = { - {108, 4}, + {107, 4}, }; static arc arcs_77_4[2] = { {164, 5}, @@ -1782,10 +1759,10 @@ static state states_77[6] = { {1, arcs_77_5}, }; static arc arcs_78_0[1] = { - {93, 1}, + {92, 1}, }; static arc arcs_78_1[1] = { - {110, 2}, + {109, 2}, }; static arc arcs_78_2[2] = { {164, 3}, @@ -1826,7 +1803,7 @@ static state states_80[3] = { {1, arcs_80_2}, }; static arc arcs_81_0[2] = { - {74, 1}, + {73, 1}, {9, 2}, }; static arc arcs_81_1[1] = { @@ -1842,11 +1819,11 @@ static state states_81[3] = { }; static dfa dfas[82] = { {256, "single_input", 0, 3, states_0, - "\004\050\060\000\001\000\000\100\301\047\341\040\113\000\041\000\000\214\120\076\204\000"}, + "\004\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"}, {257, "file_input", 0, 2, states_1, - "\204\050\060\000\001\000\000\100\301\047\341\040\113\000\041\000\000\214\120\076\204\000"}, + "\204\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"}, {258, "eval_input", 0, 3, states_2, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {259, "decorator", 0, 7, states_3, "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {260, "decorators", 0, 2, states_4, @@ -1857,48 +1834,48 @@ static dfa dfas[82] = { "\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {263, "parameters", 0, 4, states_7, "\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {264, "typedargslist", 0, 22, states_8, - "\000\000\040\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {264, "typedargslist", 0, 18, states_8, + "\000\000\040\200\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {265, "tfpdef", 0, 4, states_9, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {266, "varargslist", 0, 18, states_10, - "\000\000\040\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\040\200\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {267, "vfpdef", 0, 2, states_11, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {268, "stmt", 0, 2, states_12, - "\000\050\060\000\001\000\000\100\301\047\341\040\113\000\041\000\000\214\120\076\204\000"}, + "\000\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"}, {269, "simple_stmt", 0, 4, states_13, - "\000\040\040\000\001\000\000\100\301\047\341\000\000\000\041\000\000\214\120\076\200\000"}, + "\000\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"}, {270, "small_stmt", 0, 2, states_14, - "\000\040\040\000\001\000\000\100\301\047\341\000\000\000\041\000\000\214\120\076\200\000"}, + "\000\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"}, {271, "expr_stmt", 0, 6, states_15, - "\000\040\040\000\001\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {272, "testlist_star_expr", 0, 3, states_16, - "\000\040\040\000\001\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {273, "augassign", 0, 2, states_17, - "\000\000\000\000\000\000\374\077\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\376\037\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {274, "del_stmt", 0, 3, states_18, - "\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {275, "pass_stmt", 0, 2, states_19, - "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {276, "flow_stmt", 0, 2, states_20, - "\000\000\000\000\000\000\000\000\300\003\000\000\000\000\000\000\000\000\000\000\200\000"}, + "\000\000\000\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000\000\000\200\000"}, {277, "break_stmt", 0, 2, states_21, - "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {278, "continue_stmt", 0, 2, states_22, - "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {279, "return_stmt", 0, 3, states_23, - "\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {280, "yield_stmt", 0, 2, states_24, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"}, {281, "raise_stmt", 0, 5, states_25, - "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"}, {282, "import_stmt", 0, 2, states_26, - "\000\000\000\000\000\000\000\000\000\044\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\000"}, {283, "import_name", 0, 3, states_27, - "\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000"}, {284, "import_from", 0, 8, states_28, - "\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"}, {285, "import_as_name", 0, 4, states_29, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {286, "dotted_as_name", 0, 4, states_30, @@ -1910,101 +1887,101 @@ static dfa dfas[82] = { {289, "dotted_name", 0, 2, states_33, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {290, "global_stmt", 0, 3, states_34, - "\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000"}, {291, "nonlocal_stmt", 0, 3, states_35, - "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"}, {292, "assert_stmt", 0, 5, states_36, - "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"}, {293, "compound_stmt", 0, 2, states_37, - "\000\010\020\000\000\000\000\000\000\000\000\040\113\000\000\000\000\000\000\000\004\000"}, + "\000\010\020\000\000\000\000\000\000\000\000\220\045\000\000\000\000\000\000\000\004\000"}, {294, "if_stmt", 0, 8, states_38, - "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, {295, "while_stmt", 0, 8, states_39, - "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"}, {296, "for_stmt", 0, 10, states_40, - "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, {297, "try_stmt", 0, 13, states_41, - "\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"}, {298, "with_stmt", 0, 5, states_42, - "\000\000\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"}, {299, "with_item", 0, 4, states_43, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {300, "except_clause", 0, 5, states_44, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"}, {301, "suite", 0, 5, states_45, - "\004\040\040\000\001\000\000\100\301\047\341\000\000\000\041\000\000\214\120\076\200\000"}, + "\004\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"}, {302, "test", 0, 6, states_46, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {303, "test_nocond", 0, 2, states_47, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {304, "lambdef", 0, 5, states_48, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"}, {305, "lambdef_nocond", 0, 5, states_49, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"}, {306, "or_test", 0, 2, states_50, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\040\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"}, {307, "and_test", 0, 2, states_51, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\040\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"}, {308, "not_test", 0, 3, states_52, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\040\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"}, {309, "comparison", 0, 2, states_53, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {310, "comp_op", 0, 4, states_54, - "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\040\377\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\220\177\000\000\000\000\000\000"}, {311, "star_expr", 0, 3, states_55, - "\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {312, "expr", 0, 2, states_56, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {313, "xor_expr", 0, 2, states_57, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {314, "and_expr", 0, 2, states_58, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {315, "shift_expr", 0, 2, states_59, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {316, "arith_expr", 0, 2, states_60, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {317, "term", 0, 2, states_61, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {318, "factor", 0, 3, states_62, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {319, "power", 0, 4, states_63, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\120\076\000\000"}, {320, "atom", 0, 9, states_64, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\120\076\000\000"}, {321, "testlist_comp", 0, 5, states_65, - "\000\040\040\000\001\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {322, "trailer", 0, 7, states_66, - "\000\040\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\020\000\000\000"}, + "\000\040\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\020\000\000\000"}, {323, "subscriptlist", 0, 3, states_67, - "\000\040\040\002\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\002\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {324, "subscript", 0, 5, states_68, - "\000\040\040\002\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\002\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {325, "sliceop", 0, 3, states_69, "\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {326, "exprlist", 0, 3, states_70, - "\000\040\040\000\001\000\000\000\000\000\001\000\000\000\000\000\000\214\120\076\000\000"}, + "\000\040\040\200\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"}, {327, "testlist", 0, 3, states_71, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {328, "dictorsetmaker", 0, 11, states_72, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {329, "classdef", 0, 8, states_73, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000"}, {330, "arglist", 0, 8, states_74, - "\000\040\040\000\003\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\200\001\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {331, "argument", 0, 4, states_75, - "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"}, {332, "comp_iter", 0, 2, states_76, - "\000\000\000\000\000\000\000\000\000\000\000\040\002\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\000"}, {333, "comp_for", 0, 6, states_77, - "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, {334, "comp_if", 0, 4, states_78, - "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, {335, "encoding_decl", 0, 2, states_79, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {336, "yield_expr", 0, 3, states_80, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"}, {337, "yield_arg", 0, 3, states_81, - "\000\040\040\000\000\000\000\000\000\004\001\000\000\000\041\000\000\214\120\076\000\000"}, + "\000\040\040\000\000\000\000\000\000\202\000\000\000\200\020\000\000\206\120\076\000\000"}, }; static label labels[169] = { {0, "EMPTY"}, @@ -2038,7 +2015,6 @@ static label labels[169] = { {265, 0}, {22, 0}, {12, 0}, - {17, 0}, {16, 0}, {35, 0}, {266, 0}, @@ -2148,6 +2124,7 @@ static label labels[169] = { {14, 0}, {15, 0}, {318, 0}, + {17, 0}, {24, 0}, {47, 0}, {31, 0}, diff --git a/Python/marshal.c b/Python/marshal.c index d237d17fad6..c3e75b145bd 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -803,7 +803,7 @@ r_object(RFILE *p) /* NULL is a valid return value, it does not necessarily means that an exception is set. */ PyObject *v, *v2; - Py_ssize_t idx = 0; + Py_ssize_t idx; long i, n; int type = r_byte(p); int flag;