From 434d0828d81855692d45c3fdc0905a67c17d83ba Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Thu, 24 Aug 2000 20:11:32 +0000 Subject: Support for three-token characters (**=, >>=, <<=) which was written by Michael Hudson, and support in general for the augmented assignment syntax. The graminit.c patch is large! --- Grammar/Grammar | 7 +- Parser/grammar.c | 12 + Parser/tokenizer.c | 94 ++++ Python/ceval.c | 205 ++++++- Python/compile.c | 221 ++++++-- Python/graminit.c | 1558 +++++++++++++++++++++++++++------------------------- Python/import.c | 2 +- 7 files changed, 1305 insertions(+), 794 deletions(-) diff --git a/Grammar/Grammar b/Grammar/Grammar index df4faa7..4df0623 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -37,9 +37,10 @@ fplist: fpdef (',' fpdef)* [','] stmt: simple_stmt | compound_stmt simple_stmt: small_stmt (';' small_stmt)* [';'] NEWLINE #small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | access_stmt | exec_stmt -small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt -expr_stmt: testlist ('=' testlist)* -# For assignments, additional restrictions enforced by the interpreter +small_stmt: expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt +expr_stmt: testlist (augassign testlist | ('=' testlist)*) +augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=' | '**=' +# For normal assignments, additional restrictions enforced by the interpreter print_stmt: 'print' ( [ test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ] ) del_stmt: 'del' exprlist pass_stmt: 'pass' diff --git a/Parser/grammar.c b/Parser/grammar.c index 07e59ff..c4efce7 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -211,6 +211,18 @@ translabel(grammar *g, label *lb) printf("Unknown OP label %s\n", lb->lb_str); } + else if (lb->lb_str[2] && lb->lb_str[3] && lb->lb_str[4] == lb->lb_str[0]) { + int type = (int) PyToken_ThreeChars(lb->lb_str[1], + lb->lb_str[2], + lb->lb_str[3]); + if (type != OP) { + lb->lb_type = type; + lb->lb_str = NULL; + } + else + printf("Unknown OP label %s\n", + lb->lb_str); + } else printf("Can't translate STRING label %s\n", lb->lb_str); diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 160f6ba..eb84d14 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -78,6 +78,17 @@ char *_PyParser_TokenNames[] = { "LEFTSHIFT", "RIGHTSHIFT", "DOUBLESTAR", + "PLUSEQUAL", + "MINEQUAL", + "STAREQUAL", + "SLASHEQUAL", + "PERCENTEQUAL", + "AMPEREQUAL", + "VBAREQUAL", + "CIRCUMFLEXEQUAL", + "LEFTSHIFTEQUAL", + "RIGHTSHIFTEQUAL", + "DOUBLESTAREQUAL", /* This table must match the #defines in token.h! */ "OP", "", @@ -388,15 +399,91 @@ PyToken_TwoChars(int c1, int c2) case '>': return RIGHTSHIFT; } break; + case '+': + switch (c2) { + case '=': return PLUSEQUAL; + } + break; + case '-': + switch (c2) { + case '=': return MINEQUAL; + } + break; case '*': switch (c2) { case '*': return DOUBLESTAR; + case '=': return STAREQUAL; + } + break; + case '/': + switch (c2) { + case '=': return SLASHEQUAL; + } + break; + case '|': + switch (c2) { + case '=': return VBAREQUAL; + } + break; + case '%': + switch (c2) { + case '=': return PERCENTEQUAL; + } + break; + case '&': + switch (c2) { + case '=': return AMPEREQUAL; + } + break; + case '^': + switch (c2) { + case '=': return CIRCUMFLEXEQUAL; } break; } return OP; } +int +PyToken_ThreeChars(int c1, int c2, int c3) +{ + switch (c1) { + case '<': + switch (c2) { + case '<': + switch (c3) { + case '=': + return LEFTSHIFTEQUAL; + break; + } + break; + } + break; + case '>': + switch (c2) { + case '>': + switch (c3) { + case '=': + return RIGHTSHIFTEQUAL; + break; + } + break; + } + break; + case '*': + switch (c2) { + case '*': + switch (c3) { + case '=': + return DOUBLESTAREQUAL; + break; + } + break; + } + break; + } + return OP; +} static int indenterror(struct tok_state *tok) @@ -770,6 +857,13 @@ PyTokenizer_Get(register struct tok_state *tok, char **p_start, int c2 = tok_nextc(tok); int token = PyToken_TwoChars(c, c2); if (token != OP) { + int c3 = tok_nextc(tok); + int token3 = PyToken_ThreeChars(c, c2, c3); + if (token3 != OP) { + token = token3; + } else { + tok_backup(tok, c3); + } *p_start = tok->start; *p_end = tok->cur; return token; diff --git a/Python/ceval.c b/Python/ceval.c index fb7b5bc..3488b9c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -669,12 +669,69 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, PUSH(w); continue; + case ROT_FOUR: + u = POP(); + v = POP(); + w = POP(); + x = POP(); + PUSH(u); + PUSH(x); + PUSH(w); + PUSH(v); + continue; + case DUP_TOP: v = TOP(); Py_INCREF(v); PUSH(v); continue; + case DUP_TOPX: + switch (oparg) { + case 5: + case 4: + case 3: + case 2: + case 1: + x = POP(); + if (oparg == 1) break; + w = POP(); + if (oparg == 2) break; + v = POP(); + if (oparg == 3) break; + u = POP(); + if (oparg == 4) break; + t = POP(); + break; + default: + fprintf(stderr, "Invalid argument to DUP_TOPX: %d!\n", oparg); + PyErr_SetString(PyExc_SystemError, + "invalid argument to DUP_TOPX"); + x = NULL; + } + if (x == NULL) + break; + switch (oparg) { + case 5: PUSH(t); + Py_INCREF(t); /* Fallthrough */ + case 4: PUSH(u); + Py_INCREF(u); /* Fallthrough */ + case 3: PUSH(v); + Py_INCREF(v); /* Fallthrough */ + case 2: PUSH(w); + Py_INCREF(w); /* Fallthrough */ + case 1: PUSH(x); + Py_INCREF(x); /* Fallthrough */ + } + switch (oparg) { + case 5: PUSH(t); /* Fallthrough */ + case 4: PUSH(u); /* Fallthrough */ + case 3: PUSH(v); /* Fallthrough */ + case 2: PUSH(w); /* Fallthrough */ + case 1: PUSH(x); /* Fallthrough */ + } + continue; + case UNARY_POSITIVE: v = POP(); x = PyNumber_Positive(v); @@ -890,7 +947,147 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, PUSH(x); if (x != NULL) continue; break; + + case INPLACE_POWER: + w = POP(); + v = POP(); + x = PyNumber_InPlacePower(v, w, Py_None); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_MULTIPLY: + w = POP(); + v = POP(); + x = PyNumber_InPlaceMultiply(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_DIVIDE: + w = POP(); + v = POP(); + x = PyNumber_InPlaceDivide(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_MODULO: + w = POP(); + v = POP(); + x = PyNumber_InPlaceRemainder(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_ADD: + w = POP(); + v = POP(); + if (PyInt_Check(v) && PyInt_Check(w)) { + /* INLINE: int + int */ + register long a, b, i; + a = PyInt_AS_LONG(v); + b = PyInt_AS_LONG(w); + i = a + b; + if ((i^a) < 0 && (i^b) < 0) { + PyErr_SetString(PyExc_OverflowError, + "integer addition"); + x = NULL; + } + else + x = PyInt_FromLong(i); + } + else + x = PyNumber_InPlaceAdd(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + case INPLACE_SUBTRACT: + w = POP(); + v = POP(); + if (PyInt_Check(v) && PyInt_Check(w)) { + /* INLINE: int - int */ + register long a, b, i; + a = PyInt_AS_LONG(v); + b = PyInt_AS_LONG(w); + i = a - b; + if ((i^a) < 0 && (i^~b) < 0) { + PyErr_SetString(PyExc_OverflowError, + "integer subtraction"); + x = NULL; + } + else + x = PyInt_FromLong(i); + } + else + x = PyNumber_InPlaceSubtract(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_LSHIFT: + w = POP(); + v = POP(); + x = PyNumber_InPlaceLshift(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_RSHIFT: + w = POP(); + v = POP(); + x = PyNumber_InPlaceRshift(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_AND: + w = POP(); + v = POP(); + x = PyNumber_InPlaceAnd(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_XOR: + w = POP(); + v = POP(); + x = PyNumber_InPlaceXor(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + + case INPLACE_OR: + w = POP(); + v = POP(); + x = PyNumber_InPlaceOr(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + case SLICE+0: case SLICE+1: case SLICE+2: @@ -1063,6 +1260,10 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, stream = NULL; break; + +#ifdef CASE_TOO_BIG + default: switch (opcode) { +#endif case BREAK_LOOP: why = WHY_BREAK; break; @@ -1180,10 +1381,6 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, PyErr_SetObject(PyExc_NameError, w); break; -#ifdef CASE_TOO_BIG - default: switch (opcode) { -#endif - case UNPACK_SEQUENCE: v = POP(); if (PyTuple_Check(v)) { diff --git a/Python/compile.c b/Python/compile.c index 3b7c87a..c761e5e 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -391,12 +391,14 @@ static void com_list(struct compiling *, node *, int); static void com_list_iter(struct compiling *, node *, node *, char *); static int com_argdefs(struct compiling *, node *); static int com_newlocal(struct compiling *, char *); -static void com_assign(struct compiling *, node *, int); +static void com_assign(struct compiling *, node *, int, node *); +static void com_assign_name(struct compiling *, node *, int); static PyCodeObject *icompile(struct _node *, struct compiling *); static PyCodeObject *jcompile(struct _node *, char *, struct compiling *); static PyObject *parsestrplus(node *); static PyObject *parsestr(char *); +static node *get_rawdocstring(node *); static int com_init(struct compiling *c, char *filename) @@ -995,7 +997,7 @@ com_list_for(struct compiling *c, node *n, node *e, char *t) com_addoparg(c, SET_LINENO, n->n_lineno); com_addfwref(c, FOR_LOOP, &anchor); com_push(c, 1); - com_assign(c, CHILD(n, 1), OP_ASSIGN); + com_assign(c, CHILD(n, 1), OP_ASSIGN, NULL); c->c_loops++; com_list_iter(c, n, e, t); c->c_loops--; @@ -1203,6 +1205,59 @@ com_slice(struct compiling *c, node *n, int op) } static void +com_augassign_slice(struct compiling *c, node *n, int opcode, node *augn) +{ + if (NCH(n) == 1) { + com_addbyte(c, DUP_TOP); + com_push(c, 1); + com_addbyte(c, SLICE); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_addbyte(c, ROT_TWO); + com_addbyte(c, STORE_SLICE); + com_pop(c, 2); + } else if (NCH(n) == 2 && TYPE(CHILD(n, 0)) != COLON) { + com_node(c, CHILD(n, 0)); + com_addoparg(c, DUP_TOPX, 2); + com_push(c, 2); + com_addbyte(c, SLICE+1); + com_pop(c, 1); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_addbyte(c, ROT_THREE); + com_addbyte(c, STORE_SLICE+1); + com_pop(c, 3); + } else if (NCH(n) == 2) { + com_node(c, CHILD(n, 1)); + com_addoparg(c, DUP_TOPX, 2); + com_push(c, 2); + com_addbyte(c, SLICE+2); + com_pop(c, 1); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_addbyte(c, ROT_THREE); + com_addbyte(c, STORE_SLICE+2); + com_pop(c, 3); + } else { + com_node(c, CHILD(n, 0)); + com_node(c, CHILD(n, 2)); + com_addoparg(c, DUP_TOPX, 3); + com_push(c, 3); + com_addbyte(c, SLICE+3); + com_pop(c, 2); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_addbyte(c, ROT_FOUR); + com_addbyte(c, STORE_SLICE+3); + com_pop(c, 4); + } +} + +static void com_argument(struct compiling *c, node *n, PyObject **pkeywords) { node *m; @@ -1376,7 +1431,7 @@ com_subscript(struct compiling *c, node *n) } static void -com_subscriptlist(struct compiling *c, node *n, int assigning) +com_subscriptlist(struct compiling *c, node *n, int assigning, node *augn) { int i, op; REQ(n, subscriptlist); @@ -1388,11 +1443,20 @@ com_subscriptlist(struct compiling *c, node *n, int assigning) || (NCH(sub) > 1 && TYPE(CHILD(sub, 1)) == COLON)) && (TYPE(CHILD(sub,NCH(sub)-1)) != sliceop)) { - if (assigning == OP_APPLY) + switch (assigning) { + case OP_DELETE: + op = DELETE_SLICE; + break; + case OP_ASSIGN: + op = STORE_SLICE; + break; + case OP_APPLY: op = SLICE; - else - op = ((assigning == OP_ASSIGN) ? - STORE_SLICE : DELETE_SLICE); + break; + default: + com_augassign_slice(c, sub, assigning, augn); + return; + } com_slice(c, sub, op); if (op == STORE_SLICE) com_pop(c, 2); @@ -1410,17 +1474,30 @@ com_subscriptlist(struct compiling *c, node *n, int assigning) com_addoparg(c, BUILD_TUPLE, i); com_pop(c, i-1); } - if (assigning == OP_APPLY) { - op = BINARY_SUBSCR; - i = 1; - } - else if (assigning == OP_ASSIGN) { + switch (assigning) { + case OP_DELETE: + op = DELETE_SUBSCR; + i = 2; + break; + default: + case OP_ASSIGN: op = STORE_SUBSCR; i = 3; + break; + case OP_APPLY: + op = BINARY_SUBSCR; + i = 1; + break; } - else { - op = DELETE_SUBSCR; - i = 2; + if (assigning > OP_APPLY) { + com_addoparg(c, DUP_TOPX, 2); + com_push(c, 2); + com_addbyte(c, BINARY_SUBSCR); + com_pop(c, 1); + com_node(c, augn); + com_addbyte(c, assigning); + com_pop(c, 1); + com_addbyte(c, ROT_THREE); } com_addbyte(c, op); com_pop(c, i); @@ -1438,7 +1515,7 @@ com_apply_trailer(struct compiling *c, node *n) com_select_member(c, CHILD(n, 1)); break; case LSQB: - com_subscriptlist(c, CHILD(n, 1), OP_APPLY); + com_subscriptlist(c, CHILD(n, 1), OP_APPLY, NULL); break; default: com_error(c, PyExc_SystemError, @@ -1832,8 +1909,21 @@ com_list(struct compiling *c, node *n, int toplevel) /* Begin of assignment compilation */ -static void com_assign_name(struct compiling *, node *, int); -static void com_assign(struct compiling *, node *, int); + +static void +com_augassign_attr(struct compiling *c, node *n, int opcode, node *augn) +{ + com_addbyte(c, DUP_TOP); + com_push(c, 1); + com_addopname(c, LOAD_ATTR, n); + com_pop(c, 1); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_addbyte(c, ROT_TWO); + com_addopname(c, STORE_ATTR, n); + com_pop(c, 2); +} static void com_assign_attr(struct compiling *c, node *n, int assigning) @@ -1843,7 +1933,7 @@ com_assign_attr(struct compiling *c, node *n, int assigning) } static void -com_assign_trailer(struct compiling *c, node *n, int assigning) +com_assign_trailer(struct compiling *c, node *n, int assigning, node *augn) { REQ(n, trailer); switch (TYPE(CHILD(n, 0))) { @@ -1852,10 +1942,13 @@ com_assign_trailer(struct compiling *c, node *n, int assigning) "can't assign to function call"); break; case DOT: /* '.' NAME */ - com_assign_attr(c, CHILD(n, 1), assigning); + if (assigning > OP_APPLY) + com_augassign_attr(c, CHILD(n, 1), assigning, augn); + else + com_assign_attr(c, CHILD(n, 1), assigning); break; case LSQB: /* '[' subscriptlist ']' */ - com_subscriptlist(c, CHILD(n, 1), assigning); + com_subscriptlist(c, CHILD(n, 1), assigning, augn); break; default: com_error(c, PyExc_SystemError, "unknown trailer type"); @@ -1874,7 +1967,19 @@ com_assign_sequence(struct compiling *c, node *n, int assigning) com_push(c, i-1); } for (i = 0; i < NCH(n); i += 2) - com_assign(c, CHILD(n, i), assigning); + com_assign(c, CHILD(n, i), assigning, NULL); +} + +static void +com_augassign_name(struct compiling *c, node *n, int opcode, node *augn) +{ + REQ(n, NAME); + com_addopname(c, LOAD_NAME, n); + com_push(c, 1); + com_node(c, augn); + com_addbyte(c, opcode); + com_pop(c, 1); + com_assign_name(c, n, OP_ASSIGN); } static void @@ -1887,7 +1992,7 @@ com_assign_name(struct compiling *c, node *n, int assigning) } static void -com_assign(struct compiling *c, node *n, int assigning) +com_assign(struct compiling *c, node *n, int assigning, node *augn) { /* Loop to avoid trivial recursion */ for (;;) { @@ -1896,6 +2001,11 @@ com_assign(struct compiling *c, node *n, int assigning) case exprlist: case testlist: if (NCH(n) > 1) { + if (assigning > OP_APPLY) { + com_error(c, PyExc_SyntaxError, + "augmented assign to tuple not possible"); + return; + } com_assign_sequence(c, n, assigning); return; } @@ -1940,7 +2050,7 @@ com_assign(struct compiling *c, node *n, int assigning) com_apply_trailer(c, CHILD(n, i)); } /* NB i is still alive */ com_assign_trailer(c, - CHILD(n, i), assigning); + CHILD(n, i), assigning, augn); return; } n = CHILD(n, 0); @@ -1956,6 +2066,11 @@ com_assign(struct compiling *c, node *n, int assigning) "can't assign to ()"); return; } + if (assigning > OP_APPLY) { + com_error(c, PyExc_SyntaxError, + "augmented assign to tuple not possible"); + return; + } break; case LSQB: n = CHILD(n, 1); @@ -1964,10 +2079,20 @@ com_assign(struct compiling *c, node *n, int assigning) "can't assign to []"); return; } + if (assigning > OP_APPLY) { + com_error(c, PyExc_SyntaxError, + "augmented assign to list not possible"); + return; + } com_assign_sequence(c, n, assigning); return; case NAME: - com_assign_name(c, CHILD(n, 0), assigning); + if (assigning > OP_APPLY) + com_augassign_name(c, CHILD(n, 0), + assigning, augn); + else + com_assign_name(c, CHILD(n, 0), + assigning); return; default: com_error(c, PyExc_SyntaxError, @@ -1991,31 +2116,61 @@ com_assign(struct compiling *c, node *n, int assigning) } } -/* Forward */ static node *get_rawdocstring(node *); +static void +com_augassign(struct compiling *c, node *n) +{ + int opcode; + + switch (STR(CHILD(CHILD(n, 1), 0))[0]) { + case '+': opcode = INPLACE_ADD; break; + case '-': opcode = INPLACE_SUBTRACT; break; + case '/': opcode = INPLACE_DIVIDE; break; + case '%': opcode = INPLACE_MODULO; break; + case '<': opcode = INPLACE_LSHIFT; break; + case '>': opcode = INPLACE_RSHIFT; break; + case '&': opcode = INPLACE_AND; break; + case '^': opcode = INPLACE_XOR; break; + case '|': opcode = INPLACE_OR; break; + case '*': + if (STR(CHILD(CHILD(n, 1), 0))[1] == '*') + opcode = INPLACE_POWER; + else + opcode = INPLACE_MULTIPLY; + break; + default: + com_error(c, PyExc_SystemError, "com_augassign: bad operator"); + return; + } + com_assign(c, CHILD(n, 0), opcode, CHILD(n, 2)); +} static void com_expr_stmt(struct compiling *c, node *n) { - REQ(n, expr_stmt); /* testlist ('=' testlist)* */ + REQ(n, expr_stmt); + /* testlist (('=' testlist)* | augassign testlist) */ /* Forget it if we have just a doc string here */ if (!c->c_interactive && NCH(n) == 1 && get_rawdocstring(n) != NULL) return; - com_node(c, CHILD(n, NCH(n)-1)); - if (NCH(n) == 1) { + if (NCH(n) == 1) { + com_node(c, CHILD(n, NCH(n)-1)); if (c->c_interactive) com_addbyte(c, PRINT_EXPR); else com_addbyte(c, POP_TOP); com_pop(c, 1); } + else if (TYPE(CHILD(n,1)) == augassign) + com_augassign(c, n); else { int i; + com_node(c, CHILD(n, NCH(n)-1)); for (i = 0; i < NCH(n)-2; i+=2) { if (i+2 < NCH(n)-2) { com_addbyte(c, DUP_TOP); com_push(c, 1); } - com_assign(c, CHILD(n, i), OP_ASSIGN); + com_assign(c, CHILD(n, i), OP_ASSIGN, NULL); } } } @@ -2472,7 +2627,7 @@ com_for_stmt(struct compiling *c, node *n) com_addoparg(c, SET_LINENO, n->n_lineno); com_addfwref(c, FOR_LOOP, &anchor); com_push(c, 1); - com_assign(c, CHILD(n, 1), OP_ASSIGN); + com_assign(c, CHILD(n, 1), OP_ASSIGN, NULL); c->c_loops++; com_node(c, CHILD(n, 5)); c->c_loops--; @@ -2594,7 +2749,7 @@ com_try_except(struct compiling *c, node *n) com_addbyte(c, POP_TOP); com_pop(c, 1); if (NCH(ch) > 3) - com_assign(c, CHILD(ch, 3), OP_ASSIGN); + com_assign(c, CHILD(ch, 3), OP_ASSIGN, NULL); else { com_addbyte(c, POP_TOP); com_pop(c, 1); @@ -2940,7 +3095,7 @@ com_node(struct compiling *c, node *n) com_print_stmt(c, n); break; case del_stmt: /* 'del' exprlist */ - com_assign(c, CHILD(n, 1), OP_DELETE); + com_assign(c, CHILD(n, 1), OP_DELETE, NULL); break; case pass_stmt: break; diff --git a/Python/graminit.c b/Python/graminit.c index c8570ff..efe7c94 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -226,108 +226,136 @@ static state states_10[2] = { static arc arcs_11_0[1] = { {9, 1}, }; -static arc arcs_11_1[2] = { - {20, 0}, +static arc arcs_11_1[3] = { + {37, 2}, + {20, 3}, {0, 1}, }; -static state states_11[2] = { +static arc arcs_11_2[1] = { + {9, 4}, +}; +static arc arcs_11_3[1] = { + {9, 5}, +}; +static arc arcs_11_4[1] = { + {0, 4}, +}; +static arc arcs_11_5[2] = { + {20, 3}, + {0, 5}, +}; +static state states_11[6] = { {1, arcs_11_0}, - {2, arcs_11_1}, + {3, arcs_11_1}, + {1, arcs_11_2}, + {1, arcs_11_3}, + {1, arcs_11_4}, + {2, arcs_11_5}, +}; +static arc arcs_12_0[11] = { + {38, 1}, + {39, 1}, + {40, 1}, + {41, 1}, + {42, 1}, + {43, 1}, + {44, 1}, + {45, 1}, + {46, 1}, + {47, 1}, + {48, 1}, +}; +static arc arcs_12_1[1] = { + {0, 1}, }; -static arc arcs_12_0[1] = { - {37, 1}, +static state states_12[2] = { + {11, arcs_12_0}, + {1, arcs_12_1}, }; -static arc arcs_12_1[3] = { +static arc arcs_13_0[1] = { + {49, 1}, +}; +static arc arcs_13_1[3] = { {21, 2}, - {38, 3}, + {50, 3}, {0, 1}, }; -static arc arcs_12_2[2] = { +static arc arcs_13_2[2] = { {22, 4}, {0, 2}, }; -static arc arcs_12_3[1] = { +static arc arcs_13_3[1] = { {21, 5}, }; -static arc arcs_12_4[2] = { +static arc arcs_13_4[2] = { {21, 2}, {0, 4}, }; -static arc arcs_12_5[2] = { +static arc arcs_13_5[2] = { {22, 6}, {0, 5}, }; -static arc arcs_12_6[1] = { +static arc arcs_13_6[1] = { {21, 7}, }; -static arc arcs_12_7[2] = { +static arc arcs_13_7[2] = { {22, 8}, {0, 7}, }; -static arc arcs_12_8[2] = { +static arc arcs_13_8[2] = { {21, 7}, {0, 8}, }; -static state states_12[9] = { - {1, arcs_12_0}, - {3, arcs_12_1}, - {2, arcs_12_2}, - {1, arcs_12_3}, - {2, arcs_12_4}, - {2, arcs_12_5}, - {1, arcs_12_6}, - {2, arcs_12_7}, - {2, arcs_12_8}, -}; -static arc arcs_13_0[1] = { - {39, 1}, -}; -static arc arcs_13_1[1] = { - {40, 2}, -}; -static arc arcs_13_2[1] = { - {0, 2}, -}; -static state states_13[3] = { +static state states_13[9] = { {1, arcs_13_0}, - {1, arcs_13_1}, - {1, arcs_13_2}, + {3, arcs_13_1}, + {2, arcs_13_2}, + {1, arcs_13_3}, + {2, arcs_13_4}, + {2, arcs_13_5}, + {1, arcs_13_6}, + {2, arcs_13_7}, + {2, arcs_13_8}, }; static arc arcs_14_0[1] = { - {41, 1}, + {51, 1}, }; static arc arcs_14_1[1] = { - {0, 1}, + {52, 2}, +}; +static arc arcs_14_2[1] = { + {0, 2}, }; -static state states_14[2] = { +static state states_14[3] = { {1, arcs_14_0}, {1, arcs_14_1}, + {1, arcs_14_2}, }; -static arc arcs_15_0[4] = { - {42, 1}, - {43, 1}, - {44, 1}, - {45, 1}, +static arc arcs_15_0[1] = { + {53, 1}, }; static arc arcs_15_1[1] = { {0, 1}, }; static state states_15[2] = { - {4, arcs_15_0}, + {1, arcs_15_0}, {1, arcs_15_1}, }; -static arc arcs_16_0[1] = { - {46, 1}, +static arc arcs_16_0[4] = { + {54, 1}, + {55, 1}, + {56, 1}, + {57, 1}, }; static arc arcs_16_1[1] = { {0, 1}, }; static state states_16[2] = { - {1, arcs_16_0}, + {4, arcs_16_0}, {1, arcs_16_1}, }; static arc arcs_17_0[1] = { - {47, 1}, + {58, 1}, }; static arc arcs_17_1[1] = { {0, 1}, @@ -337,116 +365,107 @@ static state states_17[2] = { {1, arcs_17_1}, }; static arc arcs_18_0[1] = { - {48, 1}, + {59, 1}, }; -static arc arcs_18_1[2] = { - {9, 2}, +static arc arcs_18_1[1] = { {0, 1}, }; -static arc arcs_18_2[1] = { - {0, 2}, -}; -static state states_18[3] = { +static state states_18[2] = { {1, arcs_18_0}, - {2, arcs_18_1}, - {1, arcs_18_2}, + {1, arcs_18_1}, }; static arc arcs_19_0[1] = { - {49, 1}, + {60, 1}, }; static arc arcs_19_1[2] = { + {9, 2}, + {0, 1}, +}; +static arc arcs_19_2[1] = { + {0, 2}, +}; +static state states_19[3] = { + {1, arcs_19_0}, + {2, arcs_19_1}, + {1, arcs_19_2}, +}; +static arc arcs_20_0[1] = { + {61, 1}, +}; +static arc arcs_20_1[2] = { {21, 2}, {0, 1}, }; -static arc arcs_19_2[2] = { +static arc arcs_20_2[2] = { {22, 3}, {0, 2}, }; -static arc arcs_19_3[1] = { +static arc arcs_20_3[1] = { {21, 4}, }; -static arc arcs_19_4[2] = { +static arc arcs_20_4[2] = { {22, 5}, {0, 4}, }; -static arc arcs_19_5[1] = { +static arc arcs_20_5[1] = { {21, 6}, }; -static arc arcs_19_6[1] = { +static arc arcs_20_6[1] = { {0, 6}, }; -static state states_19[7] = { - {1, arcs_19_0}, - {2, arcs_19_1}, - {2, arcs_19_2}, - {1, arcs_19_3}, - {2, arcs_19_4}, - {1, arcs_19_5}, - {1, arcs_19_6}, -}; -static arc arcs_20_0[2] = { - {50, 1}, - {52, 2}, +static state states_20[7] = { + {1, arcs_20_0}, + {2, arcs_20_1}, + {2, arcs_20_2}, + {1, arcs_20_3}, + {2, arcs_20_4}, + {1, arcs_20_5}, + {1, arcs_20_6}, }; -static arc arcs_20_1[1] = { - {51, 3}, +static arc arcs_21_0[2] = { + {62, 1}, + {64, 2}, }; -static arc arcs_20_2[1] = { - {53, 4}, +static arc arcs_21_1[1] = { + {63, 3}, }; -static arc arcs_20_3[2] = { +static arc arcs_21_2[1] = { + {65, 4}, +}; +static arc arcs_21_3[2] = { {22, 1}, {0, 3}, }; -static arc arcs_20_4[1] = { - {50, 5}, +static arc arcs_21_4[1] = { + {62, 5}, }; -static arc arcs_20_5[2] = { +static arc arcs_21_5[2] = { {23, 6}, - {54, 7}, + {66, 7}, }; -static arc arcs_20_6[1] = { +static arc arcs_21_6[1] = { {0, 6}, }; -static arc arcs_20_7[2] = { +static arc arcs_21_7[2] = { {22, 8}, {0, 7}, }; -static arc arcs_20_8[1] = { - {54, 7}, -}; -static state states_20[9] = { - {2, arcs_20_0}, - {1, arcs_20_1}, - {1, arcs_20_2}, - {2, arcs_20_3}, - {1, arcs_20_4}, - {2, arcs_20_5}, - {1, arcs_20_6}, - {2, arcs_20_7}, - {1, arcs_20_8}, -}; -static arc arcs_21_0[1] = { - {12, 1}, -}; -static arc arcs_21_1[2] = { - {12, 2}, - {0, 1}, -}; -static arc arcs_21_2[1] = { - {12, 3}, -}; -static arc arcs_21_3[1] = { - {0, 3}, +static arc arcs_21_8[1] = { + {66, 7}, }; -static state states_21[4] = { - {1, arcs_21_0}, - {2, arcs_21_1}, +static state states_21[9] = { + {2, arcs_21_0}, + {1, arcs_21_1}, {1, arcs_21_2}, - {1, arcs_21_3}, + {2, arcs_21_3}, + {1, arcs_21_4}, + {2, arcs_21_5}, + {1, arcs_21_6}, + {2, arcs_21_7}, + {1, arcs_21_8}, }; static arc arcs_22_0[1] = { - {53, 1}, + {12, 1}, }; static arc arcs_22_1[2] = { {12, 2}, @@ -465,139 +484,122 @@ static state states_22[4] = { {1, arcs_22_3}, }; static arc arcs_23_0[1] = { - {12, 1}, + {65, 1}, }; static arc arcs_23_1[2] = { - {55, 0}, + {12, 2}, {0, 1}, }; -static state states_23[2] = { +static arc arcs_23_2[1] = { + {12, 3}, +}; +static arc arcs_23_3[1] = { + {0, 3}, +}; +static state states_23[4] = { {1, arcs_23_0}, {2, arcs_23_1}, + {1, arcs_23_2}, + {1, arcs_23_3}, }; static arc arcs_24_0[1] = { - {56, 1}, -}; -static arc arcs_24_1[1] = { - {12, 2}, + {12, 1}, }; -static arc arcs_24_2[2] = { - {22, 1}, - {0, 2}, +static arc arcs_24_1[2] = { + {67, 0}, + {0, 1}, }; -static state states_24[3] = { +static state states_24[2] = { {1, arcs_24_0}, - {1, arcs_24_1}, - {2, arcs_24_2}, + {2, arcs_24_1}, }; static arc arcs_25_0[1] = { - {57, 1}, + {68, 1}, }; static arc arcs_25_1[1] = { - {58, 2}, + {12, 2}, }; static arc arcs_25_2[2] = { - {59, 3}, + {22, 1}, {0, 2}, }; -static arc arcs_25_3[1] = { - {21, 4}, -}; -static arc arcs_25_4[2] = { - {22, 5}, - {0, 4}, -}; -static arc arcs_25_5[1] = { - {21, 6}, -}; -static arc arcs_25_6[1] = { - {0, 6}, -}; -static state states_25[7] = { +static state states_25[3] = { {1, arcs_25_0}, {1, arcs_25_1}, {2, arcs_25_2}, - {1, arcs_25_3}, - {2, arcs_25_4}, - {1, arcs_25_5}, - {1, arcs_25_6}, }; static arc arcs_26_0[1] = { - {60, 1}, + {69, 1}, }; static arc arcs_26_1[1] = { - {21, 2}, + {70, 2}, }; static arc arcs_26_2[2] = { - {22, 3}, + {71, 3}, {0, 2}, }; static arc arcs_26_3[1] = { {21, 4}, }; -static arc arcs_26_4[1] = { +static arc arcs_26_4[2] = { + {22, 5}, {0, 4}, }; -static state states_26[5] = { +static arc arcs_26_5[1] = { + {21, 6}, +}; +static arc arcs_26_6[1] = { + {0, 6}, +}; +static state states_26[7] = { {1, arcs_26_0}, {1, arcs_26_1}, {2, arcs_26_2}, {1, arcs_26_3}, - {1, arcs_26_4}, + {2, arcs_26_4}, + {1, arcs_26_5}, + {1, arcs_26_6}, }; -static arc arcs_27_0[6] = { - {61, 1}, - {62, 1}, - {63, 1}, - {64, 1}, - {10, 1}, - {65, 1}, +static arc arcs_27_0[1] = { + {72, 1}, }; static arc arcs_27_1[1] = { - {0, 1}, -}; -static state states_27[2] = { - {6, arcs_27_0}, - {1, arcs_27_1}, -}; -static arc arcs_28_0[1] = { - {66, 1}, -}; -static arc arcs_28_1[1] = { {21, 2}, }; -static arc arcs_28_2[1] = { - {14, 3}, +static arc arcs_27_2[2] = { + {22, 3}, + {0, 2}, }; -static arc arcs_28_3[1] = { - {15, 4}, +static arc arcs_27_3[1] = { + {21, 4}, }; -static arc arcs_28_4[3] = { - {67, 1}, - {68, 5}, +static arc arcs_27_4[1] = { {0, 4}, }; -static arc arcs_28_5[1] = { - {14, 6}, +static state states_27[5] = { + {1, arcs_27_0}, + {1, arcs_27_1}, + {2, arcs_27_2}, + {1, arcs_27_3}, + {1, arcs_27_4}, }; -static arc arcs_28_6[1] = { - {15, 7}, +static arc arcs_28_0[6] = { + {73, 1}, + {74, 1}, + {75, 1}, + {76, 1}, + {10, 1}, + {77, 1}, }; -static arc arcs_28_7[1] = { - {0, 7}, +static arc arcs_28_1[1] = { + {0, 1}, }; -static state states_28[8] = { - {1, arcs_28_0}, +static state states_28[2] = { + {6, arcs_28_0}, {1, arcs_28_1}, - {1, arcs_28_2}, - {1, arcs_28_3}, - {3, arcs_28_4}, - {1, arcs_28_5}, - {1, arcs_28_6}, - {1, arcs_28_7}, }; static arc arcs_29_0[1] = { - {69, 1}, + {78, 1}, }; static arc arcs_29_1[1] = { {21, 2}, @@ -608,8 +610,9 @@ static arc arcs_29_2[1] = { static arc arcs_29_3[1] = { {15, 4}, }; -static arc arcs_29_4[2] = { - {68, 5}, +static arc arcs_29_4[3] = { + {79, 1}, + {80, 5}, {0, 4}, }; static arc arcs_29_5[1] = { @@ -626,83 +629,73 @@ static state states_29[8] = { {1, arcs_29_1}, {1, arcs_29_2}, {1, arcs_29_3}, - {2, arcs_29_4}, + {3, arcs_29_4}, {1, arcs_29_5}, {1, arcs_29_6}, {1, arcs_29_7}, }; static arc arcs_30_0[1] = { - {70, 1}, + {81, 1}, }; static arc arcs_30_1[1] = { - {40, 2}, + {21, 2}, }; static arc arcs_30_2[1] = { - {59, 3}, + {14, 3}, }; static arc arcs_30_3[1] = { - {9, 4}, + {15, 4}, }; -static arc arcs_30_4[1] = { - {14, 5}, +static arc arcs_30_4[2] = { + {80, 5}, + {0, 4}, }; static arc arcs_30_5[1] = { - {15, 6}, + {14, 6}, }; -static arc arcs_30_6[2] = { - {68, 7}, - {0, 6}, +static arc arcs_30_6[1] = { + {15, 7}, }; static arc arcs_30_7[1] = { - {14, 8}, -}; -static arc arcs_30_8[1] = { - {15, 9}, -}; -static arc arcs_30_9[1] = { - {0, 9}, + {0, 7}, }; -static state states_30[10] = { +static state states_30[8] = { {1, arcs_30_0}, {1, arcs_30_1}, {1, arcs_30_2}, {1, arcs_30_3}, - {1, arcs_30_4}, + {2, arcs_30_4}, {1, arcs_30_5}, - {2, arcs_30_6}, + {1, arcs_30_6}, {1, arcs_30_7}, - {1, arcs_30_8}, - {1, arcs_30_9}, }; static arc arcs_31_0[1] = { - {71, 1}, + {82, 1}, }; static arc arcs_31_1[1] = { - {14, 2}, + {52, 2}, }; static arc arcs_31_2[1] = { - {15, 3}, + {71, 3}, }; -static arc arcs_31_3[2] = { - {72, 4}, - {73, 5}, +static arc arcs_31_3[1] = { + {9, 4}, }; static arc arcs_31_4[1] = { - {14, 6}, + {14, 5}, }; static arc arcs_31_5[1] = { - {14, 7}, + {15, 6}, }; -static arc arcs_31_6[1] = { - {15, 8}, +static arc arcs_31_6[2] = { + {80, 7}, + {0, 6}, }; static arc arcs_31_7[1] = { - {15, 9}, + {14, 8}, }; -static arc arcs_31_8[3] = { - {72, 4}, - {68, 5}, - {0, 8}, +static arc arcs_31_8[1] = { + {15, 9}, }; static arc arcs_31_9[1] = { {0, 9}, @@ -711,163 +704,197 @@ static state states_31[10] = { {1, arcs_31_0}, {1, arcs_31_1}, {1, arcs_31_2}, - {2, arcs_31_3}, + {1, arcs_31_3}, {1, arcs_31_4}, {1, arcs_31_5}, - {1, arcs_31_6}, + {2, arcs_31_6}, {1, arcs_31_7}, - {3, arcs_31_8}, + {1, arcs_31_8}, {1, arcs_31_9}, }; static arc arcs_32_0[1] = { - {74, 1}, + {83, 1}, }; -static arc arcs_32_1[2] = { - {21, 2}, - {0, 1}, +static arc arcs_32_1[1] = { + {14, 2}, }; -static arc arcs_32_2[2] = { - {22, 3}, - {0, 2}, +static arc arcs_32_2[1] = { + {15, 3}, }; -static arc arcs_32_3[1] = { - {21, 4}, +static arc arcs_32_3[2] = { + {84, 4}, + {85, 5}, }; static arc arcs_32_4[1] = { - {0, 4}, + {14, 6}, +}; +static arc arcs_32_5[1] = { + {14, 7}, +}; +static arc arcs_32_6[1] = { + {15, 8}, +}; +static arc arcs_32_7[1] = { + {15, 9}, +}; +static arc arcs_32_8[3] = { + {84, 4}, + {80, 5}, + {0, 8}, +}; +static arc arcs_32_9[1] = { + {0, 9}, }; -static state states_32[5] = { +static state states_32[10] = { {1, arcs_32_0}, - {2, arcs_32_1}, - {2, arcs_32_2}, - {1, arcs_32_3}, + {1, arcs_32_1}, + {1, arcs_32_2}, + {2, arcs_32_3}, {1, arcs_32_4}, + {1, arcs_32_5}, + {1, arcs_32_6}, + {1, arcs_32_7}, + {3, arcs_32_8}, + {1, arcs_32_9}, }; -static arc arcs_33_0[2] = { - {3, 1}, - {2, 2}, +static arc arcs_33_0[1] = { + {86, 1}, }; -static arc arcs_33_1[1] = { +static arc arcs_33_1[2] = { + {21, 2}, {0, 1}, }; -static arc arcs_33_2[1] = { - {75, 3}, +static arc arcs_33_2[2] = { + {22, 3}, + {0, 2}, }; static arc arcs_33_3[1] = { - {6, 4}, + {21, 4}, }; -static arc arcs_33_4[2] = { - {6, 4}, - {76, 1}, +static arc arcs_33_4[1] = { + {0, 4}, }; static state states_33[5] = { - {2, arcs_33_0}, - {1, arcs_33_1}, - {1, arcs_33_2}, + {1, arcs_33_0}, + {2, arcs_33_1}, + {2, arcs_33_2}, {1, arcs_33_3}, - {2, arcs_33_4}, + {1, arcs_33_4}, }; static arc arcs_34_0[2] = { - {77, 1}, - {79, 2}, + {3, 1}, + {2, 2}, }; -static arc arcs_34_1[2] = { - {78, 3}, +static arc arcs_34_1[1] = { {0, 1}, }; static arc arcs_34_2[1] = { - {0, 2}, + {87, 3}, }; static arc arcs_34_3[1] = { - {77, 1}, + {6, 4}, }; -static state states_34[4] = { +static arc arcs_34_4[2] = { + {6, 4}, + {88, 1}, +}; +static state states_34[5] = { {2, arcs_34_0}, - {2, arcs_34_1}, + {1, arcs_34_1}, {1, arcs_34_2}, {1, arcs_34_3}, + {2, arcs_34_4}, }; -static arc arcs_35_0[1] = { - {80, 1}, +static arc arcs_35_0[2] = { + {89, 1}, + {91, 2}, }; static arc arcs_35_1[2] = { - {81, 0}, + {90, 3}, {0, 1}, }; -static state states_35[2] = { - {1, arcs_35_0}, +static arc arcs_35_2[1] = { + {0, 2}, +}; +static arc arcs_35_3[1] = { + {89, 1}, +}; +static state states_35[4] = { + {2, arcs_35_0}, {2, arcs_35_1}, + {1, arcs_35_2}, + {1, arcs_35_3}, }; -static arc arcs_36_0[2] = { - {82, 1}, - {83, 2}, +static arc arcs_36_0[1] = { + {92, 1}, }; -static arc arcs_36_1[1] = { - {80, 2}, +static arc arcs_36_1[2] = { + {93, 0}, + {0, 1}, }; -static arc arcs_36_2[1] = { - {0, 2}, +static state states_36[2] = { + {1, arcs_36_0}, + {2, arcs_36_1}, }; -static state states_36[3] = { - {2, arcs_36_0}, - {1, arcs_36_1}, - {1, arcs_36_2}, +static arc arcs_37_0[2] = { + {94, 1}, + {95, 2}, }; -static arc arcs_37_0[1] = { - {58, 1}, +static arc arcs_37_1[1] = { + {92, 2}, }; -static arc arcs_37_1[2] = { - {84, 0}, - {0, 1}, +static arc arcs_37_2[1] = { + {0, 2}, }; -static state states_37[2] = { - {1, arcs_37_0}, - {2, arcs_37_1}, +static state states_37[3] = { + {2, arcs_37_0}, + {1, arcs_37_1}, + {1, arcs_37_2}, }; -static arc arcs_38_0[10] = { - {85, 1}, - {86, 1}, - {87, 1}, - {88, 1}, - {89, 1}, - {90, 1}, - {91, 1}, - {59, 1}, - {82, 2}, - {92, 3}, +static arc arcs_38_0[1] = { + {70, 1}, }; -static arc arcs_38_1[1] = { +static arc arcs_38_1[2] = { + {96, 0}, {0, 1}, }; -static arc arcs_38_2[1] = { - {59, 1}, +static state states_38[2] = { + {1, arcs_38_0}, + {2, arcs_38_1}, }; -static arc arcs_38_3[2] = { - {82, 1}, - {0, 3}, +static arc arcs_39_0[10] = { + {97, 1}, + {98, 1}, + {99, 1}, + {100, 1}, + {101, 1}, + {102, 1}, + {103, 1}, + {71, 1}, + {94, 2}, + {104, 3}, }; -static state states_38[4] = { - {10, arcs_38_0}, - {1, arcs_38_1}, - {1, arcs_38_2}, - {2, arcs_38_3}, +static arc arcs_39_1[1] = { + {0, 1}, }; -static arc arcs_39_0[1] = { - {93, 1}, +static arc arcs_39_2[1] = { + {71, 1}, }; -static arc arcs_39_1[2] = { - {94, 0}, - {0, 1}, +static arc arcs_39_3[2] = { + {94, 1}, + {0, 3}, }; -static state states_39[2] = { - {1, arcs_39_0}, - {2, arcs_39_1}, +static state states_39[4] = { + {10, arcs_39_0}, + {1, arcs_39_1}, + {1, arcs_39_2}, + {2, arcs_39_3}, }; static arc arcs_40_0[1] = { - {95, 1}, + {105, 1}, }; static arc arcs_40_1[2] = { - {96, 0}, + {106, 0}, {0, 1}, }; static state states_40[2] = { @@ -875,10 +902,10 @@ static state states_40[2] = { {2, arcs_40_1}, }; static arc arcs_41_0[1] = { - {97, 1}, + {107, 1}, }; static arc arcs_41_1[2] = { - {98, 0}, + {108, 0}, {0, 1}, }; static state states_41[2] = { @@ -886,23 +913,22 @@ static state states_41[2] = { {2, arcs_41_1}, }; static arc arcs_42_0[1] = { - {99, 1}, + {109, 1}, }; -static arc arcs_42_1[3] = { - {100, 0}, - {38, 0}, +static arc arcs_42_1[2] = { + {110, 0}, {0, 1}, }; static state states_42[2] = { {1, arcs_42_0}, - {3, arcs_42_1}, + {2, arcs_42_1}, }; static arc arcs_43_0[1] = { - {101, 1}, + {111, 1}, }; static arc arcs_43_1[3] = { - {102, 0}, - {103, 0}, + {112, 0}, + {50, 0}, {0, 1}, }; static state states_43[2] = { @@ -910,286 +936,282 @@ static state states_43[2] = { {3, arcs_43_1}, }; static arc arcs_44_0[1] = { - {104, 1}, + {113, 1}, }; -static arc arcs_44_1[4] = { - {23, 0}, - {105, 0}, - {106, 0}, +static arc arcs_44_1[3] = { + {114, 0}, + {115, 0}, {0, 1}, }; static state states_44[2] = { {1, arcs_44_0}, - {4, arcs_44_1}, + {3, arcs_44_1}, }; -static arc arcs_45_0[4] = { - {102, 1}, - {103, 1}, - {107, 1}, - {108, 2}, +static arc arcs_45_0[1] = { + {116, 1}, +}; +static arc arcs_45_1[4] = { + {23, 0}, + {117, 0}, + {118, 0}, + {0, 1}, +}; +static state states_45[2] = { + {1, arcs_45_0}, + {4, arcs_45_1}, +}; +static arc arcs_46_0[4] = { + {114, 1}, + {115, 1}, + {119, 1}, + {120, 2}, }; -static arc arcs_45_1[1] = { - {104, 2}, +static arc arcs_46_1[1] = { + {116, 2}, }; -static arc arcs_45_2[1] = { +static arc arcs_46_2[1] = { {0, 2}, }; -static state states_45[3] = { - {4, arcs_45_0}, - {1, arcs_45_1}, - {1, arcs_45_2}, +static state states_46[3] = { + {4, arcs_46_0}, + {1, arcs_46_1}, + {1, arcs_46_2}, }; -static arc arcs_46_0[1] = { - {109, 1}, +static arc arcs_47_0[1] = { + {121, 1}, }; -static arc arcs_46_1[3] = { - {110, 1}, +static arc arcs_47_1[3] = { + {122, 1}, {24, 2}, {0, 1}, }; -static arc arcs_46_2[1] = { - {104, 3}, +static arc arcs_47_2[1] = { + {116, 3}, }; -static arc arcs_46_3[2] = { +static arc arcs_47_3[2] = { {24, 2}, {0, 3}, }; -static state states_46[4] = { - {1, arcs_46_0}, - {3, arcs_46_1}, - {1, arcs_46_2}, - {2, arcs_46_3}, +static state states_47[4] = { + {1, arcs_47_0}, + {3, arcs_47_1}, + {1, arcs_47_2}, + {2, arcs_47_3}, }; -static arc arcs_47_0[7] = { +static arc arcs_48_0[7] = { {16, 1}, - {111, 2}, - {114, 3}, - {117, 4}, + {123, 2}, + {126, 3}, + {129, 4}, {12, 5}, - {118, 5}, - {119, 6}, + {130, 5}, + {131, 6}, }; -static arc arcs_47_1[2] = { +static arc arcs_48_1[2] = { {9, 7}, {18, 5}, }; -static arc arcs_47_2[2] = { - {112, 8}, - {113, 5}, +static arc arcs_48_2[2] = { + {124, 8}, + {125, 5}, }; -static arc arcs_47_3[2] = { - {115, 9}, - {116, 5}, +static arc arcs_48_3[2] = { + {127, 9}, + {128, 5}, }; -static arc arcs_47_4[1] = { +static arc arcs_48_4[1] = { {9, 10}, }; -static arc arcs_47_5[1] = { +static arc arcs_48_5[1] = { {0, 5}, }; -static arc arcs_47_6[2] = { - {119, 6}, +static arc arcs_48_6[2] = { + {131, 6}, {0, 6}, }; -static arc arcs_47_7[1] = { +static arc arcs_48_7[1] = { {18, 5}, }; -static arc arcs_47_8[1] = { - {113, 5}, +static arc arcs_48_8[1] = { + {125, 5}, }; -static arc arcs_47_9[1] = { - {116, 5}, +static arc arcs_48_9[1] = { + {128, 5}, }; -static arc arcs_47_10[1] = { - {117, 5}, +static arc arcs_48_10[1] = { + {129, 5}, }; -static state states_47[11] = { - {7, arcs_47_0}, - {2, arcs_47_1}, - {2, arcs_47_2}, - {2, arcs_47_3}, - {1, arcs_47_4}, - {1, arcs_47_5}, - {2, arcs_47_6}, - {1, arcs_47_7}, - {1, arcs_47_8}, - {1, arcs_47_9}, - {1, arcs_47_10}, -}; -static arc arcs_48_0[1] = { +static state states_48[11] = { + {7, arcs_48_0}, + {2, arcs_48_1}, + {2, arcs_48_2}, + {2, arcs_48_3}, + {1, arcs_48_4}, + {1, arcs_48_5}, + {2, arcs_48_6}, + {1, arcs_48_7}, + {1, arcs_48_8}, + {1, arcs_48_9}, + {1, arcs_48_10}, +}; +static arc arcs_49_0[1] = { {21, 1}, }; -static arc arcs_48_1[3] = { - {120, 2}, +static arc arcs_49_1[3] = { + {132, 2}, {22, 3}, {0, 1}, }; -static arc arcs_48_2[1] = { +static arc arcs_49_2[1] = { {0, 2}, }; -static arc arcs_48_3[2] = { +static arc arcs_49_3[2] = { {21, 4}, {0, 3}, }; -static arc arcs_48_4[2] = { +static arc arcs_49_4[2] = { {22, 3}, {0, 4}, }; -static state states_48[5] = { - {1, arcs_48_0}, - {3, arcs_48_1}, - {1, arcs_48_2}, - {2, arcs_48_3}, - {2, arcs_48_4}, +static state states_49[5] = { + {1, arcs_49_0}, + {3, arcs_49_1}, + {1, arcs_49_2}, + {2, arcs_49_3}, + {2, arcs_49_4}, }; -static arc arcs_49_0[1] = { - {121, 1}, +static arc arcs_50_0[1] = { + {133, 1}, }; -static arc arcs_49_1[2] = { +static arc arcs_50_1[2] = { {17, 2}, {14, 3}, }; -static arc arcs_49_2[1] = { +static arc arcs_50_2[1] = { {14, 3}, }; -static arc arcs_49_3[1] = { +static arc arcs_50_3[1] = { {21, 4}, }; -static arc arcs_49_4[1] = { +static arc arcs_50_4[1] = { {0, 4}, }; -static state states_49[5] = { - {1, arcs_49_0}, - {2, arcs_49_1}, - {1, arcs_49_2}, - {1, arcs_49_3}, - {1, arcs_49_4}, +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 arc arcs_50_0[3] = { +static arc arcs_51_0[3] = { {16, 1}, - {111, 2}, - {55, 3}, + {123, 2}, + {67, 3}, }; -static arc arcs_50_1[2] = { - {122, 4}, +static arc arcs_51_1[2] = { + {134, 4}, {18, 5}, }; -static arc arcs_50_2[1] = { - {123, 6}, +static arc arcs_51_2[1] = { + {135, 6}, }; -static arc arcs_50_3[1] = { +static arc arcs_51_3[1] = { {12, 5}, }; -static arc arcs_50_4[1] = { +static arc arcs_51_4[1] = { {18, 5}, }; -static arc arcs_50_5[1] = { +static arc arcs_51_5[1] = { {0, 5}, }; -static arc arcs_50_6[1] = { - {113, 5}, +static arc arcs_51_6[1] = { + {125, 5}, }; -static state states_50[7] = { - {3, arcs_50_0}, - {2, arcs_50_1}, - {1, arcs_50_2}, - {1, arcs_50_3}, - {1, arcs_50_4}, - {1, arcs_50_5}, - {1, arcs_50_6}, +static state states_51[7] = { + {3, arcs_51_0}, + {2, arcs_51_1}, + {1, arcs_51_2}, + {1, arcs_51_3}, + {1, arcs_51_4}, + {1, arcs_51_5}, + {1, arcs_51_6}, }; -static arc arcs_51_0[1] = { - {124, 1}, +static arc arcs_52_0[1] = { + {136, 1}, }; -static arc arcs_51_1[2] = { +static arc arcs_52_1[2] = { {22, 2}, {0, 1}, }; -static arc arcs_51_2[2] = { - {124, 1}, +static arc arcs_52_2[2] = { + {136, 1}, {0, 2}, }; -static state states_51[3] = { - {1, arcs_51_0}, - {2, arcs_51_1}, - {2, arcs_51_2}, +static state states_52[3] = { + {1, arcs_52_0}, + {2, arcs_52_1}, + {2, arcs_52_2}, }; -static arc arcs_52_0[3] = { - {55, 1}, +static arc arcs_53_0[3] = { + {67, 1}, {21, 2}, {14, 3}, }; -static arc arcs_52_1[1] = { - {55, 4}, +static arc arcs_53_1[1] = { + {67, 4}, }; -static arc arcs_52_2[2] = { +static arc arcs_53_2[2] = { {14, 3}, {0, 2}, }; -static arc arcs_52_3[3] = { +static arc arcs_53_3[3] = { {21, 5}, - {125, 6}, + {137, 6}, {0, 3}, }; -static arc arcs_52_4[1] = { - {55, 6}, +static arc arcs_53_4[1] = { + {67, 6}, }; -static arc arcs_52_5[2] = { - {125, 6}, +static arc arcs_53_5[2] = { + {137, 6}, {0, 5}, }; -static arc arcs_52_6[1] = { +static arc arcs_53_6[1] = { {0, 6}, }; -static state states_52[7] = { - {3, arcs_52_0}, - {1, arcs_52_1}, - {2, arcs_52_2}, - {3, arcs_52_3}, - {1, arcs_52_4}, - {2, arcs_52_5}, - {1, arcs_52_6}, -}; -static arc arcs_53_0[1] = { - {14, 1}, -}; -static arc arcs_53_1[2] = { - {21, 2}, - {0, 1}, -}; -static arc arcs_53_2[1] = { - {0, 2}, -}; -static state states_53[3] = { - {1, arcs_53_0}, - {2, arcs_53_1}, - {1, arcs_53_2}, +static state states_53[7] = { + {3, arcs_53_0}, + {1, arcs_53_1}, + {2, arcs_53_2}, + {3, arcs_53_3}, + {1, arcs_53_4}, + {2, arcs_53_5}, + {1, arcs_53_6}, }; static arc arcs_54_0[1] = { - {58, 1}, + {14, 1}, }; static arc arcs_54_1[2] = { - {22, 2}, + {21, 2}, {0, 1}, }; -static arc arcs_54_2[2] = { - {58, 1}, +static arc arcs_54_2[1] = { {0, 2}, }; static state states_54[3] = { {1, arcs_54_0}, {2, arcs_54_1}, - {2, arcs_54_2}, + {1, arcs_54_2}, }; static arc arcs_55_0[1] = { - {21, 1}, + {70, 1}, }; static arc arcs_55_1[2] = { {22, 2}, {0, 1}, }; static arc arcs_55_2[2] = { - {21, 1}, + {70, 1}, {0, 2}, }; static state states_55[3] = { @@ -1200,330 +1222,348 @@ static state states_55[3] = { static arc arcs_56_0[1] = { {21, 1}, }; -static arc arcs_56_1[1] = { +static arc arcs_56_1[2] = { + {22, 2}, + {0, 1}, +}; +static arc arcs_56_2[2] = { + {21, 1}, + {0, 2}, +}; +static state states_56[3] = { + {1, arcs_56_0}, + {2, arcs_56_1}, + {2, arcs_56_2}, +}; +static arc arcs_57_0[1] = { + {21, 1}, +}; +static arc arcs_57_1[1] = { {14, 2}, }; -static arc arcs_56_2[1] = { +static arc arcs_57_2[1] = { {21, 3}, }; -static arc arcs_56_3[2] = { +static arc arcs_57_3[2] = { {22, 4}, {0, 3}, }; -static arc arcs_56_4[2] = { +static arc arcs_57_4[2] = { {21, 1}, {0, 4}, }; -static state states_56[5] = { - {1, arcs_56_0}, - {1, arcs_56_1}, - {1, arcs_56_2}, - {2, arcs_56_3}, - {2, arcs_56_4}, +static state states_57[5] = { + {1, arcs_57_0}, + {1, arcs_57_1}, + {1, arcs_57_2}, + {2, arcs_57_3}, + {2, arcs_57_4}, }; -static arc arcs_57_0[1] = { - {126, 1}, +static arc arcs_58_0[1] = { + {138, 1}, }; -static arc arcs_57_1[1] = { +static arc arcs_58_1[1] = { {12, 2}, }; -static arc arcs_57_2[2] = { +static arc arcs_58_2[2] = { {16, 3}, {14, 4}, }; -static arc arcs_57_3[1] = { +static arc arcs_58_3[1] = { {9, 5}, }; -static arc arcs_57_4[1] = { +static arc arcs_58_4[1] = { {15, 6}, }; -static arc arcs_57_5[1] = { +static arc arcs_58_5[1] = { {18, 7}, }; -static arc arcs_57_6[1] = { +static arc arcs_58_6[1] = { {0, 6}, }; -static arc arcs_57_7[1] = { +static arc arcs_58_7[1] = { {14, 4}, }; -static state states_57[8] = { - {1, arcs_57_0}, - {1, arcs_57_1}, - {2, arcs_57_2}, - {1, arcs_57_3}, - {1, arcs_57_4}, - {1, arcs_57_5}, - {1, arcs_57_6}, - {1, arcs_57_7}, -}; -static arc arcs_58_0[3] = { - {127, 1}, +static state states_58[8] = { + {1, arcs_58_0}, + {1, arcs_58_1}, + {2, arcs_58_2}, + {1, arcs_58_3}, + {1, arcs_58_4}, + {1, arcs_58_5}, + {1, arcs_58_6}, + {1, arcs_58_7}, +}; +static arc arcs_59_0[3] = { + {139, 1}, {23, 2}, {24, 3}, }; -static arc arcs_58_1[2] = { +static arc arcs_59_1[2] = { {22, 4}, {0, 1}, }; -static arc arcs_58_2[1] = { +static arc arcs_59_2[1] = { {21, 5}, }; -static arc arcs_58_3[1] = { +static arc arcs_59_3[1] = { {21, 6}, }; -static arc arcs_58_4[4] = { - {127, 1}, +static arc arcs_59_4[4] = { + {139, 1}, {23, 2}, {24, 3}, {0, 4}, }; -static arc arcs_58_5[2] = { +static arc arcs_59_5[2] = { {22, 7}, {0, 5}, }; -static arc arcs_58_6[1] = { +static arc arcs_59_6[1] = { {0, 6}, }; -static arc arcs_58_7[1] = { +static arc arcs_59_7[1] = { {24, 3}, }; -static state states_58[8] = { - {3, arcs_58_0}, - {2, arcs_58_1}, - {1, arcs_58_2}, - {1, arcs_58_3}, - {4, arcs_58_4}, - {2, arcs_58_5}, - {1, arcs_58_6}, - {1, arcs_58_7}, +static state states_59[8] = { + {3, arcs_59_0}, + {2, arcs_59_1}, + {1, arcs_59_2}, + {1, arcs_59_3}, + {4, arcs_59_4}, + {2, arcs_59_5}, + {1, arcs_59_6}, + {1, arcs_59_7}, }; -static arc arcs_59_0[1] = { +static arc arcs_60_0[1] = { {21, 1}, }; -static arc arcs_59_1[2] = { +static arc arcs_60_1[2] = { {20, 2}, {0, 1}, }; -static arc arcs_59_2[1] = { +static arc arcs_60_2[1] = { {21, 3}, }; -static arc arcs_59_3[1] = { +static arc arcs_60_3[1] = { {0, 3}, }; -static state states_59[4] = { - {1, arcs_59_0}, - {2, arcs_59_1}, - {1, arcs_59_2}, - {1, arcs_59_3}, +static state states_60[4] = { + {1, arcs_60_0}, + {2, arcs_60_1}, + {1, arcs_60_2}, + {1, arcs_60_3}, }; -static arc arcs_60_0[2] = { - {120, 1}, - {129, 1}, +static arc arcs_61_0[2] = { + {132, 1}, + {141, 1}, }; -static arc arcs_60_1[1] = { +static arc arcs_61_1[1] = { {0, 1}, }; -static state states_60[2] = { - {2, arcs_60_0}, - {1, arcs_60_1}, +static state states_61[2] = { + {2, arcs_61_0}, + {1, arcs_61_1}, }; -static arc arcs_61_0[1] = { - {70, 1}, +static arc arcs_62_0[1] = { + {82, 1}, }; -static arc arcs_61_1[1] = { - {40, 2}, +static arc arcs_62_1[1] = { + {52, 2}, }; -static arc arcs_61_2[1] = { - {59, 3}, +static arc arcs_62_2[1] = { + {71, 3}, }; -static arc arcs_61_3[1] = { +static arc arcs_62_3[1] = { {9, 4}, }; -static arc arcs_61_4[2] = { - {128, 5}, +static arc arcs_62_4[2] = { + {140, 5}, {0, 4}, }; -static arc arcs_61_5[1] = { +static arc arcs_62_5[1] = { {0, 5}, }; -static state states_61[6] = { - {1, arcs_61_0}, - {1, arcs_61_1}, - {1, arcs_61_2}, - {1, arcs_61_3}, - {2, arcs_61_4}, - {1, arcs_61_5}, +static state states_62[6] = { + {1, arcs_62_0}, + {1, arcs_62_1}, + {1, arcs_62_2}, + {1, arcs_62_3}, + {2, arcs_62_4}, + {1, arcs_62_5}, }; -static arc arcs_62_0[1] = { - {66, 1}, +static arc arcs_63_0[1] = { + {78, 1}, }; -static arc arcs_62_1[1] = { +static arc arcs_63_1[1] = { {21, 2}, }; -static arc arcs_62_2[2] = { - {128, 3}, +static arc arcs_63_2[2] = { + {140, 3}, {0, 2}, }; -static arc arcs_62_3[1] = { +static arc arcs_63_3[1] = { {0, 3}, }; -static state states_62[4] = { - {1, arcs_62_0}, - {1, arcs_62_1}, - {2, arcs_62_2}, - {1, arcs_62_3}, +static state states_63[4] = { + {1, arcs_63_0}, + {1, arcs_63_1}, + {2, arcs_63_2}, + {1, arcs_63_3}, }; -static dfa dfas[63] = { +static dfa dfas[64] = { {256, "single_input", 0, 3, states_0, - "\004\030\001\000\240\302\027\023\344\000\004\000\300\210\344\102\000"}, + "\004\030\001\000\000\000\052\174\061\101\016\100\000\000\214\110\056\004"}, {257, "file_input", 0, 2, states_1, - "\204\030\001\000\240\302\027\023\344\000\004\000\300\210\344\102\000"}, + "\204\030\001\000\000\000\052\174\061\101\016\100\000\000\214\110\056\004"}, {258, "eval_input", 0, 3, states_2, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, {259, "funcdef", 0, 6, states_3, - "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {260, "parameters", 0, 4, states_4, - "\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {261, "varargslist", 0, 10, states_5, - "\000\020\201\001\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\020\201\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {262, "fpdef", 0, 4, states_6, - "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {263, "fplist", 0, 3, states_7, - "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {264, "stmt", 0, 2, states_8, - "\000\030\001\000\240\302\027\023\344\000\004\000\300\210\344\102\000"}, + "\000\030\001\000\000\000\052\174\061\101\016\100\000\000\214\110\056\004"}, {265, "simple_stmt", 0, 4, states_9, - "\000\020\001\000\240\302\027\023\000\000\004\000\300\210\344\002\000"}, + "\000\020\001\000\000\000\052\174\061\001\000\100\000\000\214\110\056\000"}, {266, "small_stmt", 0, 2, states_10, - "\000\020\001\000\240\302\027\023\000\000\004\000\300\210\344\002\000"}, - {267, "expr_stmt", 0, 2, states_11, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {268, "print_stmt", 0, 9, states_12, - "\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"}, - {269, "del_stmt", 0, 3, states_13, - "\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000"}, - {270, "pass_stmt", 0, 2, states_14, - "\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000"}, - {271, "flow_stmt", 0, 2, states_15, - "\000\000\000\000\000\300\003\000\000\000\000\000\000\000\000\000\000"}, - {272, "break_stmt", 0, 2, states_16, - "\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"}, - {273, "continue_stmt", 0, 2, states_17, - "\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"}, - {274, "return_stmt", 0, 3, states_18, - "\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000"}, - {275, "raise_stmt", 0, 7, states_19, - "\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000"}, - {276, "import_stmt", 0, 9, states_20, - "\000\000\000\000\000\000\024\000\000\000\000\000\000\000\000\000\000"}, - {277, "import_as_name", 0, 4, states_21, - "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {278, "dotted_as_name", 0, 4, states_22, - "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {279, "dotted_name", 0, 2, states_23, - "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {280, "global_stmt", 0, 3, states_24, - "\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"}, - {281, "exec_stmt", 0, 7, states_25, - "\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000"}, - {282, "assert_stmt", 0, 5, states_26, - "\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000"}, - {283, "compound_stmt", 0, 2, states_27, - "\000\010\000\000\000\000\000\000\344\000\000\000\000\000\000\100\000"}, - {284, "if_stmt", 0, 8, states_28, - "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000"}, - {285, "while_stmt", 0, 8, states_29, - "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000"}, - {286, "for_stmt", 0, 10, states_30, - "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, - {287, "try_stmt", 0, 10, states_31, - "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"}, - {288, "except_clause", 0, 5, states_32, - "\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"}, - {289, "suite", 0, 5, states_33, - "\004\020\001\000\240\302\027\023\000\000\004\000\300\210\344\002\000"}, - {290, "test", 0, 4, states_34, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {291, "and_test", 0, 2, states_35, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\000\000"}, - {292, "not_test", 0, 3, states_36, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\000\000"}, - {293, "comparison", 0, 2, states_37, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {294, "comp_op", 0, 4, states_38, - "\000\000\000\000\000\000\000\010\000\000\344\037\000\000\000\000\000"}, - {295, "expr", 0, 2, states_39, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {296, "xor_expr", 0, 2, states_40, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {297, "and_expr", 0, 2, states_41, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {298, "shift_expr", 0, 2, states_42, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {299, "arith_expr", 0, 2, states_43, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {300, "term", 0, 2, states_44, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {301, "factor", 0, 3, states_45, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {302, "power", 0, 4, states_46, - "\000\020\001\000\000\000\000\000\000\000\000\000\000\200\344\000\000"}, - {303, "atom", 0, 11, states_47, - "\000\020\001\000\000\000\000\000\000\000\000\000\000\200\344\000\000"}, - {304, "listmaker", 0, 5, states_48, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {305, "lambdef", 0, 5, states_49, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000"}, - {306, "trailer", 0, 7, states_50, - "\000\000\001\000\000\000\200\000\000\000\000\000\000\200\000\000\000"}, - {307, "subscriptlist", 0, 3, states_51, - "\000\120\001\000\000\000\200\000\000\000\004\000\300\210\344\002\000"}, - {308, "subscript", 0, 7, states_52, - "\000\120\001\000\000\000\200\000\000\000\004\000\300\210\344\002\000"}, - {309, "sliceop", 0, 3, states_53, - "\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, - {310, "exprlist", 0, 3, states_54, - "\000\020\001\000\000\000\000\000\000\000\000\000\300\210\344\000\000"}, - {311, "testlist", 0, 3, states_55, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {312, "dictmaker", 0, 5, states_56, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {313, "classdef", 0, 8, states_57, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100\000"}, - {314, "arglist", 0, 8, states_58, - "\000\020\201\001\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {315, "argument", 0, 4, states_59, - "\000\020\001\000\000\000\000\000\000\000\004\000\300\210\344\002\000"}, - {316, "list_iter", 0, 2, states_60, - "\000\000\000\000\000\000\000\000\104\000\000\000\000\000\000\000\000"}, - {317, "list_for", 0, 6, states_61, - "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, - {318, "list_if", 0, 4, states_62, - "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000"}, -}; -static label labels[130] = { + "\000\020\001\000\000\000\052\174\061\001\000\100\000\000\214\110\056\000"}, + {267, "expr_stmt", 0, 6, states_11, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {268, "augassign", 0, 2, states_12, + "\000\000\000\000\300\377\001\000\000\000\000\000\000\000\000\000\000\000"}, + {269, "print_stmt", 0, 9, states_13, + "\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000"}, + {270, "del_stmt", 0, 3, states_14, + "\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000"}, + {271, "pass_stmt", 0, 2, states_15, + "\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"}, + {272, "flow_stmt", 0, 2, states_16, + "\000\000\000\000\000\000\000\074\000\000\000\000\000\000\000\000\000\000"}, + {273, "break_stmt", 0, 2, states_17, + "\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000"}, + {274, "continue_stmt", 0, 2, states_18, + "\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000"}, + {275, "return_stmt", 0, 3, states_19, + "\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, + {276, "raise_stmt", 0, 7, states_20, + "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000"}, + {277, "import_stmt", 0, 9, states_21, + "\000\000\000\000\000\000\000\100\001\000\000\000\000\000\000\000\000\000"}, + {278, "import_as_name", 0, 4, states_22, + "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {279, "dotted_as_name", 0, 4, states_23, + "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {280, "dotted_name", 0, 2, states_24, + "\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {281, "global_stmt", 0, 3, states_25, + "\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000"}, + {282, "exec_stmt", 0, 7, states_26, + "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"}, + {283, "assert_stmt", 0, 5, states_27, + "\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"}, + {284, "compound_stmt", 0, 2, states_28, + "\000\010\000\000\000\000\000\000\000\100\016\000\000\000\000\000\000\004"}, + {285, "if_stmt", 0, 8, states_29, + "\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, + {286, "while_stmt", 0, 8, states_30, + "\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000"}, + {287, "for_stmt", 0, 10, states_31, + "\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"}, + {288, "try_stmt", 0, 10, states_32, + "\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000"}, + {289, "except_clause", 0, 5, states_33, + "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000"}, + {290, "suite", 0, 5, states_34, + "\004\020\001\000\000\000\052\174\061\001\000\100\000\000\214\110\056\000"}, + {291, "test", 0, 4, states_35, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {292, "and_test", 0, 2, states_36, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\016\000"}, + {293, "not_test", 0, 3, states_37, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\016\000"}, + {294, "comparison", 0, 2, states_38, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {295, "comp_op", 0, 4, states_39, + "\000\000\000\000\000\000\000\000\200\000\000\100\376\001\000\000\000\000"}, + {296, "expr", 0, 2, states_40, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {297, "xor_expr", 0, 2, states_41, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {298, "and_expr", 0, 2, states_42, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {299, "shift_expr", 0, 2, states_43, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {300, "arith_expr", 0, 2, states_44, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {301, "term", 0, 2, states_45, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {302, "factor", 0, 3, states_46, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {303, "power", 0, 4, states_47, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\110\016\000"}, + {304, "atom", 0, 11, states_48, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\000\110\016\000"}, + {305, "listmaker", 0, 5, states_49, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {306, "lambdef", 0, 5, states_50, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000"}, + {307, "trailer", 0, 7, states_51, + "\000\000\001\000\000\000\000\000\010\000\000\000\000\000\000\010\000\000"}, + {308, "subscriptlist", 0, 3, states_52, + "\000\120\001\000\000\000\000\000\010\000\000\100\000\000\214\110\056\000"}, + {309, "subscript", 0, 7, states_53, + "\000\120\001\000\000\000\000\000\010\000\000\100\000\000\214\110\056\000"}, + {310, "sliceop", 0, 3, states_54, + "\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, + {311, "exprlist", 0, 3, states_55, + "\000\020\001\000\000\000\000\000\000\000\000\000\000\000\214\110\016\000"}, + {312, "testlist", 0, 3, states_56, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {313, "dictmaker", 0, 5, states_57, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {314, "classdef", 0, 8, states_58, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004"}, + {315, "arglist", 0, 8, states_59, + "\000\020\201\001\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {316, "argument", 0, 4, states_60, + "\000\020\001\000\000\000\000\000\000\000\000\100\000\000\214\110\056\000"}, + {317, "list_iter", 0, 2, states_61, + "\000\000\000\000\000\000\000\000\000\100\004\000\000\000\000\000\000\000"}, + {318, "list_for", 0, 6, states_62, + "\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000"}, + {319, "list_if", 0, 4, states_63, + "\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, +}; +static label labels[142] = { {0, "EMPTY"}, {256, 0}, {4, 0}, {265, 0}, - {283, 0}, + {284, 0}, {257, 0}, {264, 0}, {0, 0}, {258, 0}, - {311, 0}, + {312, 0}, {259, 0}, {1, "def"}, {1, 0}, {260, 0}, {11, 0}, - {289, 0}, + {290, 0}, {7, 0}, {261, 0}, {8, 0}, {262, 0}, {22, 0}, - {290, 0}, + {291, 0}, {12, 0}, {16, 0}, {36, 0}, @@ -1531,62 +1571,74 @@ static label labels[130] = { {266, 0}, {13, 0}, {267, 0}, - {268, 0}, {269, 0}, {270, 0}, {271, 0}, - {276, 0}, - {280, 0}, + {272, 0}, + {277, 0}, {281, 0}, {282, 0}, + {283, 0}, + {268, 0}, + {37, 0}, + {38, 0}, + {39, 0}, + {40, 0}, + {41, 0}, + {42, 0}, + {43, 0}, + {44, 0}, + {45, 0}, + {46, 0}, + {47, 0}, {1, "print"}, {35, 0}, {1, "del"}, - {310, 0}, + {311, 0}, {1, "pass"}, - {272, 0}, {273, 0}, {274, 0}, {275, 0}, + {276, 0}, {1, "break"}, {1, "continue"}, {1, "return"}, {1, "raise"}, {1, "import"}, - {278, 0}, - {1, "from"}, {279, 0}, - {277, 0}, + {1, "from"}, + {280, 0}, + {278, 0}, {23, 0}, {1, "global"}, {1, "exec"}, - {295, 0}, + {296, 0}, {1, "in"}, {1, "assert"}, - {284, 0}, {285, 0}, {286, 0}, {287, 0}, - {313, 0}, + {288, 0}, + {314, 0}, {1, "if"}, {1, "elif"}, {1, "else"}, {1, "while"}, {1, "for"}, {1, "try"}, - {288, 0}, + {289, 0}, {1, "finally"}, {1, "except"}, {5, 0}, {6, 0}, - {291, 0}, - {1, "or"}, - {305, 0}, {292, 0}, + {1, "or"}, + {306, 0}, + {293, 0}, {1, "and"}, {1, "not"}, - {293, 0}, {294, 0}, + {295, 0}, {20, 0}, {21, 0}, {28, 0}, @@ -1595,47 +1647,47 @@ static label labels[130] = { {29, 0}, {29, 0}, {1, "is"}, - {296, 0}, - {18, 0}, {297, 0}, - {33, 0}, + {18, 0}, {298, 0}, - {19, 0}, + {33, 0}, {299, 0}, - {34, 0}, + {19, 0}, {300, 0}, + {34, 0}, + {301, 0}, {14, 0}, {15, 0}, - {301, 0}, + {302, 0}, {17, 0}, {24, 0}, {32, 0}, - {302, 0}, {303, 0}, - {306, 0}, - {9, 0}, {304, 0}, + {307, 0}, + {9, 0}, + {305, 0}, {10, 0}, {26, 0}, - {312, 0}, + {313, 0}, {27, 0}, {25, 0}, {2, 0}, {3, 0}, - {317, 0}, + {318, 0}, {1, "lambda"}, - {314, 0}, - {307, 0}, + {315, 0}, {308, 0}, {309, 0}, + {310, 0}, {1, "class"}, - {315, 0}, {316, 0}, - {318, 0}, + {317, 0}, + {319, 0}, }; grammar _PyParser_Grammar = { - 63, + 64, dfas, - {130, labels}, + {142, labels}, 256 }; diff --git a/Python/import.c b/Python/import.c index 99e6204..f38ee41 100644 --- a/Python/import.c +++ b/Python/import.c @@ -66,7 +66,7 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *); /* XXX Perhaps the magic number should be frozen and a version field added to the .pyc file header? */ /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */ -#define MAGIC (50821 | ((long)'\r'<<16) | ((long)'\n'<<24)) +#define MAGIC (50822 | ((long)'\r'<<16) | ((long)'\n'<<24)) /* Magic word as global; note that _PyImport_Init() can change the value of this global to accommodate for alterations of how the -- cgit v0.12