diff options
author | Guido van Rossum <guido@python.org> | 1996-07-30 16:49:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-07-30 16:49:37 (GMT) |
commit | 8861b74445560c078d11ff6800a3ce20a869ea93 (patch) | |
tree | 67426f7e9173e2c4a0f0040f1f97ed7c3270dbc2 /Python/graminit.c | |
parent | 3ecebf17324b138a9d10ad429c0ad55ab5de1682 (diff) | |
download | cpython-8861b74445560c078d11ff6800a3ce20a869ea93.zip cpython-8861b74445560c078d11ff6800a3ce20a869ea93.tar.gz cpython-8861b74445560c078d11ff6800a3ce20a869ea93.tar.bz2 |
Changes for slice and ellipses
Diffstat (limited to 'Python/graminit.c')
-rw-r--r-- | Python/graminit.c | 247 |
1 files changed, 144 insertions, 103 deletions
diff --git a/Python/graminit.c b/Python/graminit.c index f8b76ac..ce8061b 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -1031,169 +1031,204 @@ static state states_48[7] = { {1, arcs_48_5}, {1, arcs_48_6}, }; -static arc arcs_49_0[2] = { - {21, 1}, - {14, 2}, +static arc arcs_49_0[1] = { + {121, 1}, }; -static arc arcs_49_1[3] = { - {22, 3}, - {14, 2}, +static arc arcs_49_1[2] = { + {22, 2}, {0, 1}, }; static arc arcs_49_2[2] = { - {21, 4}, + {121, 1}, + {0, 2}, +}; +static state states_49[3] = { + {1, arcs_49_0}, + {2, arcs_49_1}, + {2, arcs_49_2}, +}; +static arc arcs_50_0[3] = { + {52, 1}, + {21, 2}, + {14, 3}, +}; +static arc arcs_50_1[1] = { + {52, 4}, +}; +static arc arcs_50_2[2] = { + {14, 3}, {0, 2}, }; -static arc arcs_49_3[2] = { +static arc arcs_50_3[3] = { {21, 5}, + {122, 6}, {0, 3}, }; -static arc arcs_49_4[1] = { - {0, 4}, +static arc arcs_50_4[1] = { + {52, 6}, }; -static arc arcs_49_5[2] = { - {22, 3}, +static arc arcs_50_5[2] = { + {122, 6}, {0, 5}, }; -static state states_49[6] = { - {2, arcs_49_0}, - {3, arcs_49_1}, - {2, arcs_49_2}, - {2, arcs_49_3}, - {1, arcs_49_4}, - {2, arcs_49_5}, +static arc arcs_50_6[1] = { + {0, 6}, +}; +static state states_50[7] = { + {3, arcs_50_0}, + {1, arcs_50_1}, + {2, arcs_50_2}, + {3, arcs_50_3}, + {1, arcs_50_4}, + {2, arcs_50_5}, + {1, arcs_50_6}, +}; +static arc arcs_51_0[1] = { + {14, 1}, +}; +static arc arcs_51_1[2] = { + {21, 2}, + {0, 1}, }; -static arc arcs_50_0[1] = { +static arc arcs_51_2[1] = { + {0, 2}, +}; +static state states_51[3] = { + {1, arcs_51_0}, + {2, arcs_51_1}, + {1, arcs_51_2}, +}; +static arc arcs_52_0[1] = { {57, 1}, }; -static arc arcs_50_1[2] = { +static arc arcs_52_1[2] = { {22, 2}, {0, 1}, }; -static arc arcs_50_2[2] = { +static arc arcs_52_2[2] = { {57, 1}, {0, 2}, }; -static state states_50[3] = { - {1, arcs_50_0}, - {2, arcs_50_1}, - {2, arcs_50_2}, +static state states_52[3] = { + {1, arcs_52_0}, + {2, arcs_52_1}, + {2, arcs_52_2}, }; -static arc arcs_51_0[1] = { +static arc arcs_53_0[1] = { {21, 1}, }; -static arc arcs_51_1[2] = { +static arc arcs_53_1[2] = { {22, 2}, {0, 1}, }; -static arc arcs_51_2[2] = { +static arc arcs_53_2[2] = { {21, 1}, {0, 2}, }; -static state states_51[3] = { - {1, arcs_51_0}, - {2, arcs_51_1}, - {2, arcs_51_2}, +static state states_53[3] = { + {1, arcs_53_0}, + {2, arcs_53_1}, + {2, arcs_53_2}, }; -static arc arcs_52_0[1] = { +static arc arcs_54_0[1] = { {21, 1}, }; -static arc arcs_52_1[1] = { +static arc arcs_54_1[1] = { {14, 2}, }; -static arc arcs_52_2[1] = { +static arc arcs_54_2[1] = { {21, 3}, }; -static arc arcs_52_3[2] = { +static arc arcs_54_3[2] = { {22, 4}, {0, 3}, }; -static arc arcs_52_4[2] = { +static arc arcs_54_4[2] = { {21, 1}, {0, 4}, }; -static state states_52[5] = { - {1, arcs_52_0}, - {1, arcs_52_1}, - {1, arcs_52_2}, - {2, arcs_52_3}, - {2, arcs_52_4}, +static state states_54[5] = { + {1, arcs_54_0}, + {1, arcs_54_1}, + {1, arcs_54_2}, + {2, arcs_54_3}, + {2, arcs_54_4}, }; -static arc arcs_53_0[1] = { - {121, 1}, +static arc arcs_55_0[1] = { + {123, 1}, }; -static arc arcs_53_1[1] = { +static arc arcs_55_1[1] = { {12, 2}, }; -static arc arcs_53_2[2] = { +static arc arcs_55_2[2] = { {16, 3}, {14, 4}, }; -static arc arcs_53_3[1] = { +static arc arcs_55_3[1] = { {9, 5}, }; -static arc arcs_53_4[1] = { +static arc arcs_55_4[1] = { {15, 6}, }; -static arc arcs_53_5[1] = { +static arc arcs_55_5[1] = { {18, 7}, }; -static arc arcs_53_6[1] = { +static arc arcs_55_6[1] = { {0, 6}, }; -static arc arcs_53_7[1] = { +static arc arcs_55_7[1] = { {14, 4}, }; -static state states_53[8] = { - {1, arcs_53_0}, - {1, arcs_53_1}, - {2, arcs_53_2}, - {1, arcs_53_3}, - {1, arcs_53_4}, - {1, arcs_53_5}, - {1, arcs_53_6}, - {1, arcs_53_7}, +static state states_55[8] = { + {1, arcs_55_0}, + {1, arcs_55_1}, + {2, arcs_55_2}, + {1, arcs_55_3}, + {1, arcs_55_4}, + {1, arcs_55_5}, + {1, arcs_55_6}, + {1, arcs_55_7}, }; -static arc arcs_54_0[1] = { - {122, 1}, +static arc arcs_56_0[1] = { + {124, 1}, }; -static arc arcs_54_1[2] = { +static arc arcs_56_1[2] = { {22, 2}, {0, 1}, }; -static arc arcs_54_2[2] = { - {122, 1}, +static arc arcs_56_2[2] = { + {124, 1}, {0, 2}, }; -static state states_54[3] = { - {1, arcs_54_0}, - {2, arcs_54_1}, - {2, arcs_54_2}, +static state states_56[3] = { + {1, arcs_56_0}, + {2, arcs_56_1}, + {2, arcs_56_2}, }; -static arc arcs_55_0[1] = { +static arc arcs_57_0[1] = { {21, 1}, }; -static arc arcs_55_1[2] = { +static arc arcs_57_1[2] = { {20, 2}, {0, 1}, }; -static arc arcs_55_2[1] = { +static arc arcs_57_2[1] = { {21, 3}, }; -static arc arcs_55_3[1] = { +static arc arcs_57_3[1] = { {0, 3}, }; -static state states_55[4] = { - {1, arcs_55_0}, - {2, arcs_55_1}, - {1, arcs_55_2}, - {1, arcs_55_3}, +static state states_57[4] = { + {1, arcs_57_0}, + {2, arcs_57_1}, + {1, arcs_57_2}, + {1, arcs_57_3}, }; -static dfa dfas[56] = { +static dfa dfas[58] = { {256, "single_input", 0, 3, states_0, - "\004\030\001\000\140\341\153\001\071\000\001\000\140\104\171\002"}, + "\004\030\001\000\140\341\153\001\071\000\001\000\140\104\171\010"}, {257, "file_input", 0, 2, states_1, - "\204\030\001\000\140\341\153\001\071\000\001\000\140\104\171\002"}, + "\204\030\001\000\140\341\153\001\071\000\001\000\140\104\171\010"}, {258, "eval_input", 0, 3, states_2, "\000\020\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, {259, "funcdef", 0, 6, states_3, @@ -1207,7 +1242,7 @@ static dfa dfas[56] = { {263, "fplist", 0, 3, states_7, "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {264, "stmt", 0, 2, states_8, - "\000\030\001\000\140\341\153\001\071\000\001\000\140\104\171\002"}, + "\000\030\001\000\140\341\153\001\071\000\001\000\140\104\171\010"}, {265, "simple_stmt", 0, 4, states_9, "\000\020\001\000\140\341\153\001\000\000\001\000\140\104\171\000"}, {266, "small_stmt", 0, 2, states_10, @@ -1243,7 +1278,7 @@ static dfa dfas[56] = { {281, "exec_stmt", 0, 7, states_25, "\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"}, {282, "compound_stmt", 0, 2, states_26, - "\000\010\000\000\000\000\000\000\071\000\000\000\000\000\000\002"}, + "\000\010\000\000\000\000\000\000\071\000\000\000\000\000\000\010"}, {283, "if_stmt", 0, 8, states_27, "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000"}, {284, "while_stmt", 0, 8, states_28, @@ -1288,22 +1323,26 @@ static dfa dfas[56] = { "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100\000"}, {304, "trailer", 0, 7, states_48, "\000\000\001\000\000\000\020\000\000\000\000\000\000\100\000\000"}, - {305, "subscript", 0, 6, states_49, - "\000\120\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, - {306, "exprlist", 0, 3, states_50, + {305, "subscriptlist", 0, 3, states_49, + "\000\120\001\000\000\000\020\000\000\000\001\000\140\104\171\000"}, + {306, "subscript", 0, 7, states_50, + "\000\120\001\000\000\000\020\000\000\000\001\000\140\104\171\000"}, + {307, "sliceop", 0, 3, states_51, + "\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {308, "exprlist", 0, 3, states_52, "\000\020\001\000\000\000\000\000\000\000\000\000\140\104\071\000"}, - {307, "testlist", 0, 3, states_51, + {309, "testlist", 0, 3, states_53, "\000\020\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, - {308, "dictmaker", 0, 5, states_52, + {310, "dictmaker", 0, 5, states_54, "\000\020\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, - {309, "classdef", 0, 8, states_53, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002"}, - {310, "arglist", 0, 3, states_54, + {311, "classdef", 0, 8, states_55, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010"}, + {312, "arglist", 0, 3, states_56, "\000\020\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, - {311, "argument", 0, 4, states_55, + {313, "argument", 0, 4, states_57, "\000\020\001\000\000\000\000\000\000\000\001\000\140\104\171\000"}, }; -static label labels[123] = { +static label labels[125] = { {0, "EMPTY"}, {256, 0}, {4, 0}, @@ -1313,7 +1352,7 @@ static label labels[123] = { {264, 0}, {0, 0}, {258, 0}, - {307, 0}, + {309, 0}, {259, 0}, {1, "def"}, {1, 0}, @@ -1343,7 +1382,7 @@ static label labels[123] = { {281, 0}, {1, "print"}, {1, "del"}, - {306, 0}, + {308, 0}, {1, "pass"}, {272, 0}, {273, 0}, @@ -1367,7 +1406,7 @@ static label labels[123] = { {284, 0}, {285, 0}, {286, 0}, - {309, 0}, + {311, 0}, {1, "if"}, {1, "elif"}, {1, "else"}, @@ -1417,20 +1456,22 @@ static label labels[123] = { {9, 0}, {10, 0}, {26, 0}, - {308, 0}, + {310, 0}, {27, 0}, {25, 0}, {2, 0}, {3, 0}, {1, "lambda"}, - {310, 0}, + {312, 0}, {305, 0}, + {306, 0}, + {307, 0}, {1, "class"}, - {311, 0}, + {313, 0}, }; grammar gram = { - 56, + 58, dfas, - {123, labels}, + {125, labels}, 256 }; |