Index: Python/graminit.c =================================================================== --- Python/graminit.c (revision 54035) +++ Python/graminit.c (working copy) @@ -86,374 +86,382 @@ {1, arcs_4_0}, {2, arcs_4_1}, }; -static arc arcs_5_0[2] = { +static arc arcs_5_0[1] = { {16, 1}, - {18, 2}, }; -static arc arcs_5_1[1] = { +static arc arcs_5_1[2] = { {18, 2}, + {19, 2}, }; static arc arcs_5_2[1] = { - {19, 3}, + {0, 2}, }; -static arc arcs_5_3[1] = { - {20, 4}, +static state states_5[3] = { + {1, arcs_5_0}, + {2, arcs_5_1}, + {1, arcs_5_2}, }; -static arc arcs_5_4[2] = { - {21, 5}, - {23, 6}, +static arc arcs_6_0[1] = { + {20, 1}, }; -static arc arcs_5_5[1] = { - {22, 7}, +static arc arcs_6_1[1] = { + {21, 2}, }; -static arc arcs_5_6[1] = { - {24, 8}, +static arc arcs_6_2[1] = { + {22, 3}, }; -static arc arcs_5_7[1] = { - {23, 6}, +static arc arcs_6_3[2] = { + {23, 4}, + {25, 5}, }; -static arc arcs_5_8[1] = { - {0, 8}, +static arc arcs_6_4[1] = { + {24, 6}, }; -static state states_5[9] = { - {2, arcs_5_0}, - {1, arcs_5_1}, - {1, arcs_5_2}, - {1, arcs_5_3}, - {2, arcs_5_4}, - {1, arcs_5_5}, - {1, arcs_5_6}, - {1, arcs_5_7}, - {1, arcs_5_8}, +static arc arcs_6_5[1] = { + {26, 7}, }; -static arc arcs_6_0[1] = { +static arc arcs_6_6[1] = { + {25, 5}, +}; +static arc arcs_6_7[1] = { + {0, 7}, +}; +static state states_6[8] = { + {1, arcs_6_0}, + {1, arcs_6_1}, + {1, arcs_6_2}, + {2, arcs_6_3}, + {1, arcs_6_4}, + {1, arcs_6_5}, + {1, arcs_6_6}, + {1, arcs_6_7}, +}; +static arc arcs_7_0[1] = { {13, 1}, }; -static arc arcs_6_1[2] = { - {25, 2}, +static arc arcs_7_1[2] = { + {27, 2}, {15, 3}, }; -static arc arcs_6_2[1] = { +static arc arcs_7_2[1] = { {15, 3}, }; -static arc arcs_6_3[1] = { +static arc arcs_7_3[1] = { {0, 3}, }; -static state states_6[4] = { - {1, arcs_6_0}, - {2, arcs_6_1}, - {1, arcs_6_2}, - {1, arcs_6_3}, +static state states_7[4] = { + {1, arcs_7_0}, + {2, arcs_7_1}, + {1, arcs_7_2}, + {1, arcs_7_3}, }; -static arc arcs_7_0[3] = { - {26, 1}, - {29, 2}, - {31, 3}, +static arc arcs_8_0[3] = { + {28, 1}, + {31, 2}, + {33, 3}, }; -static arc arcs_7_1[3] = { - {27, 4}, - {28, 5}, +static arc arcs_8_1[3] = { + {29, 4}, + {30, 5}, {0, 1}, }; -static arc arcs_7_2[3] = { - {30, 6}, - {28, 7}, +static arc arcs_8_2[3] = { + {32, 6}, + {30, 7}, {0, 2}, }; -static arc arcs_7_3[1] = { - {30, 8}, +static arc arcs_8_3[1] = { + {32, 8}, }; -static arc arcs_7_4[1] = { - {22, 9}, +static arc arcs_8_4[1] = { + {24, 9}, }; -static arc arcs_7_5[4] = { - {26, 1}, - {29, 2}, - {31, 3}, +static arc arcs_8_5[4] = { + {28, 1}, + {31, 2}, + {33, 3}, {0, 5}, }; -static arc arcs_7_6[2] = { - {28, 7}, +static arc arcs_8_6[2] = { + {30, 7}, {0, 6}, }; -static arc arcs_7_7[2] = { - {30, 10}, - {31, 3}, +static arc arcs_8_7[2] = { + {32, 10}, + {33, 3}, }; -static arc arcs_7_8[1] = { +static arc arcs_8_8[1] = { {0, 8}, }; -static arc arcs_7_9[2] = { - {28, 5}, +static arc arcs_8_9[2] = { + {30, 5}, {0, 9}, }; -static arc arcs_7_10[3] = { - {28, 7}, - {27, 11}, +static arc arcs_8_10[3] = { + {30, 7}, + {29, 11}, {0, 10}, }; -static arc arcs_7_11[1] = { - {22, 6}, +static arc arcs_8_11[1] = { + {24, 6}, }; -static state states_7[12] = { - {3, arcs_7_0}, - {3, arcs_7_1}, - {3, arcs_7_2}, - {1, arcs_7_3}, - {1, arcs_7_4}, - {4, arcs_7_5}, - {2, arcs_7_6}, - {2, arcs_7_7}, - {1, arcs_7_8}, - {2, arcs_7_9}, - {3, arcs_7_10}, - {1, arcs_7_11}, +static state states_8[12] = { + {3, arcs_8_0}, + {3, arcs_8_1}, + {3, arcs_8_2}, + {1, arcs_8_3}, + {1, arcs_8_4}, + {4, arcs_8_5}, + {2, arcs_8_6}, + {2, arcs_8_7}, + {1, arcs_8_8}, + {2, arcs_8_9}, + {3, arcs_8_10}, + {1, arcs_8_11}, }; -static arc arcs_8_0[1] = { - {19, 1}, +static arc arcs_9_0[1] = { + {21, 1}, }; -static arc arcs_8_1[2] = { - {23, 2}, +static arc arcs_9_1[2] = { + {25, 2}, {0, 1}, }; -static arc arcs_8_2[1] = { - {22, 3}, +static arc arcs_9_2[1] = { + {24, 3}, }; -static arc arcs_8_3[1] = { +static arc arcs_9_3[1] = { {0, 3}, }; -static state states_8[4] = { - {1, arcs_8_0}, - {2, arcs_8_1}, - {1, arcs_8_2}, - {1, arcs_8_3}, +static state states_9[4] = { + {1, arcs_9_0}, + {2, arcs_9_1}, + {1, arcs_9_2}, + {1, arcs_9_3}, }; -static arc arcs_9_0[2] = { - {30, 1}, +static arc arcs_10_0[2] = { + {32, 1}, {13, 2}, }; -static arc arcs_9_1[1] = { +static arc arcs_10_1[1] = { {0, 1}, }; -static arc arcs_9_2[1] = { - {32, 3}, +static arc arcs_10_2[1] = { + {34, 3}, }; -static arc arcs_9_3[1] = { +static arc arcs_10_3[1] = { {15, 1}, }; -static state states_9[4] = { - {2, arcs_9_0}, - {1, arcs_9_1}, - {1, arcs_9_2}, - {1, arcs_9_3}, +static state states_10[4] = { + {2, arcs_10_0}, + {1, arcs_10_1}, + {1, arcs_10_2}, + {1, arcs_10_3}, }; -static arc arcs_10_0[1] = { - {26, 1}, +static arc arcs_11_0[1] = { + {28, 1}, }; -static arc arcs_10_1[2] = { - {28, 2}, +static arc arcs_11_1[2] = { + {30, 2}, {0, 1}, }; -static arc arcs_10_2[2] = { - {26, 1}, +static arc arcs_11_2[2] = { + {28, 1}, {0, 2}, }; -static state states_10[3] = { - {1, arcs_10_0}, - {2, arcs_10_1}, - {2, arcs_10_2}, +static state states_11[3] = { + {1, arcs_11_0}, + {2, arcs_11_1}, + {2, arcs_11_2}, }; -static arc arcs_11_0[3] = { - {34, 1}, - {29, 2}, - {31, 3}, +static arc arcs_12_0[3] = { + {36, 1}, + {31, 2}, + {33, 3}, }; -static arc arcs_11_1[3] = { - {27, 4}, - {28, 5}, +static arc arcs_12_1[3] = { + {29, 4}, + {30, 5}, {0, 1}, }; -static arc arcs_11_2[3] = { - {35, 6}, - {28, 7}, +static arc arcs_12_2[3] = { + {37, 6}, + {30, 7}, {0, 2}, }; -static arc arcs_11_3[1] = { - {35, 8}, +static arc arcs_12_3[1] = { + {37, 8}, }; -static arc arcs_11_4[1] = { - {22, 9}, +static arc arcs_12_4[1] = { + {24, 9}, }; -static arc arcs_11_5[4] = { - {34, 1}, - {29, 2}, - {31, 3}, +static arc arcs_12_5[4] = { + {36, 1}, + {31, 2}, + {33, 3}, {0, 5}, }; -static arc arcs_11_6[2] = { - {28, 7}, +static arc arcs_12_6[2] = { + {30, 7}, {0, 6}, }; -static arc arcs_11_7[2] = { - {35, 10}, - {31, 3}, +static arc arcs_12_7[2] = { + {37, 10}, + {33, 3}, }; -static arc arcs_11_8[1] = { +static arc arcs_12_8[1] = { {0, 8}, }; -static arc arcs_11_9[2] = { - {28, 5}, +static arc arcs_12_9[2] = { + {30, 5}, {0, 9}, }; -static arc arcs_11_10[3] = { - {28, 7}, - {27, 11}, +static arc arcs_12_10[3] = { + {30, 7}, + {29, 11}, {0, 10}, }; -static arc arcs_11_11[1] = { - {22, 6}, +static arc arcs_12_11[1] = { + {24, 6}, }; -static state states_11[12] = { - {3, arcs_11_0}, - {3, arcs_11_1}, - {3, arcs_11_2}, - {1, arcs_11_3}, - {1, arcs_11_4}, - {4, arcs_11_5}, - {2, arcs_11_6}, - {2, arcs_11_7}, - {1, arcs_11_8}, - {2, arcs_11_9}, - {3, arcs_11_10}, - {1, arcs_11_11}, +static state states_12[12] = { + {3, arcs_12_0}, + {3, arcs_12_1}, + {3, arcs_12_2}, + {1, arcs_12_3}, + {1, arcs_12_4}, + {4, arcs_12_5}, + {2, arcs_12_6}, + {2, arcs_12_7}, + {1, arcs_12_8}, + {2, arcs_12_9}, + {3, arcs_12_10}, + {1, arcs_12_11}, }; -static arc arcs_12_0[1] = { - {19, 1}, +static arc arcs_13_0[1] = { + {21, 1}, }; -static arc arcs_12_1[1] = { +static arc arcs_13_1[1] = { {0, 1}, }; -static state states_12[2] = { - {1, arcs_12_0}, - {1, arcs_12_1}, +static state states_13[2] = { + {1, arcs_13_0}, + {1, arcs_13_1}, }; -static arc arcs_13_0[2] = { - {35, 1}, +static arc arcs_14_0[2] = { + {37, 1}, {13, 2}, }; -static arc arcs_13_1[1] = { +static arc arcs_14_1[1] = { {0, 1}, }; -static arc arcs_13_2[1] = { - {36, 3}, +static arc arcs_14_2[1] = { + {38, 3}, }; -static arc arcs_13_3[1] = { +static arc arcs_14_3[1] = { {15, 1}, }; -static state states_13[4] = { - {2, arcs_13_0}, - {1, arcs_13_1}, - {1, arcs_13_2}, - {1, arcs_13_3}, +static state states_14[4] = { + {2, arcs_14_0}, + {1, arcs_14_1}, + {1, arcs_14_2}, + {1, arcs_14_3}, }; -static arc arcs_14_0[1] = { - {34, 1}, +static arc arcs_15_0[1] = { + {36, 1}, }; -static arc arcs_14_1[2] = { - {28, 2}, +static arc arcs_15_1[2] = { + {30, 2}, {0, 1}, }; -static arc arcs_14_2[2] = { - {34, 1}, +static arc arcs_15_2[2] = { + {36, 1}, {0, 2}, }; -static state states_14[3] = { - {1, arcs_14_0}, - {2, arcs_14_1}, - {2, arcs_14_2}, +static state states_15[3] = { + {1, arcs_15_0}, + {2, arcs_15_1}, + {2, arcs_15_2}, }; -static arc arcs_15_0[2] = { +static arc arcs_16_0[2] = { {3, 1}, {4, 1}, }; -static arc arcs_15_1[1] = { +static arc arcs_16_1[1] = { {0, 1}, }; -static state states_15[2] = { - {2, arcs_15_0}, - {1, arcs_15_1}, +static state states_16[2] = { + {2, arcs_16_0}, + {1, arcs_16_1}, }; -static arc arcs_16_0[1] = { - {37, 1}, +static arc arcs_17_0[1] = { + {39, 1}, }; -static arc arcs_16_1[2] = { - {38, 2}, +static arc arcs_17_1[2] = { + {40, 2}, {2, 3}, }; -static arc arcs_16_2[2] = { - {37, 1}, +static arc arcs_17_2[2] = { + {39, 1}, {2, 3}, }; -static arc arcs_16_3[1] = { +static arc arcs_17_3[1] = { {0, 3}, }; -static state states_16[4] = { - {1, arcs_16_0}, - {2, arcs_16_1}, - {2, arcs_16_2}, - {1, arcs_16_3}, +static state states_17[4] = { + {1, arcs_17_0}, + {2, arcs_17_1}, + {2, arcs_17_2}, + {1, arcs_17_3}, }; -static arc arcs_17_0[8] = { - {39, 1}, - {40, 1}, +static arc arcs_18_0[8] = { {41, 1}, {42, 1}, {43, 1}, {44, 1}, {45, 1}, {46, 1}, + {47, 1}, + {48, 1}, }; -static arc arcs_17_1[1] = { +static arc arcs_18_1[1] = { {0, 1}, }; -static state states_17[2] = { - {8, arcs_17_0}, - {1, arcs_17_1}, +static state states_18[2] = { + {8, arcs_18_0}, + {1, arcs_18_1}, }; -static arc arcs_18_0[1] = { +static arc arcs_19_0[1] = { {9, 1}, }; -static arc arcs_18_1[3] = { - {47, 2}, - {27, 3}, +static arc arcs_19_1[3] = { + {49, 2}, + {29, 3}, {0, 1}, }; -static arc arcs_18_2[2] = { - {48, 4}, +static arc arcs_19_2[2] = { + {50, 4}, {9, 4}, }; -static arc arcs_18_3[2] = { - {48, 5}, +static arc arcs_19_3[2] = { + {50, 5}, {9, 5}, }; -static arc arcs_18_4[1] = { +static arc arcs_19_4[1] = { {0, 4}, }; -static arc arcs_18_5[2] = { - {27, 3}, +static arc arcs_19_5[2] = { + {29, 3}, {0, 5}, }; -static state states_18[6] = { - {1, arcs_18_0}, - {3, arcs_18_1}, - {2, arcs_18_2}, - {2, arcs_18_3}, - {1, arcs_18_4}, - {2, arcs_18_5}, +static state states_19[6] = { + {1, arcs_19_0}, + {3, arcs_19_1}, + {2, arcs_19_2}, + {2, arcs_19_3}, + {1, arcs_19_4}, + {2, arcs_19_5}, }; -static arc arcs_19_0[12] = { - {49, 1}, - {50, 1}, +static arc arcs_20_0[12] = { {51, 1}, {52, 1}, {53, 1}, @@ -464,64 +472,56 @@ {58, 1}, {59, 1}, {60, 1}, -}; -static arc arcs_19_1[1] = { - {0, 1}, -}; -static state states_19[2] = { - {12, arcs_19_0}, - {1, arcs_19_1}, -}; -static arc arcs_20_0[1] = { {61, 1}, + {62, 1}, }; static arc arcs_20_1[1] = { - {62, 2}, + {0, 1}, }; -static arc arcs_20_2[1] = { - {0, 2}, -}; -static state states_20[3] = { - {1, arcs_20_0}, +static state states_20[2] = { + {12, arcs_20_0}, {1, arcs_20_1}, - {1, arcs_20_2}, }; static arc arcs_21_0[1] = { {63, 1}, }; static arc arcs_21_1[1] = { - {0, 1}, + {64, 2}, }; -static state states_21[2] = { +static arc arcs_21_2[1] = { + {0, 2}, +}; +static state states_21[3] = { {1, arcs_21_0}, {1, arcs_21_1}, + {1, arcs_21_2}, }; -static arc arcs_22_0[5] = { - {64, 1}, +static arc arcs_22_0[1] = { {65, 1}, - {66, 1}, - {67, 1}, - {68, 1}, }; static arc arcs_22_1[1] = { {0, 1}, }; static state states_22[2] = { - {5, arcs_22_0}, + {1, arcs_22_0}, {1, arcs_22_1}, }; -static arc arcs_23_0[1] = { +static arc arcs_23_0[5] = { + {66, 1}, + {67, 1}, + {68, 1}, {69, 1}, + {70, 1}, }; static arc arcs_23_1[1] = { {0, 1}, }; static state states_23[2] = { - {1, arcs_23_0}, + {5, arcs_23_0}, {1, arcs_23_1}, }; static arc arcs_24_0[1] = { - {70, 1}, + {71, 1}, }; static arc arcs_24_1[1] = { {0, 1}, @@ -531,155 +531,146 @@ {1, arcs_24_1}, }; static arc arcs_25_0[1] = { - {71, 1}, + {72, 1}, }; -static arc arcs_25_1[2] = { - {9, 2}, +static arc arcs_25_1[1] = { {0, 1}, }; -static arc arcs_25_2[1] = { - {0, 2}, -}; -static state states_25[3] = { +static state states_25[2] = { {1, arcs_25_0}, - {2, arcs_25_1}, - {1, arcs_25_2}, + {1, arcs_25_1}, }; static arc arcs_26_0[1] = { - {48, 1}, + {73, 1}, }; -static arc arcs_26_1[1] = { +static arc arcs_26_1[2] = { + {9, 2}, {0, 1}, }; -static state states_26[2] = { +static arc arcs_26_2[1] = { + {0, 2}, +}; +static state states_26[3] = { {1, arcs_26_0}, - {1, arcs_26_1}, + {2, arcs_26_1}, + {1, arcs_26_2}, }; static arc arcs_27_0[1] = { - {72, 1}, + {50, 1}, }; -static arc arcs_27_1[2] = { - {22, 2}, +static arc arcs_27_1[1] = { {0, 1}, }; -static arc arcs_27_2[2] = { - {28, 3}, +static state states_27[2] = { + {1, arcs_27_0}, + {1, arcs_27_1}, +}; +static arc arcs_28_0[1] = { + {74, 1}, +}; +static arc arcs_28_1[2] = { + {24, 2}, + {0, 1}, +}; +static arc arcs_28_2[2] = { + {30, 3}, {0, 2}, }; -static arc arcs_27_3[1] = { - {22, 4}, +static arc arcs_28_3[1] = { + {24, 4}, }; -static arc arcs_27_4[2] = { - {28, 5}, +static arc arcs_28_4[2] = { + {30, 5}, {0, 4}, }; -static arc arcs_27_5[1] = { - {22, 6}, +static arc arcs_28_5[1] = { + {24, 6}, }; -static arc arcs_27_6[1] = { +static arc arcs_28_6[1] = { {0, 6}, }; -static state states_27[7] = { - {1, arcs_27_0}, - {2, arcs_27_1}, - {2, arcs_27_2}, - {1, arcs_27_3}, - {2, arcs_27_4}, - {1, arcs_27_5}, - {1, arcs_27_6}, +static state states_28[7] = { + {1, arcs_28_0}, + {2, arcs_28_1}, + {2, arcs_28_2}, + {1, arcs_28_3}, + {2, arcs_28_4}, + {1, arcs_28_5}, + {1, arcs_28_6}, }; -static arc arcs_28_0[2] = { - {73, 1}, - {74, 1}, +static arc arcs_29_0[2] = { + {75, 1}, + {76, 1}, }; -static arc arcs_28_1[1] = { +static arc arcs_29_1[1] = { {0, 1}, }; -static state states_28[2] = { - {2, arcs_28_0}, - {1, arcs_28_1}, +static state states_29[2] = { + {2, arcs_29_0}, + {1, arcs_29_1}, }; -static arc arcs_29_0[1] = { - {75, 1}, +static arc arcs_30_0[1] = { + {77, 1}, }; -static arc arcs_29_1[1] = { - {76, 2}, +static arc arcs_30_1[1] = { + {78, 2}, }; -static arc arcs_29_2[1] = { +static arc arcs_30_2[1] = { {0, 2}, }; -static state states_29[3] = { - {1, arcs_29_0}, - {1, arcs_29_1}, - {1, arcs_29_2}, +static state states_30[3] = { + {1, arcs_30_0}, + {1, arcs_30_1}, + {1, arcs_30_2}, }; -static arc arcs_30_0[1] = { - {77, 1}, +static arc arcs_31_0[1] = { + {79, 1}, }; -static arc arcs_30_1[2] = { - {78, 2}, +static arc arcs_31_1[2] = { + {80, 2}, {12, 3}, }; -static arc arcs_30_2[3] = { - {78, 2}, +static arc arcs_31_2[3] = { + {80, 2}, {12, 3}, - {75, 4}, + {77, 4}, }; -static arc arcs_30_3[1] = { - {75, 4}, +static arc arcs_31_3[1] = { + {77, 4}, }; -static arc arcs_30_4[3] = { - {29, 5}, +static arc arcs_31_4[3] = { + {31, 5}, {13, 6}, - {79, 5}, + {81, 5}, }; -static arc arcs_30_5[1] = { +static arc arcs_31_5[1] = { {0, 5}, }; -static arc arcs_30_6[1] = { - {79, 7}, +static arc arcs_31_6[1] = { + {81, 7}, }; -static arc arcs_30_7[1] = { +static arc arcs_31_7[1] = { {15, 5}, }; -static state states_30[8] = { - {1, arcs_30_0}, - {2, arcs_30_1}, - {3, arcs_30_2}, - {1, arcs_30_3}, - {3, arcs_30_4}, - {1, arcs_30_5}, - {1, arcs_30_6}, - {1, arcs_30_7}, -}; -static arc arcs_31_0[1] = { - {19, 1}, -}; -static arc arcs_31_1[2] = { - {81, 2}, - {0, 1}, -}; -static arc arcs_31_2[1] = { - {19, 3}, -}; -static arc arcs_31_3[1] = { - {0, 3}, -}; -static state states_31[4] = { +static state states_31[8] = { {1, arcs_31_0}, {2, arcs_31_1}, - {1, arcs_31_2}, + {3, arcs_31_2}, {1, arcs_31_3}, + {3, arcs_31_4}, + {1, arcs_31_5}, + {1, arcs_31_6}, + {1, arcs_31_7}, }; static arc arcs_32_0[1] = { - {12, 1}, + {21, 1}, }; static arc arcs_32_1[2] = { - {81, 2}, + {83, 2}, {0, 1}, }; static arc arcs_32_2[1] = { - {19, 3}, + {21, 3}, }; static arc arcs_32_3[1] = { {0, 3}, @@ -691,37 +682,45 @@ {1, arcs_32_3}, }; static arc arcs_33_0[1] = { - {80, 1}, + {12, 1}, }; static arc arcs_33_1[2] = { - {28, 2}, + {83, 2}, {0, 1}, }; -static arc arcs_33_2[2] = { - {80, 1}, - {0, 2}, +static arc arcs_33_2[1] = { + {21, 3}, }; -static state states_33[3] = { +static arc arcs_33_3[1] = { + {0, 3}, +}; +static state states_33[4] = { {1, arcs_33_0}, {2, arcs_33_1}, - {2, arcs_33_2}, + {1, arcs_33_2}, + {1, arcs_33_3}, }; static arc arcs_34_0[1] = { {82, 1}, }; static arc arcs_34_1[2] = { - {28, 0}, + {30, 2}, {0, 1}, }; -static state states_34[2] = { +static arc arcs_34_2[2] = { + {82, 1}, + {0, 2}, +}; +static state states_34[3] = { {1, arcs_34_0}, {2, arcs_34_1}, + {2, arcs_34_2}, }; static arc arcs_35_0[1] = { - {19, 1}, + {84, 1}, }; static arc arcs_35_1[2] = { - {78, 0}, + {30, 0}, {0, 1}, }; static state states_35[2] = { @@ -729,28 +728,24 @@ {2, arcs_35_1}, }; static arc arcs_36_0[1] = { - {83, 1}, + {21, 1}, }; -static arc arcs_36_1[1] = { - {19, 2}, +static arc arcs_36_1[2] = { + {80, 0}, + {0, 1}, }; -static arc arcs_36_2[2] = { - {28, 1}, - {0, 2}, -}; -static state states_36[3] = { +static state states_36[2] = { {1, arcs_36_0}, - {1, arcs_36_1}, - {2, arcs_36_2}, + {2, arcs_36_1}, }; static arc arcs_37_0[1] = { - {84, 1}, + {85, 1}, }; static arc arcs_37_1[1] = { - {19, 2}, + {21, 2}, }; static arc arcs_37_2[2] = { - {28, 1}, + {30, 1}, {0, 2}, }; static state states_37[3] = { @@ -759,101 +754,82 @@ {2, arcs_37_2}, }; static arc arcs_38_0[1] = { - {85, 1}, + {86, 1}, }; static arc arcs_38_1[1] = { - {22, 2}, + {21, 2}, }; static arc arcs_38_2[2] = { - {28, 3}, + {30, 1}, {0, 2}, }; -static arc arcs_38_3[1] = { - {22, 4}, -}; -static arc arcs_38_4[1] = { - {0, 4}, -}; -static state states_38[5] = { +static state states_38[3] = { {1, arcs_38_0}, {1, arcs_38_1}, {2, arcs_38_2}, - {1, arcs_38_3}, - {1, arcs_38_4}, }; -static arc arcs_39_0[7] = { - {86, 1}, +static arc arcs_39_0[1] = { {87, 1}, - {88, 1}, - {89, 1}, - {90, 1}, - {17, 1}, - {91, 1}, }; static arc arcs_39_1[1] = { - {0, 1}, + {24, 2}, }; -static state states_39[2] = { - {7, arcs_39_0}, - {1, arcs_39_1}, +static arc arcs_39_2[2] = { + {30, 3}, + {0, 2}, }; -static arc arcs_40_0[1] = { - {92, 1}, -}; -static arc arcs_40_1[1] = { - {22, 2}, -}; -static arc arcs_40_2[1] = { - {23, 3}, -}; -static arc arcs_40_3[1] = { +static arc arcs_39_3[1] = { {24, 4}, }; -static arc arcs_40_4[3] = { - {93, 1}, - {94, 5}, +static arc arcs_39_4[1] = { {0, 4}, }; -static arc arcs_40_5[1] = { - {23, 6}, +static state states_39[5] = { + {1, arcs_39_0}, + {1, arcs_39_1}, + {2, arcs_39_2}, + {1, arcs_39_3}, + {1, arcs_39_4}, }; -static arc arcs_40_6[1] = { - {24, 7}, +static arc arcs_40_0[8] = { + {88, 1}, + {89, 1}, + {90, 1}, + {91, 1}, + {92, 1}, + {19, 1}, + {18, 1}, + {17, 1}, }; -static arc arcs_40_7[1] = { - {0, 7}, +static arc arcs_40_1[1] = { + {0, 1}, }; -static state states_40[8] = { - {1, arcs_40_0}, +static state states_40[2] = { + {8, arcs_40_0}, {1, arcs_40_1}, - {1, arcs_40_2}, - {1, arcs_40_3}, - {3, arcs_40_4}, - {1, arcs_40_5}, - {1, arcs_40_6}, - {1, arcs_40_7}, }; static arc arcs_41_0[1] = { - {95, 1}, + {93, 1}, }; static arc arcs_41_1[1] = { - {22, 2}, + {24, 2}, }; static arc arcs_41_2[1] = { - {23, 3}, + {25, 3}, }; static arc arcs_41_3[1] = { - {24, 4}, + {26, 4}, }; -static arc arcs_41_4[2] = { - {94, 5}, +static arc arcs_41_4[3] = { + {94, 1}, + {95, 5}, {0, 4}, }; static arc arcs_41_5[1] = { - {23, 6}, + {25, 6}, }; static arc arcs_41_6[1] = { - {24, 7}, + {26, 7}, }; static arc arcs_41_7[1] = { {0, 7}, @@ -863,7 +839,7 @@ {1, arcs_41_1}, {1, arcs_41_2}, {1, arcs_41_3}, - {2, arcs_41_4}, + {3, arcs_41_4}, {1, arcs_41_5}, {1, arcs_41_6}, {1, arcs_41_7}, @@ -872,371 +848,395 @@ {96, 1}, }; static arc arcs_42_1[1] = { - {62, 2}, + {24, 2}, }; static arc arcs_42_2[1] = { - {97, 3}, + {25, 3}, }; static arc arcs_42_3[1] = { - {9, 4}, + {26, 4}, }; -static arc arcs_42_4[1] = { - {23, 5}, +static arc arcs_42_4[2] = { + {95, 5}, + {0, 4}, }; static arc arcs_42_5[1] = { - {24, 6}, + {25, 6}, }; -static arc arcs_42_6[2] = { - {94, 7}, - {0, 6}, +static arc arcs_42_6[1] = { + {26, 7}, }; static arc arcs_42_7[1] = { - {23, 8}, + {0, 7}, }; -static arc arcs_42_8[1] = { - {24, 9}, -}; -static arc arcs_42_9[1] = { - {0, 9}, -}; -static state states_42[10] = { +static state states_42[8] = { {1, arcs_42_0}, {1, arcs_42_1}, {1, arcs_42_2}, {1, arcs_42_3}, - {1, arcs_42_4}, + {2, arcs_42_4}, {1, arcs_42_5}, - {2, arcs_42_6}, + {1, arcs_42_6}, {1, arcs_42_7}, - {1, arcs_42_8}, - {1, arcs_42_9}, }; static arc arcs_43_0[1] = { - {98, 1}, + {97, 1}, }; static arc arcs_43_1[1] = { - {23, 2}, + {64, 2}, }; static arc arcs_43_2[1] = { - {24, 3}, + {98, 3}, }; -static arc arcs_43_3[2] = { - {99, 4}, - {100, 5}, +static arc arcs_43_3[1] = { + {9, 4}, }; static arc arcs_43_4[1] = { - {23, 6}, + {25, 5}, }; static arc arcs_43_5[1] = { - {23, 7}, + {26, 6}, }; -static arc arcs_43_6[1] = { - {24, 8}, +static arc arcs_43_6[2] = { + {95, 7}, + {0, 6}, }; static arc arcs_43_7[1] = { - {24, 9}, + {25, 8}, }; -static arc arcs_43_8[4] = { - {99, 4}, - {94, 10}, - {100, 5}, - {0, 8}, +static arc arcs_43_8[1] = { + {26, 9}, }; static arc arcs_43_9[1] = { {0, 9}, }; -static arc arcs_43_10[1] = { - {23, 11}, -}; -static arc arcs_43_11[1] = { - {24, 12}, -}; -static arc arcs_43_12[2] = { - {100, 5}, - {0, 12}, -}; -static state states_43[13] = { +static state states_43[10] = { {1, arcs_43_0}, {1, arcs_43_1}, {1, arcs_43_2}, - {2, arcs_43_3}, + {1, arcs_43_3}, {1, arcs_43_4}, {1, arcs_43_5}, - {1, arcs_43_6}, + {2, arcs_43_6}, {1, arcs_43_7}, - {4, arcs_43_8}, + {1, arcs_43_8}, {1, arcs_43_9}, - {1, arcs_43_10}, - {1, arcs_43_11}, - {2, arcs_43_12}, }; static arc arcs_44_0[1] = { - {101, 1}, + {99, 1}, }; static arc arcs_44_1[1] = { - {22, 2}, + {25, 2}, }; -static arc arcs_44_2[2] = { - {102, 3}, - {23, 4}, +static arc arcs_44_2[1] = { + {26, 3}, }; -static arc arcs_44_3[1] = { - {23, 4}, +static arc arcs_44_3[2] = { + {100, 4}, + {101, 5}, }; static arc arcs_44_4[1] = { - {24, 5}, + {25, 6}, }; static arc arcs_44_5[1] = { - {0, 5}, + {25, 7}, }; -static state states_44[6] = { +static arc arcs_44_6[1] = { + {26, 8}, +}; +static arc arcs_44_7[1] = { + {26, 9}, +}; +static arc arcs_44_8[4] = { + {100, 4}, + {95, 10}, + {101, 5}, + {0, 8}, +}; +static arc arcs_44_9[1] = { + {0, 9}, +}; +static arc arcs_44_10[1] = { + {25, 11}, +}; +static arc arcs_44_11[1] = { + {26, 12}, +}; +static arc arcs_44_12[2] = { + {101, 5}, + {0, 12}, +}; +static state states_44[13] = { {1, arcs_44_0}, {1, arcs_44_1}, - {2, arcs_44_2}, - {1, arcs_44_3}, + {1, arcs_44_2}, + {2, arcs_44_3}, {1, arcs_44_4}, {1, arcs_44_5}, + {1, arcs_44_6}, + {1, arcs_44_7}, + {4, arcs_44_8}, + {1, arcs_44_9}, + {1, arcs_44_10}, + {1, arcs_44_11}, + {2, arcs_44_12}, }; static arc arcs_45_0[1] = { - {81, 1}, + {102, 1}, }; static arc arcs_45_1[1] = { - {103, 2}, + {24, 2}, }; -static arc arcs_45_2[1] = { - {0, 2}, +static arc arcs_45_2[2] = { + {103, 3}, + {25, 4}, }; -static state states_45[3] = { +static arc arcs_45_3[1] = { + {25, 4}, +}; +static arc arcs_45_4[1] = { + {26, 5}, +}; +static arc arcs_45_5[1] = { + {0, 5}, +}; +static state states_45[6] = { {1, arcs_45_0}, {1, arcs_45_1}, - {1, arcs_45_2}, + {2, arcs_45_2}, + {1, arcs_45_3}, + {1, arcs_45_4}, + {1, arcs_45_5}, }; static arc arcs_46_0[1] = { - {104, 1}, + {83, 1}, }; -static arc arcs_46_1[2] = { - {22, 2}, - {0, 1}, +static arc arcs_46_1[1] = { + {104, 2}, }; -static arc arcs_46_2[2] = { - {81, 3}, +static arc arcs_46_2[1] = { {0, 2}, }; -static arc arcs_46_3[1] = { - {19, 4}, -}; -static arc arcs_46_4[1] = { - {0, 4}, -}; -static state states_46[5] = { +static state states_46[3] = { {1, arcs_46_0}, - {2, arcs_46_1}, - {2, arcs_46_2}, - {1, arcs_46_3}, - {1, arcs_46_4}, + {1, arcs_46_1}, + {1, arcs_46_2}, }; -static arc arcs_47_0[2] = { - {3, 1}, - {2, 2}, +static arc arcs_47_0[1] = { + {105, 1}, }; -static arc arcs_47_1[1] = { +static arc arcs_47_1[2] = { + {24, 2}, {0, 1}, }; -static arc arcs_47_2[1] = { - {105, 3}, +static arc arcs_47_2[2] = { + {83, 3}, + {0, 2}, }; static arc arcs_47_3[1] = { - {6, 4}, + {21, 4}, }; -static arc arcs_47_4[2] = { - {6, 4}, - {106, 1}, +static arc arcs_47_4[1] = { + {0, 4}, }; static state states_47[5] = { - {2, arcs_47_0}, - {1, arcs_47_1}, - {1, arcs_47_2}, + {1, arcs_47_0}, + {2, arcs_47_1}, + {2, arcs_47_2}, {1, arcs_47_3}, - {2, arcs_47_4}, + {1, arcs_47_4}, }; -static arc arcs_48_0[1] = { - {108, 1}, +static arc arcs_48_0[2] = { + {3, 1}, + {2, 2}, }; -static arc arcs_48_1[2] = { - {28, 2}, +static arc arcs_48_1[1] = { {0, 1}, }; static arc arcs_48_2[1] = { - {108, 3}, + {106, 3}, }; -static arc arcs_48_3[2] = { - {28, 4}, - {0, 3}, +static arc arcs_48_3[1] = { + {6, 4}, }; static arc arcs_48_4[2] = { - {108, 3}, - {0, 4}, + {6, 4}, + {107, 1}, }; static state states_48[5] = { - {1, arcs_48_0}, - {2, arcs_48_1}, + {2, arcs_48_0}, + {1, arcs_48_1}, {1, arcs_48_2}, - {2, arcs_48_3}, + {1, arcs_48_3}, {2, arcs_48_4}, }; -static arc arcs_49_0[2] = { +static arc arcs_49_0[1] = { {109, 1}, - {110, 1}, }; -static arc arcs_49_1[1] = { +static arc arcs_49_1[2] = { + {30, 2}, {0, 1}, }; -static state states_49[2] = { - {2, arcs_49_0}, - {1, arcs_49_1}, +static arc arcs_49_2[1] = { + {109, 3}, }; -static arc arcs_50_0[1] = { - {111, 1}, +static arc arcs_49_3[2] = { + {30, 4}, + {0, 3}, }; -static arc arcs_50_1[2] = { - {33, 2}, - {23, 3}, +static arc arcs_49_4[2] = { + {109, 3}, + {0, 4}, }; -static arc arcs_50_2[1] = { - {23, 3}, +static state states_49[5] = { + {1, arcs_49_0}, + {2, arcs_49_1}, + {1, arcs_49_2}, + {2, arcs_49_3}, + {2, arcs_49_4}, }; -static arc arcs_50_3[1] = { - {108, 4}, +static arc arcs_50_0[2] = { + {110, 1}, + {111, 1}, }; -static arc arcs_50_4[1] = { - {0, 4}, +static arc arcs_50_1[1] = { + {0, 1}, }; -static state states_50[5] = { - {1, arcs_50_0}, - {2, arcs_50_1}, - {1, arcs_50_2}, - {1, arcs_50_3}, - {1, arcs_50_4}, +static state states_50[2] = { + {2, arcs_50_0}, + {1, arcs_50_1}, }; -static arc arcs_51_0[2] = { - {109, 1}, - {112, 2}, +static arc arcs_51_0[1] = { + {112, 1}, }; static arc arcs_51_1[2] = { - {92, 3}, - {0, 1}, + {35, 2}, + {25, 3}, }; static arc arcs_51_2[1] = { - {0, 2}, + {25, 3}, }; static arc arcs_51_3[1] = { {109, 4}, }; static arc arcs_51_4[1] = { - {94, 5}, + {0, 4}, }; -static arc arcs_51_5[1] = { - {22, 2}, -}; -static state states_51[6] = { - {2, arcs_51_0}, +static state states_51[5] = { + {1, arcs_51_0}, {2, arcs_51_1}, {1, arcs_51_2}, {1, arcs_51_3}, {1, arcs_51_4}, - {1, arcs_51_5}, }; -static arc arcs_52_0[1] = { - {113, 1}, +static arc arcs_52_0[2] = { + {110, 1}, + {113, 2}, }; static arc arcs_52_1[2] = { - {114, 0}, + {93, 3}, {0, 1}, }; -static state states_52[2] = { - {1, arcs_52_0}, +static arc arcs_52_2[1] = { + {0, 2}, +}; +static arc arcs_52_3[1] = { + {110, 4}, +}; +static arc arcs_52_4[1] = { + {95, 5}, +}; +static arc arcs_52_5[1] = { + {24, 2}, +}; +static state states_52[6] = { + {2, arcs_52_0}, {2, arcs_52_1}, + {1, arcs_52_2}, + {1, arcs_52_3}, + {1, arcs_52_4}, + {1, arcs_52_5}, }; static arc arcs_53_0[1] = { - {115, 1}, + {114, 1}, }; static arc arcs_53_1[2] = { - {116, 0}, + {115, 0}, {0, 1}, }; static state states_53[2] = { {1, arcs_53_0}, {2, arcs_53_1}, }; -static arc arcs_54_0[2] = { - {117, 1}, - {118, 2}, +static arc arcs_54_0[1] = { + {116, 1}, }; -static arc arcs_54_1[1] = { - {115, 2}, +static arc arcs_54_1[2] = { + {117, 0}, + {0, 1}, }; -static arc arcs_54_2[1] = { +static state states_54[2] = { + {1, arcs_54_0}, + {2, arcs_54_1}, +}; +static arc arcs_55_0[2] = { + {118, 1}, + {119, 2}, +}; +static arc arcs_55_1[1] = { + {116, 2}, +}; +static arc arcs_55_2[1] = { {0, 2}, }; -static state states_54[3] = { - {2, arcs_54_0}, - {1, arcs_54_1}, - {1, arcs_54_2}, +static state states_55[3] = { + {2, arcs_55_0}, + {1, arcs_55_1}, + {1, arcs_55_2}, }; -static arc arcs_55_0[1] = { - {103, 1}, +static arc arcs_56_0[1] = { + {104, 1}, }; -static arc arcs_55_1[2] = { - {119, 0}, +static arc arcs_56_1[2] = { + {120, 0}, {0, 1}, }; -static state states_55[2] = { - {1, arcs_55_0}, - {2, arcs_55_1}, +static state states_56[2] = { + {1, arcs_56_0}, + {2, arcs_56_1}, }; -static arc arcs_56_0[9] = { - {120, 1}, +static arc arcs_57_0[9] = { {121, 1}, {122, 1}, {123, 1}, {124, 1}, {125, 1}, - {97, 1}, - {117, 2}, - {126, 3}, + {126, 1}, + {98, 1}, + {118, 2}, + {127, 3}, }; -static arc arcs_56_1[1] = { +static arc arcs_57_1[1] = { {0, 1}, }; -static arc arcs_56_2[1] = { - {97, 1}, +static arc arcs_57_2[1] = { + {98, 1}, }; -static arc arcs_56_3[2] = { - {117, 1}, +static arc arcs_57_3[2] = { + {118, 1}, {0, 3}, }; -static state states_56[4] = { - {9, arcs_56_0}, - {1, arcs_56_1}, - {1, arcs_56_2}, - {2, arcs_56_3}, +static state states_57[4] = { + {9, arcs_57_0}, + {1, arcs_57_1}, + {1, arcs_57_2}, + {2, arcs_57_3}, }; -static arc arcs_57_0[1] = { - {127, 1}, -}; -static arc arcs_57_1[2] = { - {128, 0}, - {0, 1}, -}; -static state states_57[2] = { - {1, arcs_57_0}, - {2, arcs_57_1}, -}; static arc arcs_58_0[1] = { - {129, 1}, + {128, 1}, }; static arc arcs_58_1[2] = { - {130, 0}, + {129, 0}, {0, 1}, }; static state states_58[2] = { @@ -1244,10 +1244,10 @@ {2, arcs_58_1}, }; static arc arcs_59_0[1] = { - {131, 1}, + {130, 1}, }; static arc arcs_59_1[2] = { - {132, 0}, + {131, 0}, {0, 1}, }; static state states_59[2] = { @@ -1255,23 +1255,22 @@ {2, arcs_59_1}, }; static arc arcs_60_0[1] = { - {133, 1}, + {132, 1}, }; -static arc arcs_60_1[3] = { - {134, 0}, - {135, 0}, +static arc arcs_60_1[2] = { + {133, 0}, {0, 1}, }; static state states_60[2] = { {1, arcs_60_0}, - {3, arcs_60_1}, + {2, arcs_60_1}, }; static arc arcs_61_0[1] = { - {136, 1}, + {134, 1}, }; static arc arcs_61_1[3] = { - {137, 0}, - {138, 0}, + {135, 0}, + {136, 0}, {0, 1}, }; static state states_61[2] = { @@ -1279,156 +1278,142 @@ {3, arcs_61_1}, }; static arc arcs_62_0[1] = { - {139, 1}, + {137, 1}, }; -static arc arcs_62_1[5] = { - {29, 0}, - {140, 0}, - {141, 0}, - {142, 0}, +static arc arcs_62_1[3] = { + {138, 0}, + {139, 0}, {0, 1}, }; static state states_62[2] = { {1, arcs_62_0}, - {5, arcs_62_1}, + {3, arcs_62_1}, }; -static arc arcs_63_0[4] = { - {137, 1}, +static arc arcs_63_0[1] = { + {140, 1}, +}; +static arc arcs_63_1[5] = { + {31, 0}, + {141, 0}, + {142, 0}, + {143, 0}, + {0, 1}, +}; +static state states_63[2] = { + {1, arcs_63_0}, + {5, arcs_63_1}, +}; +static arc arcs_64_0[4] = { {138, 1}, - {143, 1}, - {144, 2}, + {139, 1}, + {144, 1}, + {145, 2}, }; -static arc arcs_63_1[1] = { - {139, 2}, +static arc arcs_64_1[1] = { + {140, 2}, }; -static arc arcs_63_2[1] = { +static arc arcs_64_2[1] = { {0, 2}, }; -static state states_63[3] = { - {4, arcs_63_0}, - {1, arcs_63_1}, - {1, arcs_63_2}, +static state states_64[3] = { + {4, arcs_64_0}, + {1, arcs_64_1}, + {1, arcs_64_2}, }; -static arc arcs_64_0[1] = { - {145, 1}, +static arc arcs_65_0[1] = { + {146, 1}, }; -static arc arcs_64_1[3] = { - {146, 1}, - {31, 2}, +static arc arcs_65_1[3] = { + {147, 1}, + {33, 2}, {0, 1}, }; -static arc arcs_64_2[1] = { - {139, 3}, +static arc arcs_65_2[1] = { + {140, 3}, }; -static arc arcs_64_3[1] = { +static arc arcs_65_3[1] = { {0, 3}, }; -static state states_64[4] = { - {1, arcs_64_0}, - {3, arcs_64_1}, - {1, arcs_64_2}, - {1, arcs_64_3}, +static state states_65[4] = { + {1, arcs_65_0}, + {3, arcs_65_1}, + {1, arcs_65_2}, + {1, arcs_65_3}, }; -static arc arcs_65_0[7] = { +static arc arcs_66_0[7] = { {13, 1}, - {148, 2}, - {151, 3}, - {19, 4}, - {154, 4}, - {155, 5}, - {78, 6}, + {149, 2}, + {152, 3}, + {21, 4}, + {155, 4}, + {156, 5}, + {80, 6}, }; -static arc arcs_65_1[3] = { - {48, 7}, - {147, 7}, +static arc arcs_66_1[3] = { + {50, 7}, + {148, 7}, {15, 4}, }; -static arc arcs_65_2[2] = { - {149, 8}, - {150, 4}, +static arc arcs_66_2[2] = { + {150, 8}, + {151, 4}, }; -static arc arcs_65_3[2] = { - {152, 9}, - {153, 4}, +static arc arcs_66_3[2] = { + {153, 9}, + {154, 4}, }; -static arc arcs_65_4[1] = { +static arc arcs_66_4[1] = { {0, 4}, }; -static arc arcs_65_5[2] = { - {155, 5}, +static arc arcs_66_5[2] = { + {156, 5}, {0, 5}, }; -static arc arcs_65_6[1] = { - {78, 10}, +static arc arcs_66_6[1] = { + {80, 10}, }; -static arc arcs_65_7[1] = { +static arc arcs_66_7[1] = { {15, 4}, }; -static arc arcs_65_8[1] = { - {150, 4}, +static arc arcs_66_8[1] = { + {151, 4}, }; -static arc arcs_65_9[1] = { - {153, 4}, +static arc arcs_66_9[1] = { + {154, 4}, }; -static arc arcs_65_10[1] = { - {78, 4}, +static arc arcs_66_10[1] = { + {80, 4}, }; -static state states_65[11] = { - {7, arcs_65_0}, - {3, arcs_65_1}, - {2, arcs_65_2}, - {2, arcs_65_3}, - {1, arcs_65_4}, - {2, arcs_65_5}, - {1, arcs_65_6}, - {1, arcs_65_7}, - {1, arcs_65_8}, - {1, arcs_65_9}, - {1, arcs_65_10}, -}; -static arc arcs_66_0[1] = { - {22, 1}, -}; -static arc arcs_66_1[3] = { - {156, 2}, - {28, 3}, - {0, 1}, -}; -static arc arcs_66_2[1] = { - {0, 2}, -}; -static arc arcs_66_3[2] = { - {22, 4}, - {0, 3}, -}; -static arc arcs_66_4[2] = { - {28, 3}, - {0, 4}, -}; -static state states_66[5] = { - {1, arcs_66_0}, +static state states_66[11] = { + {7, arcs_66_0}, {3, arcs_66_1}, - {1, arcs_66_2}, + {2, arcs_66_2}, {2, arcs_66_3}, - {2, arcs_66_4}, + {1, arcs_66_4}, + {2, arcs_66_5}, + {1, arcs_66_6}, + {1, arcs_66_7}, + {1, arcs_66_8}, + {1, arcs_66_9}, + {1, arcs_66_10}, }; static arc arcs_67_0[1] = { - {22, 1}, + {24, 1}, }; static arc arcs_67_1[3] = { {157, 2}, - {28, 3}, + {30, 3}, {0, 1}, }; static arc arcs_67_2[1] = { {0, 2}, }; static arc arcs_67_3[2] = { - {22, 4}, + {24, 4}, {0, 3}, }; static arc arcs_67_4[2] = { - {28, 3}, + {30, 3}, {0, 4}, }; static state states_67[5] = { @@ -1439,144 +1424,154 @@ {2, arcs_67_4}, }; static arc arcs_68_0[1] = { - {111, 1}, + {24, 1}, }; -static arc arcs_68_1[2] = { - {33, 2}, - {23, 3}, +static arc arcs_68_1[3] = { + {158, 2}, + {30, 3}, + {0, 1}, }; static arc arcs_68_2[1] = { - {23, 3}, + {0, 2}, }; -static arc arcs_68_3[1] = { - {22, 4}, +static arc arcs_68_3[2] = { + {24, 4}, + {0, 3}, }; -static arc arcs_68_4[1] = { +static arc arcs_68_4[2] = { + {30, 3}, {0, 4}, }; static state states_68[5] = { {1, arcs_68_0}, - {2, arcs_68_1}, + {3, arcs_68_1}, {1, arcs_68_2}, - {1, arcs_68_3}, - {1, arcs_68_4}, + {2, arcs_68_3}, + {2, arcs_68_4}, }; -static arc arcs_69_0[3] = { - {13, 1}, - {148, 2}, - {78, 3}, +static arc arcs_69_0[1] = { + {112, 1}, }; static arc arcs_69_1[2] = { - {14, 4}, - {15, 5}, + {35, 2}, + {25, 3}, }; static arc arcs_69_2[1] = { - {158, 6}, + {25, 3}, }; static arc arcs_69_3[1] = { - {19, 5}, + {24, 4}, }; static arc arcs_69_4[1] = { - {15, 5}, + {0, 4}, }; -static arc arcs_69_5[1] = { - {0, 5}, -}; -static arc arcs_69_6[1] = { - {150, 5}, -}; -static state states_69[7] = { - {3, arcs_69_0}, +static state states_69[5] = { + {1, arcs_69_0}, {2, arcs_69_1}, {1, arcs_69_2}, {1, arcs_69_3}, {1, arcs_69_4}, - {1, arcs_69_5}, - {1, arcs_69_6}, }; -static arc arcs_70_0[1] = { - {159, 1}, +static arc arcs_70_0[3] = { + {13, 1}, + {149, 2}, + {80, 3}, }; static arc arcs_70_1[2] = { - {28, 2}, - {0, 1}, + {14, 4}, + {15, 5}, }; -static arc arcs_70_2[2] = { - {159, 1}, - {0, 2}, +static arc arcs_70_2[1] = { + {159, 6}, }; -static state states_70[3] = { - {1, arcs_70_0}, +static arc arcs_70_3[1] = { + {21, 5}, +}; +static arc arcs_70_4[1] = { + {15, 5}, +}; +static arc arcs_70_5[1] = { + {0, 5}, +}; +static arc arcs_70_6[1] = { + {151, 5}, +}; +static state states_70[7] = { + {3, arcs_70_0}, {2, arcs_70_1}, - {2, arcs_70_2}, + {1, arcs_70_2}, + {1, arcs_70_3}, + {1, arcs_70_4}, + {1, arcs_70_5}, + {1, arcs_70_6}, }; -static arc arcs_71_0[2] = { - {22, 1}, - {23, 2}, +static arc arcs_71_0[1] = { + {160, 1}, }; static arc arcs_71_1[2] = { - {23, 2}, + {30, 2}, {0, 1}, }; -static arc arcs_71_2[3] = { - {22, 3}, - {160, 4}, +static arc arcs_71_2[2] = { + {160, 1}, {0, 2}, }; -static arc arcs_71_3[2] = { - {160, 4}, - {0, 3}, -}; -static arc arcs_71_4[1] = { - {0, 4}, -}; -static state states_71[5] = { - {2, arcs_71_0}, +static state states_71[3] = { + {1, arcs_71_0}, {2, arcs_71_1}, - {3, arcs_71_2}, - {2, arcs_71_3}, - {1, arcs_71_4}, + {2, arcs_71_2}, }; -static arc arcs_72_0[1] = { - {23, 1}, +static arc arcs_72_0[2] = { + {24, 1}, + {25, 2}, }; static arc arcs_72_1[2] = { - {22, 2}, + {25, 2}, {0, 1}, }; -static arc arcs_72_2[1] = { +static arc arcs_72_2[3] = { + {24, 3}, + {161, 4}, {0, 2}, }; -static state states_72[3] = { - {1, arcs_72_0}, +static arc arcs_72_3[2] = { + {161, 4}, + {0, 3}, +}; +static arc arcs_72_4[1] = { + {0, 4}, +}; +static state states_72[5] = { + {2, arcs_72_0}, {2, arcs_72_1}, - {1, arcs_72_2}, + {3, arcs_72_2}, + {2, arcs_72_3}, + {1, arcs_72_4}, }; static arc arcs_73_0[1] = { - {103, 1}, + {25, 1}, }; static arc arcs_73_1[2] = { - {28, 2}, + {24, 2}, {0, 1}, }; -static arc arcs_73_2[2] = { - {103, 1}, +static arc arcs_73_2[1] = { {0, 2}, }; static state states_73[3] = { {1, arcs_73_0}, {2, arcs_73_1}, - {2, arcs_73_2}, + {1, arcs_73_2}, }; static arc arcs_74_0[1] = { - {22, 1}, + {104, 1}, }; static arc arcs_74_1[2] = { - {28, 2}, + {30, 2}, {0, 1}, }; static arc arcs_74_2[2] = { - {22, 1}, + {104, 1}, {0, 2}, }; static state states_74[3] = { @@ -1585,520 +1580,540 @@ {2, arcs_74_2}, }; static arc arcs_75_0[1] = { - {22, 1}, + {24, 1}, }; -static arc arcs_75_1[3] = { - {23, 2}, - {28, 3}, +static arc arcs_75_1[2] = { + {30, 2}, {0, 1}, }; -static arc arcs_75_2[1] = { - {22, 4}, +static arc arcs_75_2[2] = { + {24, 1}, + {0, 2}, }; -static arc arcs_75_3[2] = { - {22, 5}, - {0, 3}, -}; -static arc arcs_75_4[2] = { - {28, 6}, - {0, 4}, -}; -static arc arcs_75_5[2] = { - {28, 3}, - {0, 5}, -}; -static arc arcs_75_6[2] = { - {22, 7}, - {0, 6}, -}; -static arc arcs_75_7[1] = { - {23, 2}, -}; -static state states_75[8] = { +static state states_75[3] = { {1, arcs_75_0}, - {3, arcs_75_1}, - {1, arcs_75_2}, - {2, arcs_75_3}, - {2, arcs_75_4}, - {2, arcs_75_5}, - {2, arcs_75_6}, - {1, arcs_75_7}, + {2, arcs_75_1}, + {2, arcs_75_2}, }; static arc arcs_76_0[1] = { - {161, 1}, + {24, 1}, }; -static arc arcs_76_1[1] = { - {19, 2}, +static arc arcs_76_1[3] = { + {25, 2}, + {30, 3}, + {0, 1}, }; -static arc arcs_76_2[2] = { - {13, 3}, - {23, 4}, +static arc arcs_76_2[1] = { + {24, 4}, }; static arc arcs_76_3[2] = { - {9, 5}, - {15, 6}, + {24, 5}, + {0, 3}, }; -static arc arcs_76_4[1] = { - {24, 7}, +static arc arcs_76_4[2] = { + {30, 6}, + {0, 4}, }; -static arc arcs_76_5[1] = { - {15, 6}, +static arc arcs_76_5[2] = { + {30, 3}, + {0, 5}, }; -static arc arcs_76_6[1] = { - {23, 4}, +static arc arcs_76_6[2] = { + {24, 7}, + {0, 6}, }; static arc arcs_76_7[1] = { - {0, 7}, + {25, 2}, }; static state states_76[8] = { {1, arcs_76_0}, - {1, arcs_76_1}, - {2, arcs_76_2}, + {3, arcs_76_1}, + {1, arcs_76_2}, {2, arcs_76_3}, - {1, arcs_76_4}, - {1, arcs_76_5}, - {1, arcs_76_6}, + {2, arcs_76_4}, + {2, arcs_76_5}, + {2, arcs_76_6}, {1, arcs_76_7}, }; -static arc arcs_77_0[3] = { +static arc arcs_77_0[1] = { {162, 1}, - {29, 2}, - {31, 3}, }; -static arc arcs_77_1[2] = { - {28, 4}, - {0, 1}, +static arc arcs_77_1[1] = { + {21, 2}, }; -static arc arcs_77_2[1] = { - {22, 5}, +static arc arcs_77_2[2] = { + {13, 3}, + {25, 4}, }; -static arc arcs_77_3[1] = { - {22, 6}, +static arc arcs_77_3[2] = { + {9, 5}, + {15, 6}, }; -static arc arcs_77_4[4] = { - {162, 1}, - {29, 2}, - {31, 3}, - {0, 4}, +static arc arcs_77_4[1] = { + {26, 7}, }; -static arc arcs_77_5[2] = { - {28, 7}, - {0, 5}, +static arc arcs_77_5[1] = { + {15, 6}, }; static arc arcs_77_6[1] = { - {0, 6}, + {25, 4}, }; static arc arcs_77_7[1] = { - {31, 3}, + {0, 7}, }; static state states_77[8] = { - {3, arcs_77_0}, - {2, arcs_77_1}, - {1, arcs_77_2}, - {1, arcs_77_3}, - {4, arcs_77_4}, - {2, arcs_77_5}, + {1, arcs_77_0}, + {1, arcs_77_1}, + {2, arcs_77_2}, + {2, arcs_77_3}, + {1, arcs_77_4}, + {1, arcs_77_5}, {1, arcs_77_6}, {1, arcs_77_7}, }; -static arc arcs_78_0[1] = { - {22, 1}, +static arc arcs_78_0[3] = { + {163, 1}, + {31, 2}, + {33, 3}, }; -static arc arcs_78_1[3] = { - {157, 2}, - {27, 3}, +static arc arcs_78_1[2] = { + {30, 4}, {0, 1}, }; static arc arcs_78_2[1] = { - {0, 2}, + {24, 5}, }; static arc arcs_78_3[1] = { - {22, 2}, + {24, 6}, }; -static state states_78[4] = { - {1, arcs_78_0}, - {3, arcs_78_1}, +static arc arcs_78_4[4] = { + {163, 1}, + {31, 2}, + {33, 3}, + {0, 4}, +}; +static arc arcs_78_5[2] = { + {30, 7}, + {0, 5}, +}; +static arc arcs_78_6[1] = { + {0, 6}, +}; +static arc arcs_78_7[1] = { + {33, 3}, +}; +static state states_78[8] = { + {3, arcs_78_0}, + {2, arcs_78_1}, {1, arcs_78_2}, {1, arcs_78_3}, + {4, arcs_78_4}, + {2, arcs_78_5}, + {1, arcs_78_6}, + {1, arcs_78_7}, }; -static arc arcs_79_0[2] = { - {156, 1}, - {164, 1}, +static arc arcs_79_0[1] = { + {24, 1}, }; -static arc arcs_79_1[1] = { +static arc arcs_79_1[3] = { + {158, 2}, + {29, 3}, {0, 1}, }; -static state states_79[2] = { - {2, arcs_79_0}, - {1, arcs_79_1}, +static arc arcs_79_2[1] = { + {0, 2}, }; -static arc arcs_80_0[1] = { - {96, 1}, +static arc arcs_79_3[1] = { + {24, 2}, }; -static arc arcs_80_1[1] = { - {62, 2}, +static state states_79[4] = { + {1, arcs_79_0}, + {3, arcs_79_1}, + {1, arcs_79_2}, + {1, arcs_79_3}, }; -static arc arcs_80_2[1] = { - {97, 3}, +static arc arcs_80_0[2] = { + {157, 1}, + {165, 1}, }; -static arc arcs_80_3[1] = { - {107, 4}, +static arc arcs_80_1[1] = { + {0, 1}, }; -static arc arcs_80_4[2] = { - {163, 5}, - {0, 4}, -}; -static arc arcs_80_5[1] = { - {0, 5}, -}; -static state states_80[6] = { - {1, arcs_80_0}, +static state states_80[2] = { + {2, arcs_80_0}, {1, arcs_80_1}, - {1, arcs_80_2}, - {1, arcs_80_3}, - {2, arcs_80_4}, - {1, arcs_80_5}, }; static arc arcs_81_0[1] = { - {92, 1}, + {97, 1}, }; static arc arcs_81_1[1] = { - {108, 2}, + {64, 2}, }; -static arc arcs_81_2[2] = { - {163, 3}, - {0, 2}, +static arc arcs_81_2[1] = { + {98, 3}, }; static arc arcs_81_3[1] = { - {0, 3}, + {108, 4}, }; -static state states_81[4] = { +static arc arcs_81_4[2] = { + {164, 5}, + {0, 4}, +}; +static arc arcs_81_5[1] = { + {0, 5}, +}; +static state states_81[6] = { {1, arcs_81_0}, {1, arcs_81_1}, - {2, arcs_81_2}, + {1, arcs_81_2}, {1, arcs_81_3}, + {2, arcs_81_4}, + {1, arcs_81_5}, }; -static arc arcs_82_0[2] = { - {157, 1}, - {166, 1}, +static arc arcs_82_0[1] = { + {93, 1}, }; static arc arcs_82_1[1] = { - {0, 1}, + {109, 2}, }; -static state states_82[2] = { - {2, arcs_82_0}, +static arc arcs_82_2[2] = { + {164, 3}, + {0, 2}, +}; +static arc arcs_82_3[1] = { + {0, 3}, +}; +static state states_82[4] = { + {1, arcs_82_0}, {1, arcs_82_1}, + {2, arcs_82_2}, + {1, arcs_82_3}, }; -static arc arcs_83_0[1] = { - {96, 1}, +static arc arcs_83_0[2] = { + {158, 1}, + {167, 1}, }; static arc arcs_83_1[1] = { - {62, 2}, + {0, 1}, }; -static arc arcs_83_2[1] = { - {97, 3}, -}; -static arc arcs_83_3[1] = { - {109, 4}, -}; -static arc arcs_83_4[2] = { - {165, 5}, - {0, 4}, -}; -static arc arcs_83_5[1] = { - {0, 5}, -}; -static state states_83[6] = { - {1, arcs_83_0}, +static state states_83[2] = { + {2, arcs_83_0}, {1, arcs_83_1}, - {1, arcs_83_2}, - {1, arcs_83_3}, - {2, arcs_83_4}, - {1, arcs_83_5}, }; static arc arcs_84_0[1] = { - {92, 1}, + {97, 1}, }; static arc arcs_84_1[1] = { - {108, 2}, + {64, 2}, }; -static arc arcs_84_2[2] = { - {165, 3}, - {0, 2}, +static arc arcs_84_2[1] = { + {98, 3}, }; static arc arcs_84_3[1] = { - {0, 3}, + {110, 4}, }; -static state states_84[4] = { +static arc arcs_84_4[2] = { + {166, 5}, + {0, 4}, +}; +static arc arcs_84_5[1] = { + {0, 5}, +}; +static state states_84[6] = { {1, arcs_84_0}, {1, arcs_84_1}, - {2, arcs_84_2}, + {1, arcs_84_2}, {1, arcs_84_3}, + {2, arcs_84_4}, + {1, arcs_84_5}, }; static arc arcs_85_0[1] = { - {22, 1}, + {93, 1}, }; -static arc arcs_85_1[2] = { - {28, 0}, - {0, 1}, +static arc arcs_85_1[1] = { + {109, 2}, }; -static state states_85[2] = { +static arc arcs_85_2[2] = { + {166, 3}, + {0, 2}, +}; +static arc arcs_85_3[1] = { + {0, 3}, +}; +static state states_85[4] = { {1, arcs_85_0}, - {2, arcs_85_1}, + {1, arcs_85_1}, + {2, arcs_85_2}, + {1, arcs_85_3}, }; static arc arcs_86_0[1] = { - {19, 1}, + {24, 1}, }; -static arc arcs_86_1[1] = { +static arc arcs_86_1[2] = { + {30, 0}, {0, 1}, }; static state states_86[2] = { {1, arcs_86_0}, - {1, arcs_86_1}, + {2, arcs_86_1}, }; static arc arcs_87_0[1] = { - {169, 1}, + {21, 1}, }; -static arc arcs_87_1[2] = { +static arc arcs_87_1[1] = { + {0, 1}, +}; +static state states_87[2] = { + {1, arcs_87_0}, + {1, arcs_87_1}, +}; +static arc arcs_88_0[1] = { + {170, 1}, +}; +static arc arcs_88_1[2] = { {9, 2}, {0, 1}, }; -static arc arcs_87_2[1] = { +static arc arcs_88_2[1] = { {0, 2}, }; -static state states_87[3] = { - {1, arcs_87_0}, - {2, arcs_87_1}, - {1, arcs_87_2}, +static state states_88[3] = { + {1, arcs_88_0}, + {2, arcs_88_1}, + {1, arcs_88_2}, }; -static dfa dfas[88] = { +static dfa dfas[89] = { {256, "single_input", 0, 3, states_0, - "\004\050\014\000\000\000\000\240\340\151\070\220\045\200\040\000\000\206\220\014\002\002"}, + "\004\050\060\000\000\000\000\200\202\247\341\040\113\000\101\000\000\014\041\031\004\004"}, {257, "file_input", 0, 2, states_1, - "\204\050\014\000\000\000\000\240\340\151\070\220\045\200\040\000\000\206\220\014\002\002"}, + "\204\050\060\000\000\000\000\200\202\247\341\040\113\000\101\000\000\014\041\031\004\004"}, {258, "eval_input", 0, 3, states_2, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\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, "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {261, "funcdef", 0, 9, states_5, - "\000\010\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {262, "parameters", 0, 4, states_6, + {261, "decorated_thing", 0, 3, states_5, + "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {262, "funcdef", 0, 8, states_6, + "\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"}, - {263, "typedargslist", 0, 12, states_7, - "\000\040\010\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {264, "tname", 0, 4, states_8, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {265, "tfpdef", 0, 4, states_9, - "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {266, "tfplist", 0, 3, states_10, - "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {267, "varargslist", 0, 12, states_11, - "\000\040\010\240\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {268, "vname", 0, 2, states_12, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {269, "vfpdef", 0, 4, states_13, - "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {270, "vfplist", 0, 3, states_14, - "\000\040\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {271, "stmt", 0, 2, states_15, - "\000\050\014\000\000\000\000\240\340\151\070\220\045\200\040\000\000\206\220\014\002\002"}, - {272, "simple_stmt", 0, 4, states_16, - "\000\040\010\000\000\000\000\240\340\151\070\000\000\200\040\000\000\206\220\014\000\002"}, - {273, "small_stmt", 0, 2, states_17, - "\000\040\010\000\000\000\000\240\340\151\070\000\000\200\040\000\000\206\220\014\000\002"}, - {274, "expr_stmt", 0, 6, states_18, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {275, "augassign", 0, 2, states_19, - "\000\000\000\000\000\000\376\037\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {276, "del_stmt", 0, 3, states_20, - "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {277, "pass_stmt", 0, 2, states_21, + {264, "typedargslist", 0, 12, states_8, + "\000\040\040\200\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {265, "tname", 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, "tfpdef", 0, 4, states_10, + "\000\040\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {267, "tfplist", 0, 3, states_11, + "\000\040\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {268, "varargslist", 0, 12, states_12, + "\000\040\040\200\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {269, "vname", 0, 2, states_13, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {270, "vfpdef", 0, 4, states_14, + "\000\040\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {271, "vfplist", 0, 3, states_15, + "\000\040\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {272, "stmt", 0, 2, states_16, + "\000\050\060\000\000\000\000\200\202\247\341\040\113\000\101\000\000\014\041\031\004\004"}, + {273, "simple_stmt", 0, 4, states_17, + "\000\040\040\000\000\000\000\200\202\247\341\000\000\000\101\000\000\014\041\031\000\004"}, + {274, "small_stmt", 0, 2, states_18, + "\000\040\040\000\000\000\000\200\202\247\341\000\000\000\101\000\000\014\041\031\000\004"}, + {275, "expr_stmt", 0, 6, states_19, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {276, "augassign", 0, 2, states_20, + "\000\000\000\000\000\000\370\177\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {277, "del_stmt", 0, 3, states_21, "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {278, "flow_stmt", 0, 2, states_22, - "\000\000\000\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000\000\000\000\002"}, - {279, "break_stmt", 0, 2, states_23, - "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {280, "continue_stmt", 0, 2, states_24, - "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {281, "return_stmt", 0, 3, states_25, + {278, "pass_stmt", 0, 2, states_22, + "\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {279, "flow_stmt", 0, 2, states_23, + "\000\000\000\000\000\000\000\000\200\007\000\000\000\000\000\000\000\000\000\000\000\004"}, + {280, "break_stmt", 0, 2, states_24, "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {282, "yield_stmt", 0, 2, states_26, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002"}, - {283, "raise_stmt", 0, 7, states_27, + {281, "continue_stmt", 0, 2, states_25, "\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"}, - {284, "import_stmt", 0, 2, states_28, - "\000\000\000\000\000\000\000\000\000\050\000\000\000\000\000\000\000\000\000\000\000\000"}, - {285, "import_name", 0, 3, states_29, - "\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000"}, - {286, "import_from", 0, 8, states_30, + {282, "return_stmt", 0, 3, states_26, + "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"}, + {283, "yield_stmt", 0, 2, states_27, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004"}, + {284, "raise_stmt", 0, 7, states_28, + "\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"}, + {285, "import_stmt", 0, 2, states_29, + "\000\000\000\000\000\000\000\000\000\240\000\000\000\000\000\000\000\000\000\000\000\000"}, + {286, "import_name", 0, 3, states_30, "\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"}, - {287, "import_as_name", 0, 4, states_31, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {288, "dotted_as_name", 0, 4, states_32, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {289, "import_as_names", 0, 3, states_33, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {290, "dotted_as_names", 0, 2, states_34, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {291, "dotted_name", 0, 2, states_35, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {292, "global_stmt", 0, 3, states_36, - "\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000"}, - {293, "nonlocal_stmt", 0, 3, states_37, - "\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000"}, - {294, "assert_stmt", 0, 5, states_38, + {287, "import_from", 0, 8, states_31, + "\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000"}, + {288, "import_as_name", 0, 4, states_32, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {289, "dotted_as_name", 0, 4, 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, "import_as_names", 0, 3, states_34, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {291, "dotted_as_names", 0, 2, states_35, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {292, "dotted_name", 0, 2, states_36, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {293, "global_stmt", 0, 3, states_37, "\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"}, - {295, "compound_stmt", 0, 2, states_39, - "\000\010\004\000\000\000\000\000\000\000\000\220\045\000\000\000\000\000\000\000\002\000"}, - {296, "if_stmt", 0, 8, states_40, - "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, - {297, "while_stmt", 0, 8, states_41, - "\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"}, - {298, "for_stmt", 0, 10, states_42, + {294, "nonlocal_stmt", 0, 3, states_38, + "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"}, + {295, "assert_stmt", 0, 5, states_39, + "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"}, + {296, "compound_stmt", 0, 2, states_40, + "\000\010\020\000\000\000\000\000\000\000\000\040\113\000\000\000\000\000\000\000\004\000"}, + {297, "if_stmt", 0, 8, states_41, + "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + {298, "while_stmt", 0, 8, states_42, "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, - {299, "try_stmt", 0, 13, states_43, - "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"}, - {300, "with_stmt", 0, 6, states_44, - "\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"}, - {301, "with_var", 0, 3, states_45, - "\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000"}, - {302, "except_clause", 0, 5, states_46, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"}, - {303, "suite", 0, 5, states_47, - "\004\040\010\000\000\000\000\240\340\151\070\000\000\200\040\000\000\206\220\014\000\002"}, - {304, "testlist_safe", 0, 5, states_48, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {305, "old_test", 0, 2, states_49, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {306, "old_lambdef", 0, 5, states_50, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"}, - {307, "test", 0, 6, states_51, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {308, "or_test", 0, 2, states_52, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\040\000\000\206\220\014\000\000"}, - {309, "and_test", 0, 2, states_53, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\040\000\000\206\220\014\000\000"}, - {310, "not_test", 0, 3, states_54, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\040\000\000\206\220\014\000\000"}, - {311, "comparison", 0, 2, states_55, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {312, "comp_op", 0, 4, states_56, - "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\040\177\000\000\000\000\000\000"}, - {313, "expr", 0, 2, states_57, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {314, "xor_expr", 0, 2, states_58, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {315, "and_expr", 0, 2, states_59, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {316, "shift_expr", 0, 2, states_60, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {317, "arith_expr", 0, 2, states_61, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {318, "term", 0, 2, states_62, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {319, "factor", 0, 3, states_63, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {320, "power", 0, 4, states_64, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\220\014\000\000"}, - {321, "atom", 0, 11, states_65, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\220\014\000\000"}, - {322, "listmaker", 0, 5, states_66, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {323, "testlist_gexp", 0, 5, states_67, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {324, "lambdef", 0, 5, states_68, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"}, - {325, "trailer", 0, 7, states_69, - "\000\040\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\020\000\000\000"}, - {326, "subscriptlist", 0, 3, states_70, - "\000\040\210\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {327, "subscript", 0, 5, states_71, - "\000\040\210\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {328, "sliceop", 0, 3, states_72, - "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {329, "exprlist", 0, 3, states_73, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\000\000\000\000\206\220\014\000\000"}, - {330, "testlist", 0, 3, states_74, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {331, "dictsetmaker", 0, 8, states_75, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {332, "classdef", 0, 8, states_76, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000"}, - {333, "arglist", 0, 8, states_77, - "\000\040\010\240\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {334, "argument", 0, 4, states_78, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {335, "list_iter", 0, 2, states_79, - "\000\000\000\000\000\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\000"}, - {336, "list_for", 0, 6, states_80, - "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, - {337, "list_if", 0, 4, states_81, - "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, - {338, "gen_iter", 0, 2, states_82, - "\000\000\000\000\000\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\000"}, - {339, "gen_for", 0, 6, states_83, - "\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, - {340, "gen_if", 0, 4, states_84, - "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, - {341, "testlist1", 0, 2, states_85, - "\000\040\010\000\000\000\000\000\000\100\000\000\000\200\040\000\000\206\220\014\000\000"}, - {342, "encoding_decl", 0, 2, states_86, - "\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {343, "yield_expr", 0, 3, states_87, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002"}, + {299, "for_stmt", 0, 10, states_43, + "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, + {300, "try_stmt", 0, 13, states_44, + "\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"}, + {301, "with_stmt", 0, 6, states_45, + "\000\000\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"}, + {302, "with_var", 0, 3, states_46, + "\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000"}, + {303, "except_clause", 0, 5, states_47, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"}, + {304, "suite", 0, 5, states_48, + "\004\040\040\000\000\000\000\200\202\247\341\000\000\000\101\000\000\014\041\031\000\004"}, + {305, "testlist_safe", 0, 5, states_49, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {306, "old_test", 0, 2, states_50, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {307, "old_lambdef", 0, 5, states_51, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"}, + {308, "test", 0, 6, states_52, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {309, "or_test", 0, 2, states_53, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\100\000\000\014\041\031\000\000"}, + {310, "and_test", 0, 2, states_54, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\100\000\000\014\041\031\000\000"}, + {311, "not_test", 0, 3, states_55, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\100\000\000\014\041\031\000\000"}, + {312, "comparison", 0, 2, states_56, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {313, "comp_op", 0, 4, states_57, + "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\100\376\000\000\000\000\000\000"}, + {314, "expr", 0, 2, states_58, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {315, "xor_expr", 0, 2, states_59, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {316, "and_expr", 0, 2, states_60, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {317, "shift_expr", 0, 2, states_61, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {318, "arith_expr", 0, 2, states_62, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {319, "term", 0, 2, states_63, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {320, "factor", 0, 3, states_64, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {321, "power", 0, 4, states_65, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\040\031\000\000"}, + {322, "atom", 0, 11, states_66, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\040\031\000\000"}, + {323, "listmaker", 0, 5, states_67, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {324, "testlist_gexp", 0, 5, states_68, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {325, "lambdef", 0, 5, states_69, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"}, + {326, "trailer", 0, 7, states_70, + "\000\040\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\040\000\000\000"}, + {327, "subscriptlist", 0, 3, states_71, + "\000\040\040\002\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {328, "subscript", 0, 5, states_72, + "\000\040\040\002\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {329, "sliceop", 0, 3, states_73, + "\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {330, "exprlist", 0, 3, states_74, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\000\000\000\014\041\031\000\000"}, + {331, "testlist", 0, 3, states_75, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {332, "dictsetmaker", 0, 8, states_76, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {333, "classdef", 0, 8, states_77, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000"}, + {334, "arglist", 0, 8, states_78, + "\000\040\040\200\002\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {335, "argument", 0, 4, states_79, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {336, "list_iter", 0, 2, states_80, + "\000\000\000\000\000\000\000\000\000\000\000\040\002\000\000\000\000\000\000\000\000\000"}, + {337, "list_for", 0, 6, states_81, + "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, + {338, "list_if", 0, 4, states_82, + "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + {339, "gen_iter", 0, 2, states_83, + "\000\000\000\000\000\000\000\000\000\000\000\040\002\000\000\000\000\000\000\000\000\000"}, + {340, "gen_for", 0, 6, states_84, + "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, + {341, "gen_if", 0, 4, states_85, + "\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + {342, "testlist1", 0, 2, states_86, + "\000\040\040\000\000\000\000\000\000\000\001\000\000\000\101\000\000\014\041\031\000\000"}, + {343, "encoding_decl", 0, 2, states_87, + "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {344, "yield_expr", 0, 3, states_88, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004"}, }; -static label labels[170] = { +static label labels[171] = { {0, "EMPTY"}, {256, 0}, {4, 0}, + {273, 0}, + {296, 0}, + {257, 0}, {272, 0}, - {295, 0}, - {257, 0}, - {271, 0}, {0, 0}, {258, 0}, - {330, 0}, + {331, 0}, {259, 0}, {50, 0}, - {291, 0}, + {292, 0}, {7, 0}, - {333, 0}, + {334, 0}, {8, 0}, {260, 0}, {261, 0}, + {333, 0}, + {262, 0}, {1, "def"}, {1, 0}, - {262, 0}, + {263, 0}, {51, 0}, - {307, 0}, + {308, 0}, {11, 0}, - {303, 0}, - {263, 0}, - {265, 0}, + {304, 0}, + {264, 0}, + {266, 0}, {22, 0}, {12, 0}, {16, 0}, - {264, 0}, + {265, 0}, {36, 0}, - {266, 0}, {267, 0}, - {269, 0}, {268, 0}, {270, 0}, - {273, 0}, + {269, 0}, + {271, 0}, + {274, 0}, {13, 0}, - {274, 0}, - {276, 0}, + {275, 0}, {277, 0}, {278, 0}, - {284, 0}, - {292, 0}, + {279, 0}, + {285, 0}, {293, 0}, {294, 0}, - {275, 0}, - {343, 0}, + {295, 0}, + {276, 0}, + {344, 0}, {37, 0}, {38, 0}, {39, 0}, @@ -2112,36 +2127,35 @@ {47, 0}, {49, 0}, {1, "del"}, - {329, 0}, + {330, 0}, {1, "pass"}, - {279, 0}, {280, 0}, {281, 0}, + {282, 0}, + {284, 0}, {283, 0}, - {282, 0}, {1, "break"}, {1, "continue"}, {1, "return"}, {1, "raise"}, - {285, 0}, {286, 0}, + {287, 0}, {1, "import"}, - {290, 0}, + {291, 0}, {1, "from"}, {23, 0}, + {290, 0}, + {288, 0}, + {1, "as"}, {289, 0}, - {287, 0}, - {1, "as"}, - {288, 0}, {1, "global"}, {1, "nonlocal"}, {1, "assert"}, - {296, 0}, {297, 0}, {298, 0}, {299, 0}, {300, 0}, - {332, 0}, + {301, 0}, {1, "if"}, {1, "elif"}, {1, "else"}, @@ -2149,27 +2163,27 @@ {1, "for"}, {1, "in"}, {1, "try"}, - {302, 0}, + {303, 0}, {1, "finally"}, {1, "with"}, - {301, 0}, - {313, 0}, + {302, 0}, + {314, 0}, {1, "except"}, {5, 0}, {6, 0}, - {304, 0}, {305, 0}, - {308, 0}, {306, 0}, + {309, 0}, + {307, 0}, {1, "lambda"}, - {324, 0}, - {309, 0}, + {325, 0}, + {310, 0}, {1, "or"}, - {310, 0}, + {311, 0}, {1, "and"}, {1, "not"}, - {311, 0}, {312, 0}, + {313, 0}, {20, 0}, {21, 0}, {28, 0}, @@ -2177,53 +2191,53 @@ {30, 0}, {29, 0}, {1, "is"}, - {314, 0}, + {315, 0}, {18, 0}, - {315, 0}, + {316, 0}, {33, 0}, - {316, 0}, + {317, 0}, {19, 0}, - {317, 0}, + {318, 0}, {34, 0}, {35, 0}, - {318, 0}, + {319, 0}, {14, 0}, {15, 0}, - {319, 0}, + {320, 0}, {17, 0}, {24, 0}, {48, 0}, {32, 0}, - {320, 0}, {321, 0}, - {325, 0}, + {322, 0}, + {326, 0}, + {324, 0}, + {9, 0}, {323, 0}, - {9, 0}, - {322, 0}, {10, 0}, {26, 0}, - {331, 0}, + {332, 0}, {27, 0}, {2, 0}, {3, 0}, - {336, 0}, - {339, 0}, - {326, 0}, + {337, 0}, + {340, 0}, {327, 0}, {328, 0}, + {329, 0}, {1, "class"}, - {334, 0}, {335, 0}, - {337, 0}, + {336, 0}, {338, 0}, - {340, 0}, + {339, 0}, {341, 0}, {342, 0}, + {343, 0}, {1, "yield"}, }; grammar _PyParser_Grammar = { - 88, + 89, dfas, - {170, labels}, + {171, labels}, 256 }; Index: Python/ast.c =================================================================== --- Python/ast.c (revision 54035) +++ Python/ast.c (working copy) @@ -28,6 +28,7 @@ static asdl_seq *ast_for_exprlist(struct compiling *, const node *, expr_context_ty); static expr_ty ast_for_testlist(struct compiling *, const node *); static expr_ty ast_for_testlist_gexp(struct compiling *, const node *); +static stmt_ty ast_for_classdef(struct compiling *, const node *, asdl_seq *); /* Note different signature for ast_for_call */ static expr_ty ast_for_call(struct compiling *, const node *, expr_ty); @@ -973,28 +974,17 @@ } static stmt_ty -ast_for_funcdef(struct compiling *c, const node *n) +ast_for_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) { - /* funcdef: 'def' [decorators] NAME parameters ['->' test] ':' suite */ + /* funcdef: 'def' NAME parameters ['->' test] ':' suite */ identifier name; arguments_ty args; asdl_seq *body; - asdl_seq *decorator_seq = NULL; expr_ty returns = NULL; - int name_i; + int name_i = 1; REQ(n, funcdef); - if (NCH(n) == 6) { /* decorators are present */ - decorator_seq = ast_for_decorators(c, CHILD(n, 0)); - if (!decorator_seq) - return NULL; - name_i = 2; - } - else { - name_i = 1; - } - name = NEW_IDENTIFIER(CHILD(n, name_i)); if (!name) return NULL; @@ -1012,6 +1002,7 @@ name_i += 2; } body = ast_for_suite(c, CHILD(n, name_i + 3)); + if (!body) return NULL; @@ -1019,6 +1010,30 @@ n->n_col_offset, c->c_arena); } +static stmt_ty +ast_for_decorated_thing(struct compiling *c, const node *n) +{ + /* decorated_thing: decorators (classdef | funcdef) */ + stmt_ty thing = NULL; + asdl_seq *decorator_seq = NULL; + + REQ(n, decorated_thing); + + decorator_seq = ast_for_decorators(c, CHILD(n, 0)); + if (!decorator_seq) + return NULL; + + assert(TYPE(CHILD(n, 1)) == funcdef || + TYPE(CHILD(n, 1)) == classdef); + + if (TYPE(CHILD(n, 1)) == funcdef) { + thing = ast_for_funcdef(c, CHILD(n, 1), decorator_seq); + } else if (TYPE(CHILD(n, 1)) == classdef) { + thing = ast_for_classdef(c, CHILD(n, 1), decorator_seq); + } + return thing; +} + static expr_ty ast_for_lambdef(struct compiling *c, const node *n) { @@ -3030,7 +3045,7 @@ } static stmt_ty -ast_for_classdef(struct compiling *c, const node *n) +ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) { /* classdef: 'class' NAME ['(' testlist ')'] ':' suite */ asdl_seq *bases, *s; @@ -3046,16 +3061,16 @@ s = ast_for_suite(c, CHILD(n, 3)); if (!s) return NULL; - return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), NULL, s, LINENO(n), - n->n_col_offset, c->c_arena); + return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), NULL, s, decorator_seq, + LINENO(n), n->n_col_offset, c->c_arena); } /* check for empty base list */ if (TYPE(CHILD(n,3)) == RPAR) { s = ast_for_suite(c, CHILD(n,5)); if (!s) return NULL; - return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), NULL, s, LINENO(n), - n->n_col_offset, c->c_arena); + return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), NULL, s, decorator_seq, + LINENO(n), n->n_col_offset, c->c_arena); } /* else handle the base class list */ @@ -3066,8 +3081,8 @@ s = ast_for_suite(c, CHILD(n, 6)); if (!s) return NULL; - return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), bases, s, LINENO(n), - n->n_col_offset, c->c_arena); + return ClassDef(NEW_IDENTIFIER(CHILD(n, 1)), bases, s, decorator_seq, + LINENO(n), n->n_col_offset, c->c_arena); } static stmt_ty @@ -3113,7 +3128,7 @@ } else { /* compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt - | funcdef | classdef + | funcdef | classdef | decorated_thing */ node *ch = CHILD(n, 0); REQ(n, compound_stmt); @@ -3129,9 +3144,11 @@ case with_stmt: return ast_for_with_stmt(c, ch); case funcdef: - return ast_for_funcdef(c, ch); + return ast_for_funcdef(c, ch, NULL); case classdef: - return ast_for_classdef(c, ch); + return ast_for_classdef(c, ch, NULL); + case decorated_thing: + return ast_for_decorated_thing(c, ch); default: PyErr_Format(PyExc_SystemError, "unhandled small_stmt: TYPE=%d NCH=%d\n", Index: Python/symtable.c =================================================================== --- Python/symtable.c (revision 54035) +++ Python/symtable.c (working copy) @@ -968,8 +968,8 @@ s->v.FunctionDef.args->kw_defaults); if (!symtable_visit_annotations(st, s)) return 0; - if (s->v.FunctionDef.decorators) - VISIT_SEQ(st, expr, s->v.FunctionDef.decorators); + if (s->v.FunctionDef.decorator_list) + VISIT_SEQ(st, expr, s->v.FunctionDef.decorator_list); if (!symtable_enter_block(st, s->v.FunctionDef.name, FunctionBlock, (void *)s, s->lineno)) return 0; @@ -983,6 +983,8 @@ if (!symtable_add_def(st, s->v.ClassDef.name, DEF_LOCAL)) return 0; VISIT_SEQ(st, expr, s->v.ClassDef.bases); + if (s->v.ClassDef.decorator_list) + VISIT_SEQ(st, expr, s->v.ClassDef.decorator_list); if (!symtable_enter_block(st, s->v.ClassDef.name, ClassBlock, (void *)s, s->lineno)) return 0; Index: Python/compile.c =================================================================== --- Python/compile.c (revision 54035) +++ Python/compile.c (working copy) @@ -1440,7 +1440,7 @@ PyObject *first_const = Py_None; arguments_ty args = s->v.FunctionDef.args; expr_ty returns = s->v.FunctionDef.returns; - asdl_seq* decos = s->v.FunctionDef.decorators; + asdl_seq* decos = s->v.FunctionDef.decorator_list; stmt_ty st; int i, n, docstring, kw_default_count = 0, arglength; int num_annotations; @@ -1509,9 +1509,14 @@ static int compiler_class(struct compiler *c, stmt_ty s) { - int n; + int n, i; PyCodeObject *co; PyObject *str; + asdl_seq* decos = s->v.ClassDef.decorator_list; + + if (!compiler_decorators(c, decos)) + return 0; + /* push class name on stack, needed by BUILD_CLASS */ ADDOP_O(c, LOAD_CONST, s->v.ClassDef.name, consts); /* push the tuple of base classes on the stack */ @@ -1557,6 +1562,11 @@ ADDOP_I(c, CALL_FUNCTION, 0); ADDOP(c, BUILD_CLASS); + + /* decorators */ + for (i = 0; i < asdl_seq_LEN(decos); i++) { + ADDOP_I(c, CALL_FUNCTION, 1); + } if (!compiler_nameop(c, s->v.ClassDef.name, Store)) return 0; return 1; Index: Python/Python-ast.c =================================================================== --- Python/Python-ast.c (revision 54035) +++ Python/Python-ast.c (working copy) @@ -2,7 +2,7 @@ /* - __version__ 53986. + __version__ 54014. This module must be committed separately after each AST grammar change; The __version__ number is set to the revision number of the commit @@ -827,7 +827,7 @@ p->v.FunctionDef.name = name; p->v.FunctionDef.args = args; p->v.FunctionDef.body = body; - p->v.FunctionDef.decorators = decorators; + p->v.FunctionDef.decorator_list = decorators; p->v.FunctionDef.returns = returns; p->lineno = lineno; p->col_offset = col_offset; @@ -835,8 +835,8 @@ } stmt_ty -ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int lineno, int - col_offset, PyArena *arena) +ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, asdl_seq * + decorators, int lineno, int col_offset, PyArena *arena) { stmt_ty p; if (!name) { @@ -853,6 +853,7 @@ p->v.ClassDef.body = body; p->lineno = lineno; p->col_offset = col_offset; + p->v.ClassDef.decorator_list = decorators; return p; } @@ -1950,7 +1951,7 @@ if (PyObject_SetAttrString(result, "body", value) == -1) goto failed; Py_DECREF(value); - value = ast2obj_list(o->v.FunctionDef.decorators, ast2obj_expr); + value = ast2obj_list(o->v.FunctionDef.decorator_list, ast2obj_expr); if (!value) goto failed; if (PyObject_SetAttrString(result, "decorators", value) == -1) goto failed; @@ -1979,6 +1980,11 @@ if (PyObject_SetAttrString(result, "body", value) == -1) goto failed; Py_DECREF(value); + value = ast2obj_list(o->v.ClassDef.decorator_list, ast2obj_expr); + if (!value) goto failed; + if (PyObject_SetAttrString(result, "decorator", value) == -1) + goto failed; + Py_DECREF(value); break; case Return_kind: result = PyType_GenericNew(Return_type, NULL, NULL); Index: Include/graminit.h =================================================================== --- Include/graminit.h (revision 54035) +++ Include/graminit.h (working copy) @@ -3,86 +3,87 @@ #define eval_input 258 #define decorator 259 #define decorators 260 -#define funcdef 261 -#define parameters 262 -#define typedargslist 263 -#define tname 264 -#define tfpdef 265 -#define tfplist 266 -#define varargslist 267 -#define vname 268 -#define vfpdef 269 -#define vfplist 270 -#define stmt 271 -#define simple_stmt 272 -#define small_stmt 273 -#define expr_stmt 274 -#define augassign 275 -#define del_stmt 276 -#define pass_stmt 277 -#define flow_stmt 278 -#define break_stmt 279 -#define continue_stmt 280 -#define return_stmt 281 -#define yield_stmt 282 -#define raise_stmt 283 -#define import_stmt 284 -#define import_name 285 -#define import_from 286 -#define import_as_name 287 -#define dotted_as_name 288 -#define import_as_names 289 -#define dotted_as_names 290 -#define dotted_name 291 -#define global_stmt 292 -#define nonlocal_stmt 293 -#define assert_stmt 294 -#define compound_stmt 295 -#define if_stmt 296 -#define while_stmt 297 -#define for_stmt 298 -#define try_stmt 299 -#define with_stmt 300 -#define with_var 301 -#define except_clause 302 -#define suite 303 -#define testlist_safe 304 -#define old_test 305 -#define old_lambdef 306 -#define test 307 -#define or_test 308 -#define and_test 309 -#define not_test 310 -#define comparison 311 -#define comp_op 312 -#define expr 313 -#define xor_expr 314 -#define and_expr 315 -#define shift_expr 316 -#define arith_expr 317 -#define term 318 -#define factor 319 -#define power 320 -#define atom 321 -#define listmaker 322 -#define testlist_gexp 323 -#define lambdef 324 -#define trailer 325 -#define subscriptlist 326 -#define subscript 327 -#define sliceop 328 -#define exprlist 329 -#define testlist 330 -#define dictsetmaker 331 -#define classdef 332 -#define arglist 333 -#define argument 334 -#define list_iter 335 -#define list_for 336 -#define list_if 337 -#define gen_iter 338 -#define gen_for 339 -#define gen_if 340 -#define testlist1 341 -#define encoding_decl 342 -#define yield_expr 343 +#define decorated_thing 261 +#define funcdef 262 +#define parameters 263 +#define typedargslist 264 +#define tname 265 +#define tfpdef 266 +#define tfplist 267 +#define varargslist 268 +#define vname 269 +#define vfpdef 270 +#define vfplist 271 +#define stmt 272 +#define simple_stmt 273 +#define small_stmt 274 +#define expr_stmt 275 +#define augassign 276 +#define del_stmt 277 +#define pass_stmt 278 +#define flow_stmt 279 +#define break_stmt 280 +#define continue_stmt 281 +#define return_stmt 282 +#define yield_stmt 283 +#define raise_stmt 284 +#define import_stmt 285 +#define import_name 286 +#define import_from 287 +#define import_as_name 288 +#define dotted_as_name 289 +#define import_as_names 290 +#define dotted_as_names 291 +#define dotted_name 292 +#define global_stmt 293 +#define nonlocal_stmt 294 +#define assert_stmt 295 +#define compound_stmt 296 +#define if_stmt 297 +#define while_stmt 298 +#define for_stmt 299 +#define try_stmt 300 +#define with_stmt 301 +#define with_var 302 +#define except_clause 303 +#define suite 304 +#define testlist_safe 305 +#define old_test 306 +#define old_lambdef 307 +#define test 308 +#define or_test 309 +#define and_test 310 +#define not_test 311 +#define comparison 312 +#define comp_op 313 +#define expr 314 +#define xor_expr 315 +#define and_expr 316 +#define shift_expr 317 +#define arith_expr 318 +#define term 319 +#define factor 320 +#define power 321 +#define atom 322 +#define listmaker 323 +#define testlist_gexp 324 +#define lambdef 325 +#define trailer 326 +#define subscriptlist 327 +#define subscript 328 +#define sliceop 329 +#define exprlist 330 +#define testlist 331 +#define dictsetmaker 332 +#define classdef 333 +#define arglist 334 +#define argument 335 +#define list_iter 336 +#define list_for 337 +#define list_if 338 +#define gen_iter 339 +#define gen_for 340 +#define gen_if 341 +#define testlist1 342 +#define encoding_decl 343 +#define yield_expr 344 Index: Include/Python-ast.h =================================================================== --- Include/Python-ast.h (revision 54035) +++ Include/Python-ast.h (working copy) @@ -75,7 +75,7 @@ identifier name; arguments_ty args; asdl_seq *body; - asdl_seq *decorators; + asdl_seq *decorator_list; expr_ty returns; } FunctionDef; @@ -83,6 +83,7 @@ identifier name; asdl_seq *bases; asdl_seq *body; + asdl_seq *decorator_list; } ClassDef; struct { @@ -378,11 +379,12 @@ mod_ty _Py_Suite(asdl_seq * body, PyArena *arena); #define FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7) stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body, - asdl_seq * decorators, expr_ty returns, int lineno, int - col_offset, PyArena *arena); -#define ClassDef(a0, a1, a2, a3, a4, a5) _Py_ClassDef(a0, a1, a2, a3, a4, a5) -stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, int - lineno, int col_offset, PyArena *arena); + asdl_seq * decorator_list, expr_ty returns, int lineno, + int col_offset, PyArena *arena); +#define ClassDef(a0, a1, a2, a3, a4, a5, a6) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6) +stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, + asdl_seq * decorator_list, int lineno, int col_offset, + PyArena *arena); #define Return(a0, a1, a2, a3) _Py_Return(a0, a1, a2, a3) stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena); #define Delete(a0, a1, a2, a3) _Py_Delete(a0, a1, a2, a3) Index: Grammar/Grammar =================================================================== --- Grammar/Grammar (revision 54035) +++ Grammar/Grammar (working copy) @@ -21,7 +21,8 @@ decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE decorators: decorator+ -funcdef: [decorators] 'def' NAME parameters ['->' test] ':' suite +decorated_thing: decorators (classdef | funcdef) +funcdef: 'def' NAME parameters ['->' test] ':' suite parameters: '(' [typedargslist] ')' typedargslist: ((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])* [',' '**' tname] | '**' tname) @@ -66,7 +67,7 @@ nonlocal_stmt: 'nonlocal' NAME (',' NAME)* assert_stmt: 'assert' test [',' test] -compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef +compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated_thing if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite] while_stmt: 'while' test ':' suite ['else' ':' suite] for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] Index: Parser/Python.asdl =================================================================== --- Parser/Python.asdl (revision 54035) +++ Parser/Python.asdl (working copy) @@ -10,8 +10,9 @@ | Suite(stmt* body) stmt = FunctionDef(identifier name, arguments args, - stmt* body, expr* decorators, expr? returns) - | ClassDef(identifier name, expr* bases, stmt* body) + stmt* body, expr* decorator_list, expr? returns) + | ClassDef(identifier name, expr* bases, stmt* body, expr* + decorator_list) | Return(expr? value) | Delete(expr* targets) Index: Lib/symbol.py =================================================================== --- Lib/symbol.py (revision 54035) +++ Lib/symbol.py (working copy) @@ -15,89 +15,90 @@ eval_input = 258 decorator = 259 decorators = 260 -funcdef = 261 -parameters = 262 -typedargslist = 263 -tname = 264 -tfpdef = 265 -tfplist = 266 -varargslist = 267 -vname = 268 -vfpdef = 269 -vfplist = 270 -stmt = 271 -simple_stmt = 272 -small_stmt = 273 -expr_stmt = 274 -augassign = 275 -del_stmt = 276 -pass_stmt = 277 -flow_stmt = 278 -break_stmt = 279 -continue_stmt = 280 -return_stmt = 281 -yield_stmt = 282 -raise_stmt = 283 -import_stmt = 284 -import_name = 285 -import_from = 286 -import_as_name = 287 -dotted_as_name = 288 -import_as_names = 289 -dotted_as_names = 290 -dotted_name = 291 -global_stmt = 292 -nonlocal_stmt = 293 -assert_stmt = 294 -compound_stmt = 295 -if_stmt = 296 -while_stmt = 297 -for_stmt = 298 -try_stmt = 299 -with_stmt = 300 -with_var = 301 -except_clause = 302 -suite = 303 -testlist_safe = 304 -old_test = 305 -old_lambdef = 306 -test = 307 -or_test = 308 -and_test = 309 -not_test = 310 -comparison = 311 -comp_op = 312 -expr = 313 -xor_expr = 314 -and_expr = 315 -shift_expr = 316 -arith_expr = 317 -term = 318 -factor = 319 -power = 320 -atom = 321 -listmaker = 322 -testlist_gexp = 323 -lambdef = 324 -trailer = 325 -subscriptlist = 326 -subscript = 327 -sliceop = 328 -exprlist = 329 -testlist = 330 -dictsetmaker = 331 -classdef = 332 -arglist = 333 -argument = 334 -list_iter = 335 -list_for = 336 -list_if = 337 -gen_iter = 338 -gen_for = 339 -gen_if = 340 -testlist1 = 341 -encoding_decl = 342 -yield_expr = 343 +decorated_thing = 261 +funcdef = 262 +parameters = 263 +typedargslist = 264 +tname = 265 +tfpdef = 266 +tfplist = 267 +varargslist = 268 +vname = 269 +vfpdef = 270 +vfplist = 271 +stmt = 272 +simple_stmt = 273 +small_stmt = 274 +expr_stmt = 275 +augassign = 276 +del_stmt = 277 +pass_stmt = 278 +flow_stmt = 279 +break_stmt = 280 +continue_stmt = 281 +return_stmt = 282 +yield_stmt = 283 +raise_stmt = 284 +import_stmt = 285 +import_name = 286 +import_from = 287 +import_as_name = 288 +dotted_as_name = 289 +import_as_names = 290 +dotted_as_names = 291 +dotted_name = 292 +global_stmt = 293 +nonlocal_stmt = 294 +assert_stmt = 295 +compound_stmt = 296 +if_stmt = 297 +while_stmt = 298 +for_stmt = 299 +try_stmt = 300 +with_stmt = 301 +with_var = 302 +except_clause = 303 +suite = 304 +testlist_safe = 305 +old_test = 306 +old_lambdef = 307 +test = 308 +or_test = 309 +and_test = 310 +not_test = 311 +comparison = 312 +comp_op = 313 +expr = 314 +xor_expr = 315 +and_expr = 316 +shift_expr = 317 +arith_expr = 318 +term = 319 +factor = 320 +power = 321 +atom = 322 +listmaker = 323 +testlist_gexp = 324 +lambdef = 325 +trailer = 326 +subscriptlist = 327 +subscript = 328 +sliceop = 329 +exprlist = 330 +testlist = 331 +dictsetmaker = 332 +classdef = 333 +arglist = 334 +argument = 335 +list_iter = 336 +list_for = 337 +list_if = 338 +gen_iter = 339 +gen_for = 340 +gen_if = 341 +testlist1 = 342 +encoding_decl = 343 +yield_expr = 344 #--end constants-- sym_name = {} Index: Lib/compiler/transformer.py =================================================================== --- Lib/compiler/transformer.py (revision 54035) +++ Lib/compiler/transformer.py (working copy) @@ -164,6 +164,8 @@ return self.funcdef(node[1:]) if n == symbol.classdef: return self.classdef(node[1:]) + if n == symbol.decorated_thing: + return self.decorated_thing(node[1:]) raise WalkerError, ('unexpected node type', n) @@ -233,16 +235,11 @@ items.append(self.decorator(dec_nodelist[1:])) return Decorators(items) - def funcdef(self, nodelist): - # 0 1 2 4 -1 - # funcdef: [decorators] 'def' NAME parameters ['->' test] ':' suite + def funcdef(self, nodelist, decorators=None): + # 0 1 2 4 5 -2 -1 + # funcdef: 'def' NAME parameters ['->' test] ':' suite # parameters: '(' [typedargslist] ')' - if nodelist[0][0] == symbol.decorators: - decorators = self.decorators(nodelist[0][1:]) - nodelist = nodelist[1:] - else: - decorators = None - assert len(nodelist) in (5, 7) + assert len(nodelist) in (5, 7), len(nodelist) lineno = nodelist[0][2] name = nodelist[1][1] @@ -271,6 +268,21 @@ return Function(decorators, name, arguments, defaults, kwonly, returns, flags, doc, code, lineno=lineno) + def decorated_thing(self, nodelist): + # decorated_thing: decorators (classdef | funcdef) + assert len(nodelist) == 2 + assert nodelist[0][0] == symbol.decorators + + decorators = self.decorators(nodelist[0][1:]) + if nodelist[1][0] == symbol.funcdef: + thing = self.funcdef(nodelist[1][1:], decorators) + elif nodelist[1][0] == symbol.classdef: + thing = self.classdef(nodelist[1][1:], decorators) + else: + raise ValueError(nodelist[1][0]) + + return DecoratedThing(decorators, thing) + def lambdef(self, nodelist): # lambdef: 'lambda' [varargslist] ':' test if nodelist[2][0] == symbol.varargslist: @@ -287,7 +299,7 @@ flags, code, lineno=nodelist[1][2]) old_lambdef = lambdef - def classdef(self, nodelist): + def classdef(self, nodelist, decorators=None): # classdef: 'class' NAME ['(' [testlist] ')'] ':' suite name = nodelist[1][1] @@ -307,7 +319,7 @@ assert isinstance(code.nodes[0], Discard) del code.nodes[0] - return Class(name, bases, doc, code, lineno=nodelist[1][2]) + return Class(decorators, name, bases, doc, code, lineno=nodelist[1][2]) def stmt(self, nodelist): return self.com_stmt(nodelist[0]) @@ -1454,6 +1466,7 @@ } _legal_node_types = [ + symbol.decorated_thing, symbol.funcdef, symbol.classdef, symbol.stmt, Index: Lib/compiler/ast.py =================================================================== --- Lib/compiler/ast.py (revision 54035) +++ Lib/compiler/ast.py (working copy) @@ -311,7 +311,8 @@ return "CallFunc(%s, %s, %s, %s)" % (repr(self.node), repr(self.args), repr(self.star_args), repr(self.dstar_args)) class Class(Node): - def __init__(self, name, bases, doc, code, lineno=None): + def __init__(self, decorators, name, bases, doc, code, lineno=None): + self.decorators = decorators self.name = name self.bases = bases self.doc = doc @@ -333,7 +334,7 @@ return tuple(nodelist) def __repr__(self): - return "Class(%s, %s, %s, %s)" % (repr(self.name), repr(self.bases), repr(self.doc), repr(self.code)) + return "Class(%s, %s, %s, %s, %s)" % (repr(self.decorators), repr(self.name), repr(self.bases), repr(self.doc), repr(self.code)) class Compare(Node): def __init__(self, expr, ops, lineno=None): @@ -550,6 +551,27 @@ def __repr__(self): return "Function(%s, %s, %s, %s, %s, %s, %s, %s, %s)" % (repr(self.decorators), repr(self.name), repr(self.arguments), repr(self.defaults), repr(self.kwonlyargs), repr(self.returns), repr(self.flags), repr(self.doc), repr(self.code)) +class DecoratedThing(Node): + def __init__(self, decorators, thing): + self.decorators = decorators + self.thing = thing + self.lineno = thing.lineno + + def getChildren(self): + children = [] + children.append(self.decorators) + children.append(self.thing) + return tuple(children) + + def getChildNodes(self): + nodelist = [] + nodelist.append(self.decorators) + nodelist.extend(flatten_nodes(self.thing)) + return tuple(nodelist) + + def __repr__(self): + return "DecoratedThing(%s, %s)" % (repr(self.decorators), repr(self.thing)) + class GenExpr(Node): def __init__(self, code, lineno=None): self.code = code Index: Lib/test/test_inspect.py =================================================================== --- Lib/test/test_inspect.py (revision 54035) +++ Lib/test/test_inspect.py (working copy) @@ -218,7 +218,7 @@ fodderFile = mod2 def test_wrapped_decorator(self): - self.assertSourceEqual(mod2.wrapped, 14, 17) + self.assertSourceEqual(mod2.wrapped, 16, 17) def test_replacing_decorator(self): self.assertSourceEqual(mod2.gone, 9, 10) Index: Lib/test/test_compiler.py =================================================================== --- Lib/test/test_compiler.py (revision 54035) +++ Lib/test/test_compiler.py (working copy) @@ -50,8 +50,8 @@ try: compiler.compile(buf, basename, "exec") except Exception as e: - args = list(e.args) - args[0] += "[in file %s]" % basename + args = list(e.args) + args[0] = "%s [in file %s]" % (args[0], basename) e.args = tuple(args) raise Index: Lib/test/test_decorators.py =================================================================== --- Lib/test/test_decorators.py (revision 54035) +++ Lib/test/test_decorators.py (working copy) @@ -266,8 +266,32 @@ self.assertEqual(bar(), 42) self.assertEqual(actions, expected_actions) +class TestClassDecorators(unittest.TestCase): + + def test_simple(self): + def plain(x): + x.extra = 'Hello' + return x + @plain + class C(object): pass + self.assertEqual(C.extra, 'Hello') + + def test_double(self): + def ten(x): + x.extra = 10 + return x + def add_five(x): + x.extra += 5 + return x + + @add_five + @ten + class C(object): pass + self.assertEqual(C.extra, 15) + def test_main(): test_support.run_unittest(TestDecorators) + test_support.run_unittest(TestClassDecorators) if __name__=="__main__": test_main() Index: Modules/parsermodule.c =================================================================== --- Modules/parsermodule.c (revision 54035) +++ Modules/parsermodule.c (working copy) @@ -1568,7 +1568,7 @@ /* compound_stmt: - * if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef + * if_stmt | while_stmt | for_stmt | try_stmt | funcdef | classdef | decorated_thing */ static int validate_compound_stmt(node *tree) @@ -1587,7 +1587,8 @@ || (ntype == for_stmt) || (ntype == try_stmt) || (ntype == funcdef) - || (ntype == classdef)) + || (ntype == classdef) + || (ntype == decorated_thing)) res = validate_node(tree); else { res = 0; @@ -1597,7 +1598,6 @@ return (res); } - static int validate_yield_or_testlist(node *tree) { @@ -2554,29 +2554,41 @@ /* funcdef: * - * -6 -5 -4 -3 -2 -1 - * [decorators] 'def' NAME parameters ':' suite + * -5 -4 -3 -2 -1 + * 'def' NAME parameters ':' suite */ static int validate_funcdef(node *tree) { int nch = NCH(tree); int ok = (validate_ntype(tree, funcdef) - && ((nch == 5) || (nch == 6)) + && (nch == 5) && validate_name(RCHILD(tree, -5), "def") && validate_ntype(RCHILD(tree, -4), NAME) && validate_colon(RCHILD(tree, -2)) && validate_parameters(RCHILD(tree, -3)) && validate_suite(RCHILD(tree, -1))); - - if (ok && (nch == 6)) - ok = validate_decorators(CHILD(tree, 0)); - return ok; } +/* decorated_thing + * decorators (classdef | funcdef) + */ static int +validate_decorated_thing(node *tree) +{ + int nch = NCH(tree); + int ok = (validate_ntype(tree, decorated_thing) + && (nch == 2) + && validate_decorators(RCHILD(tree, -2)) + && (validate_funcdef(RCHILD(tree, -1)) + || validate_class(RCHILD(tree, -1))) + ); + return ok; +} + +static int validate_lambdef(node *tree) { int nch = NCH(tree); @@ -2919,6 +2931,9 @@ case classdef: res = validate_class(tree); break; + case decorated_thing: + res = validate_decorated_thing(tree); + break; /* * "Trivial" parse tree nodes. * (Why did I call these trivial?)